Mikescher / HexSolver

An automatic solver (with image recognition) for Hexcells
MIT License
29 stars 3 forks source link

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)

> Current Release

Execution Animation

Usage

Troubleshooting

Features

HexSolvers internal steps

Step 1 - Capture

Shot1 (Captured Screenshot)

Step 2 - Find Hexagons

Shot2 (Binarizing Image to find hexagons)

Shot3 (Putting Hexagon Grid over screenshot)

Step 3 - Recognize Types

Shot4 (Find the layout and the cell types)

Step 4 - Image Processing

Shot5 (Find the cells with numbers and extract them)

Step 5 - Text Recognition

Shot6 (OCR the numbers with my own HexCells-OCR engine)

Shot7 (the OCR distance of the different numbers)

Step 6 - Puzzle Solving

Shot8 (Show all the current active hints)

Shot9 (Find solutions for the current configuration)

Shot10 (Find an optimal execution path by TSP algorithm)

Step 7 - Solution Executing

>>> Animation <<<