HexSolver (an Hexcells solver)
An automatic solver for Hexcells, Hexcells Plus and Hexcells Infinite.
The idea is to automatically parse the game state, find the next (valid) step and execute it.
(Rinse and Repeat until everything is solved)
- Start HexCells Infinite (should also work with the other Hexcell games)
- I recommend window-mode with 1440x900 resolution (for the OCR to work best)
- Load a level
- Start HexSolver
- Press Recapture
- If you want to completely solve the level press Execute (All)
- Don't manually move your mouse until finished (press ESC to abort)
- If you just want to see the next step press Solve (Can take around 5-10 seconds)
- HexSolver needs an minimum amount of orange cells to recognize the layout
- HexSolver only works when all cells are in an uniform grid (click Calculate to see the grid)
- Only click Recapture when the fading in effect is finished - otherwise no cells can be recognized
- If you find the (uncommon) case of two row-hint in one cell, HexSolver will fail (sorry)
- If HexSolver fails to solve a configuration or the OCR module fails, please send me an full-resolution screenshot of the game.
- Automatic finding of game window and capturing of its graphical output
- Dynamically finding the hexagon layout
- With an custom crafted OCR module recognition of the cell values
- 3-Step solving of the current configuration (tested on the original levels and many of the generated ones)
- Finding the optimal execution path by solving the corresponding TSP
- Automatic execution by programmatically moving the mouse
- Saving the current (captured) state as an *.hexcells file