package knights_tour

  1. Overview
  2. Docs
Solves the 'Knights Tour' and various 'Poyomino' puzzles

Install

Dune Dependency

Authors

Maintainers

Sources

knights_tour-0.0.5.tbz
sha256=470c6d1b00b68b3bb6ba38a422a4698350564d803e20e7a7627245a253a7c890
sha512=0548d3c90c25e1dd442b43857d62aac19c98f676fedc344071635bc3ce680543fad3998a8b79fa77d6df3726c85fcf7fe14d692e3c30e5485f91f953f020cd74

doc/knights_tour.pentominos/Pentominos/Puzzle/index.html

Module Pentominos.PuzzleSource

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.

Sourcetype 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.

Sourceval classic : t

The initial state of the 'classic' Pentominos puzzle.

Sourceval 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)

Sourceval solve : ?report_progress:(string -> t -> unit) -> t -> Board.t Searchspace.t
Sourceval save : out_channel -> t -> unit

Write a textual representation of a puzzle to a channel. The format is human readable; but it can also be used to restore a puzzle via the load function.

Sourceval save_fmt : Format.formatter -> t -> unit

Write a textual representation of a puzzle to a formatter. The format is human readable; but it can also be used to restore a puzzle via the load function.

Sourceval load : in_channel -> t

Load a puzzle from a textual representation as produced by save.

Sourceval load_lines : Knights_tour.Lines.t -> t

Load a puzzle from a textual representation as produced by save.

OCaml

Innovation. Community. Security.