From 8efb6673568082014e3a671a344e67c067137285 Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Thu, 6 Sep 2018 16:23:05 -0700 Subject: [PATCH] Bug fix: providing right number of variables for the SAT Solver --- killerSudoku/killerSolver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/killerSudoku/killerSolver.py b/killerSudoku/killerSolver.py index 141b6583..a6241477 100644 --- a/killerSudoku/killerSolver.py +++ b/killerSudoku/killerSolver.py @@ -300,10 +300,11 @@ def verify_killer_sudoku(killerRules, result_matrix): return True def solveOriginalEncoding(killerRules): + global seed cnf = encode_to_cnf(killerRules) # #solve the encoded CNF start = time.time() - result_list = glucose.solve(cnf, N**3) + result_list = glucose.solve(cnf, seed) end = time.time() #output the result # print result_list -- 2.34.1