aboutsummaryrefslogtreecommitdiff
path: root/findloop.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-10-28 11:36:47 +0100
committerSimon Tatham <anakin@pobox.com>2017-10-28 11:47:12 +0100
commit69773d855b517ea356c3c02add97893201de2066 (patch)
tree684e9450a4c91c26158612091fd7f0386f00a6ee /findloop.c
parent6da8dc91a2c1ecd5cc7e02bc63d1404bf80382f9 (diff)
downloadpuzzles-69773d855b517ea356c3c02add97893201de2066.zip
puzzles-69773d855b517ea356c3c02add97893201de2066.tar.gz
puzzles-69773d855b517ea356c3c02add97893201de2066.tar.bz2
puzzles-69773d855b517ea356c3c02add97893201de2066.tar.xz
Solo: remove some overzealous assertions in the solver.
There were a couple of places where we enforced by assertion that our solver state had not become inconsistent, on the assumption that some previous piece of solver would have detected that the puzzle was impossible before getting to that place in the code. But in fact the combination of Killer and Unreasonable modes falsified at least two of those assumptions: 'solo --test-solve --generate 100 3x3kdu#12345' triggered an assertion failure in solver_set, and with that one fixed, the same command triggered a second failure in solver_killer_sums. In both cases, the fix is simply to return -1 for 'puzzle is inconsistent', which will cause the Unreasonable recursive solver to abandon that branch of its search tree, backtrack, and try a different guess at some previous square. Thanks to Anders Höglund for the report.
Diffstat (limited to 'findloop.c')
0 files changed, 0 insertions, 0 deletions