Closed jgraley closed 2 years ago
Commit c9933b8 fixes obvious bug in which ConstraintSet all_unsatisfied;
was declared in the class and then never cleared down even though it's populated by unioning: all_unsatisfied = UnionOf(all_unsatisfied, unsatisfied);
. I believe it needs to be cleared where I now declare it (making it a local variable).
There was no way backjumping could work because all_unsatisfied
would end up holding every constraint that had ever been unsatisfied.
I think the back-tracker is making the "standard mistake" of trying to make a second back-jump immediately after the first and jumping over variables that could fix the first conflict. Options therefore involve:
I think, in addition to fixing the bugs listed above, I also had to prevent backtracking when a leaf variable runs out of values having achieved one or more matches.
Backtracking now works as a result of these fixes.
It's attempting graph-based backjumping but forgetting to keep considering earlier dead-ends.