Dependencies

Python module dependencies

Roadmap

Enhance –north-snake option implementation. The criterion for exluding
invalid north snake candidate can be enhanced using the fact that for any
row of a north snake the pattern x...0...x cannot be found. Since the
algorithm builds polyominoes column after column, it would be a good idea to
make all of the “left snakes” and rotate the results.

Creates a test suite.

Implements Knuth’s algorithm for the minimum connectivity problem (see comment
in source code). This will improve significantly the speed when enumerating
polyominoes.

Takes into account symmetry to improve speed of algorithm. It will also allow
to generate free/fixed/one-sided polyominoes. Currently, only fixed
polyominoes are generated.

Improve speed for enumerating partially directed snakes (it uses a Python
boolean list instead of a bool*). Moreover, the enumeration columnwise could
discard more configurations than by looking only at the pillars.

Howto use

The script polyenum is used to call the enumeration code. You can
./scripts/polyenum --help for help.

From git repository

In order for the script to run properly, the Cython library has to be compiled.
It’s done by doing:

$ ./configure
$ make

and then, polyenum will be available under ./scripts directory.

Example

Enumerating all polyominoes of given area

Let the area of the polyominoes be 4. Finding all the polyominoes (not
inscribed in a particular rectangle) of area 4 is done as follows: