Skip to content

andrefpoliveira/SudokuSolverWFC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SudokuSolverWFC

Sudoku Solver using a Wave Function Algorithm.

How does it work?

The Wave Function Collapse (WFC) algorithm was developed by Maxim Gumin. For a more detailed page about the algorithm, see the Wikipedia page.

Steps Taken:

  1. Select the Sudoku Cube with the lowest entropy (least amount of available states)
  2. If the cube already has a value:
    • Found a Solution!
  3. If the cube has no value nor available states:
    • Invalid Board! Return to the previous state.
  4. Select an state and propagate the selection to the cubes in the same row, column and square

Examples

Some examples can be found in puzzles. All of them were extracted from Sudoku.com. There is one puzzle for each of the available difficulties: Easy, Medium, Hard, Expert, Master, and Extreme.

Each test contains the initial board. All the empty spaces are represented by zeros.

About

Sudoku Solver using a Wave Function Algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages