Skip to content

Commit bcff437

Browse files
mbuttericknorvig
authored andcommitted
activate pruning inside forward_checking (aimacode#975)
Otherwise `csp.curr_domains` may not be available for the loop that follows.
1 parent 152e5b0 commit bcff437

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

csp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def no_inference(csp, var, value, assignment, removals):
230230

231231
def forward_checking(csp, var, value, assignment, removals):
232232
"""Prune neighbor values inconsistent with var=value."""
233+
csp.support_pruning()
233234
for B in csp.neighbors[var]:
234235
if B not in assignment:
235236
for b in csp.curr_domains[B][:]:

0 commit comments

Comments
 (0)