From c4a706fb5fa3ecac1ac38686f4d318f2aaa399a1 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 15 Oct 2018 21:51:41 -0700 Subject: [PATCH] activate pruning inside `forward_checking` Otherwise `csp.curr_domains` may not be available for the loop that follows. --- csp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/csp.py b/csp.py index 70223acf2..18c954834 100644 --- a/csp.py +++ b/csp.py @@ -230,6 +230,7 @@ def no_inference(csp, var, value, assignment, removals): def forward_checking(csp, var, value, assignment, removals): """Prune neighbor values inconsistent with var=value.""" + csp.support_pruning() for B in csp.neighbors[var]: if B not in assignment: for b in csp.curr_domains[B][:]: