Alpha-Beta Pruning via Monadic Continuations
Abstract
Alpha-beta pruning is a fundamental technique in game-playing AI, enabling efficient minimax search by avoiding the exploration of branches that cannot affect the optimal decision. We present a monadic formulation of alpha-beta pruning based on the combination of the continuation monad and the reader monad. Unlike previous approaches that encode alpha-beta bounds into the types of available moves, our construction records these bounds within monadic outcomes, leaving the move types unchanged. We further show that the ordinary continuation monad suffices to compute not only optimal outcomes but also optimal plays, by extending the outcome type to include the corresponding sequences of moves. This provides an alternative to generalisations of the continuation monad proposed to address the inefficiencies associated with the selection monad in alpha-beta search. We illustrate our approach with an implementation of Tic-Tac-Toe, observing a 39-fold reduction in the number of plays evaluated, compared with exhaustive search, in computing an optimal play. Finally, we formally establish the correctness of our construction by proving that the monadic alpha-beta search computes the same optimal outcomes and plays as exhaustive minimax search. Our results demonstrate how a foundational algorithm in AI can be expressed and verified using standard monadic abstractions, providing a basis for further development of compositional approaches to adversarial search.
Related
- Almost Symmetric Linear Arc Monadic Datalog and Transitive Tournaments
- Monadic second-order logic and the domino problem on self-similar graphs
- Forking and invariant types in monadic NIP theories
- Exact stress-tensor generators distinguish integrable continuations
- Monadic Second-Order Logic in HOL: Deep and Shallow with Automated Faithfulness (Extended Preprint)
BibTeX
@misc{escardo2026alphabeta,
title = {{Alpha-Beta Pruning via Monadic Continuations}},
author = {Martín Escardó and Paulo Oliva},
howpublished = {arXiv},
year = {2026},
month = nov,
doi = {10.48550/arxiv.2611.32320},
eprint = {2611.32320},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.32320},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - Alpha-Beta Pruning via Monadic Continuations
AU - Martín Escardó
AU - Paulo Oliva
PY - 2026
DA - 2026/11/24
PB - arXiv
DO - 10.48550/arxiv.2611.32320
UR - https://arxiv.org/abs/2611.32320
AB - Alpha-beta pruning is a fundamental technique in game-playing AI, enabling efficient minimax search by avoiding the exploration of branches that cannot affect the optimal decision. We present a monadic formulation of alpha-beta pruning based on the combination of the continuation monad and the reader monad. Unlike previous approaches that encode alpha-beta bounds into the types of available moves, our construction records these bounds within monadic outcomes, leaving the move types unchanged. We further show that the ordinary continuation monad suffices to compute not only optimal outcomes but also optimal plays, by extending the outcome type to include the corresponding sequences of moves. This provides an alternative to generalisations of the continuation monad proposed to address the inefficiencies associated with the selection monad in alpha-beta search. We illustrate our approach with an implementation of Tic-Tac-Toe, observing a 39-fold reduction in the number of plays evaluated, compared with exhaustive search, in computing an optimal play. Finally, we formally establish the correctness of our construction by proving that the monadic alpha-beta search computes the same optimal outcomes and plays as exhaustive minimax search. Our results demonstrate how a foundational algorithm in AI can be expressed and verified using standard monadic abstractions, providing a basis for further development of compositional approaches to adversarial search.
ER -