Skip to content

Webastronaut/flood-it-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flood-it-solver

Flood-It solver written for the ASP system telingo.

Usage

Create test instances

Run the following command:

./create-instance [NUMBER_OF_ROWS] [NUMBER_OF_COLORS]

For example

./create-instance 12 4

would create the file ./instances/flood-it-board-12x12-4.lp.

Run solver on instances

Install telingo, change to the directory of the downloaded flood-it-solver and then type (all via command line):

telingo floodit.lp instances/flood-it-board-12x12-4.lp 1 --stats

Visualize solution

To see a rudimentary visualization of the first found solution run the following command (works only with python 3.x):

python visualize.py [INSTANCE_FILE]

For example:

python visualize.py instances/flood-it-board-12x12-4.lp