What is FloodFill?

FloodFill (aka. Flood-it, Globs) is a game where the objective is to fill a N x N grid with a single color. The player begins in the top-left corner tile. By picking a color from the 6 square buttons, the player's tiles will switch to that color and also expanding its tiles to surrounding tiles of the same color (its better just to see it happen). If you fill the entire grid within 25 moves, YOU WIN! Give it your best shot.

Too hard? Well.... there's an "artificial intelligence" feature that tries its best to find the path to a completed grid. Using the A* search algorithm and an estimating heuristic, it attempts to find a series of steps that user can take to fill the grid. The AI can always find a path to fill the grid... if it had infinitely many steps (just like a human can). Finding a path under 25 steps is much harder, and sometimes not achievable with this AI especially when the grid dimensions increase from 14 and up.

How to Play

Start off by clicking new game and clicking the 6 color squares to make your move, if you would like to play yourself. If you've given up, you can have the AI solve it for you. Start a new game and click "AI Answer". From anywhere from 0.00001 seconds to the time limit number in the form, the AI will reveal a path of steps in the form of a row of color squares. Either click them individually, or press "Automate Answer" to have the AI do it for you. Feel free to tinker with the dimension size and time limit. Too see how the AI is working in the background, open up your Browser Javascript Console (most likely by pressing F12)

Note: Dimension sizes range from [3,15]
The Time Limit is the maximum amount of seconds the AI is allowed to solve the grid (a big time limit will use your CPU alooot)
Turn: /