Skip to main content

Graph color flood puzzle solver.

Project description

Flood Solver


There are many games like Flood-It, KAMI 2, and Globs that require the user to change the colors of regions until there is only one region left. These are often called flood fill games. Clifford et al found that determining the best possible score on these puzzles is NP-hard.


I chose to code up a solver for this problem because I am interested in the idea that there are games that humans can solve easily, but computers have trouble solving. I think this qualifies as such a game given that as the numbers of allowed moves and colors increases, the runtimes of brute-force solutions increase exponentially and yet humans have a intuitive understanding of these puzzles that is difficult to put into computer instructions or even words.


Install the current PyPI release:

pip install flood-solve

Or install from source:

pip install git+


# Run the flood solver on a predefined puzzle (section 3, puzzle 6)
flood -s 3 -p 6

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flood-solve, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size flood_solve-0.0.4-py3-none-any.whl (14.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flood-solve-0.0.4.tar.gz (12.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page