After watching yet another video on Wave Function Collapse that used Sudoku as an example to explain the algorithm i decided to experiment implementing a sudoku solver based on WFC principles.

The grid starts with each cell containing each possible values.

Clicking on a cell forces it to collapse to a single value among those possibilities.

The algo then propagates this change through the grid, trying to respect the rules of sudoku:

  • numbers can't be repeated inside a block (9*9 squares)
  • numbers can't be repeated inside a row
  • numbers can't be repeated inside a column

if through propagation a cell is left with only one possible value then it collapses, this change will then be propagated through the grid.

you can't click a cell while the algo is working.

While it's not really "working" (a lot of errors tend to happen, breaking the adjacency rules) i had a blast creating this fun little project and wanted to share.

Published 5 days ago
StatusReleased
CategoryOther
PlatformsHTML5
AuthorEtienne Pouvreau
GenreSimulation
Made withUnity
Tags2D, Experimental, No AI, Procedural Generation

Comments

Log in with itch.io to leave a comment.

(+1)

Very cool little experiment!