Backtracking (BT) and Conflict-directed Back Jumping (CBJ)

To demonstrate bt and cbj, we have a number of claire3 programs written

Coded versions of bt


Coded versions of cbj

In cbj.cl we introduce a new global array, CS. CS[i] is the conflict set for variable V[i], i.e. the set of past variables that V[i] failed consistency checks. When reaching a dead end we jump back from V[i] to V[h], where h is the deepest past variable in conflict with V[i]. We also update CS[h] to become the set of variables in conflict with V[i] or V[h]. cbj is derived from bt4.cl as follows

Coded versions of fc

Forward checking fc.cldiffers from cbj and bt in one obvious way: when we instantate the current variable we filter the domains of future variables, weeding out values that are incompatible. Consequently, we never check back, just forwards.

We are now faced with a number of engineering problems. First, we must be able to recover domains on backtracking, i.e. undo the effect of forward checking. We introduce 2 new data structures FCR and RED allows us to maintain domains during search. Furthermore, we can exploit FCR and RED to incorporate cbj into fc, giving us the hybrid fc-cbj, and algorithm that checks forward and jumps back.

References

For FC see Haralick & Eliott's 1980 paper in AIJ. For BM and BJ, see papers by the late (great) John Gashnig. For cbj and its hybrids see Computational Intelligence 9(3), 1993.