Peg solitaire 2026-11-05
Peg solitaire is a one-player finite board puzzle in which a peg jumps over an adjacent peg into an empty hole, and the jumped peg is removed. In a standard orthogonal version, the three holes must lie consecutively in one row or column. Board shape, initial occupied holes and the desired final configuration are part of the problem specification.
Every move decreases the number of pegs by exactly one, so a play starting with pegs has at most moves if at least one peg remains. A solution reducing to a single peg must have exactly moves. This is a counting necessity, not a guarantee of solvability.
The puzzle illustrates state-space search: a position is a subset of occupied holes, and directed edges are legal jumps. Backtracking explores possible continuations, while board symmetries can identify equivalent states. Algebraic invariants and monotone weight functions can prove some target configurations unreachable without enumerating every play.
State-space search 2026-11-05
A state-space search solves a problem by exploring a transition system: a state records the current situation, a transition relation specifies legal moves, and a goal state specifies success. The answer is usually a path in a transition system, rather than just the final configuration. This separates modeling the problem from choosing the search algorithm.
For a sliding-tile puzzle, the state is the arrangement of tiles and the empty square; one move slides a neighboring tile into that square. Breadth-first search finds a solution using the fewest moves when all moves have equal cost. Depth-first search can use less working storage but need not find a shortest solution. Remembering visited configurations prevents repeatedly exploring a cycle. The same formulation applies to route finding and automated planning.[ref]
Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig. Chapter 3, problem formulation and search strategies