package knights_tour

  1. Overview
  2. Docs

A polyomino puzzle consists of a board and a set of polyomino pieces to be placed onto the board. The puzzle is considered solved when all pieces have been placed.

type t = {
  1. pieces : Polyomino.t list;
    (*

    pieces remaining to be placed

    *)
  2. board : Board.t;
    (*

    board upon which to place the pieces. For a (partially) solved puzzle it tracks what piece occupies each square.

    *)
}

Data type representing the state of a puzzle.

val classic : t

The initial state of the 'classic' Pentominos puzzle.

val classic_no_symmetric_solutions : t

Same as the 'classic' puzzle, but one assymetric puzzle piece deliberately has all but one of its variants removed (this ensures that symmetric solutions are eliminated, by not allowing that one piece to only be used in one orientation)

val solve : ?report_progress:(string -> t -> unit) -> t -> Board.t Knights_tour.Searchspace.t
OCaml

Innovation. Community. Security.