In constraint satisfaction, backmarking is a variant of the backtracking algorithm.
Backmarking works like backtracking by iteratively evaluating variables in a given order, for example, . It improves over backtracking by maintaining information about the last time a variable was instantiated to a value and information about what changed since then. In particular:
# for each variable and value , the algorithm records information about the last time has been set to ; in particular, it stores the minimal index