Bug fix: providing right number of variables for the SAT Solver
authorHamed Gorjiara <hgorjiar@uci.edu>
Thu, 6 Sep 2018 23:23:05 +0000 (16:23 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Thu, 6 Sep 2018 23:23:05 +0000 (16:23 -0700)
killerSudoku/killerSolver.py

index 141b65830e87bdcfdfc8dc0533ad8e87d76a374a..a6241477126de66fdd7d40e6660b4bbea9f53850 100644 (file)
@@ -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