The variables are the board squares, which each contain either a mine or a constant between 0 and 8. A set of values that can be assigned to the variables.A set of constraints on these variables that must be satisfied.Minesweeper constraintsĪ constraint satisfaction problem has a few parts: Using these algorithms - constraint propagation in particular - we can mimic the logic human players would use to play Minesweeper.Īfter getting as far as we can with logic, we will use depth-first search with backtracking to guess new squares to uncover. The animation that you just saw is an intermediate puzzle with a 16x16 board and 40 mines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |