This is a Python based solver for the Japanese puzzle game called Nurikabe. The
puzzle is to create islands (highlighted squares) based on the
given size also known as a "clue", separated by a single ocean.
The rules to solving the puzzle are such that:
-
Each island contains exactly one clue.
-
The number of squares in each island equals the value of the clue.
-
All islands are isolated from each other horizontally and vertically.
-
There are no oceans of 2x2 or larger.
-
When completed, all oceans form a continuous path.
There have been many documentation and methods for solving this puzzle using ant
colony algorithm, however, not much on using genetic algorithm.
Under careful instruction by Dr. Abbot, me (Spencer Young) and Stanley Do, we
worked together outside of regular curriculum to create a genetic algorithm
solver for Nurikabe.
It currently solves 5x5 Nurikabe problems in about 1 second! Larger puzzles can
still be solved by larger degrees in time depending on the puzzle.
The solver uses all the traditional properties of genetic algorithms, such as:
-
Population
-
Mating Pool
-
Elitism
-
Mutation
-
Breeding