Backbone and solution marginals
Also known as Backbone, Solution sampling
constraint constraint-search
For a problem with many solutions, these searches tell what is certain and what is likely. To find the values each variable takes in some solution, the solver finds one solution and marks all its values; then, for each value still unmarked, it searches for a solution with that value fixed and marks all values of the solution it finds. possible_values returns these sets, and the backbone is the variables left with one possible value: the facts true in every solution, such as the Minesweeper cells that are safe for sure. marginals enumerates solutions up to a limit and reports how often each value occurs, and weighted_marginals weighs each solution, for priors such as bidding inference; both are exact only when no solution lies past the limit. sample draws a random solution by restarts in random value order, which is not exactly uniform but serves to deal hidden cards for Perfect Information Monte Carlo.
Pseudocode
algorithm Backbone(model, D)input: model with current domains Doutput: for each variable, its value in every solution, or nilP(x) ← ∅ for each variable x ▷ the values seen in a solutionw ← first-solution(D)if w = nil thenreturn nil for every variableP(x) ← P(x) ∪ {w(x)} for each xfor each variable x and each v ∈ D(x) doif v ∉ P(x) then ▷ only unsupported values cost a searchw ← first-solution(D with x fixed to v)if w ≠ nil thenP(y) ← P(y) ∪ {w(y)} for each yreturn for each x the only value of P(x) if |P(x)| = 1, else nilfunction Marginals(model, D, limit, weight)W[x, v] ← 0 for each x and vtotal ← 0n ← 0for each solution s of backtracking search on D doif n = limit thenreturn W / total, inexact ▷ a solution past the limitW[x, s(x)] ← W[x, s(x)] + weight(s) for each xtotal ← total + weight(s)n ← n + 1return W / total, exactfunction Sample(model, D, restarts)for r in 1, …, restarts dos ← first-solution(D) with values in random order, under its own budgetif s is a solution or D has none thenreturn sreturn exhaustedIn the crates
constraint-searchThe values possible and certain in every solution, each value's probability (optionally weighted) across the solutions, and random solutions by restarts for determinizing hidden information.
Lineage
Comes from
builds on Backtracking search with propagation
Led to
Nothing on this site.
Papers
- Determining computational complexity from characteristic ‘phase transitions’ Rémi Monasson, Riccardo Zecchina, Scott Kirkpatrick, Bart Selman, Lidror Troyansky · 1999· Nature