Peg Solitaire

Given an initial and a final configuration of pegs on a board, find a sequence of peg-solitaire moves that transforms the initial configuration into the final one.


In Peg Solitaire (also known as Hi-Q), we have a grid graph (the board) on each of whose nodes (the holes) there may be at most one peg. The initial configuration of pegs evolves by performing one of the following moves (the jumps): for each triple of horizontally or vertically adjacent nodes, if the first and the second nodes are occupied by pegs and there is no peg on the third one, then we can remove the two pegs and place a new one on the third node.

A puzzle of peg solitaire is defined by an initial and a final configuration, and consists of finding a sequence of moves that transforms the initial configuration into the final one.

Solitaire Army is based on the game mechanics of Peg Solitaire.

Peg Duotaire is a two-player variant of Peg Solitaire in which two players alternatively make a peg move and the winner is the last player to move.

Peg Solitaire Reachability is a puzzle in which, given an initial configuration of pegs on a finite board, one is asked to determine whether there exists a sequence of Peg-Solitaire moves that allows any peg to be placed in a given target position.

Computational Complexity

[1] proves the NP-completeness of those peg solitaire puzzles in which the final configuration is required to have only one peg (hence, the goal is cleaning the entire board). However, for rectangular boards of fixed (constant) height, deciding whether a given configuration can be transformed into a single peg is polynomial-time solvable, since solvable instances form a regular language [2].

[3] proves the NP-completeness of the Peg Solitaire Reachability problem.

[5] provides a zero-knowledge proof of knowledge for solutions of peg solitaire. The proof can also be adapted to the case in which no final configuration is mandated and the goal is that of fidning a solution consisitng of at least some number $k$ of valid moves.


[4] shows how to obtain board configurations corresponding to the 10 Arabic numerals and the 26 letters of the ISO basic Latin alphabet in both the uppercase and lowercase variant starting from a rectangular $7 \times 5$ board that is completely filled by pegs except for the center hole. A related interactive tool is available here.


[1] R. Uehara and S. Iwata. “Generalized Hi-Q is NP-Complete”, IEICE TRANSACTIONS, 1990.

[2] B. Ravikumar, “Peg-solitaire, string rewriting systems and finite automata”, Theoretical Computer Science, 2004.

[3] L. Gualà, S. Leucci, E. Natale, and R. Tauraso. “Large Peg-Army Maneuvers”, in FUN 2016.

[4] T. Oikawa, K. Yamazaki, T. Taniguchi, R. Uehara, “A Peg Solitaire Font” in Bridges 2017.

[5] X. Bultel, “Zero-Knowledge Proof of Knowledge for Peg Solitaire”, in FUN 2022.

    author = "{CoG contributors}",
    title  = "{Peg Solitaire --- Complexity of Games}",
    year   = "2022",
    url    = "",
    note   = "[Online; accessed 2022-06-02]"