summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2019-03-10 20:40:54 +1300
committerDavid Phillips <david@sighup.nz>2019-03-10 21:16:19 +1300
commitb434d87ee4deb9cc07af1be79d90b874fa139321 (patch)
tree15975834fdf5dd9ecc766b225d0476f830b104df /TODO
parent6bc7fdab077b1877f71b69f4b2c1e8046a302e9b (diff)
downloadsudoku-b434d87ee4deb9cc07af1be79d90b874fa139321.tar.xz
Fix the implementation
A number of things wrong with the quickie code initially committed, chiefly not mutating the caller's copy of the board when that was the intention. This commit fixes this and produces a working solver for all boards that can be solved without exploration/uncertainty.
Diffstat (limited to 'TODO')
-rw-r--r--TODO17
1 files changed, 17 insertions, 0 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..1d87a91
--- /dev/null
+++ b/TODO
@@ -0,0 +1,17 @@
+The solver can only solve when at least one cell can be solved with certainty
+at each step of the process until repeating this eventually results in a solved
+board.
+The next step here is to allow exploration/trail of possible solutions.
+Presumably, would want to keep a copy of the board just before each "guess"
+that's taken to be able to easily roll back if failure.
+
+This would probably work really nicely as a recursive call:
+
+ board = get_fresh_board(board)
+ solve_all_certainties(board)
+ for each possible board as cand_board:
+ solution = solve_all_certainties(cand_board)
+ if complete(solution)
+ success
+ /* we should have solution presuming board was solvable */
+