Proof-Number Search (PNS) is a best-first, adversarial search algorithm specifically engineered for solving two-player, deterministic, perfect-information games. Unlike minimax, which seeks an optimal move, PNS aims to prove a game state is a forced win (a proof) or a forced loss (a disproof) for the player to move. It does this by dynamically constructing an AND/OR tree where OR nodes represent positions where the current player chooses a move, and AND nodes represent positions where the opponent responds. The algorithm assigns each node a proof number (minimum leaves to prove a win) and a disproof number (minimum leaves to disprove a win), always expanding the node with the smallest proof or disproof number—the most promising candidate to resolve the game's status.
