[Paper Review] The selection monad as a CPS transformation
This paper establishes the selection monad as a continuation-passing style (CPS) transformation, revealing its call/cc-like operator and demonstrating its utility in game theory and proof theory. It shows that strategic contexts in game theory are naturally continuations, enabling a compositional, human-readable reformulation of classical analysis via selection functions.
A computation in the continuation monad returns a final result given a continuation, ie. it is a function with type $(X o R) o R$. If we instead return the intermediate result at $X$ then our computation is called a selection function. Selection functions appear in diverse areas of mathematics and computer science (especially game theory, proof theory and topology) but the existing literature does not heavily emphasise the fact that the selection monad is a CPS translation. In particular it has so far gone unnoticed that the selection monad has a call/cc-like operator with interesting similarities and differences to the usual call/cc, which we explore experimentally using Haskell. Selection functions can be used whenever we find the intermediate result more interesting than the final result. For example a SAT solver computes an assignment to a boolean function, and then its continuation decides whether it is a satisfying assignment, and we find the assignment itself more interesting than the fact that it is or is not satisfying. In game theory we find the move chosen by a player more interesting than the outcome that results from that move. The author and collaborators are developing a theory of games in which selection functions are viewed as generalised notions of rationality, used to model players. By realising that strategic contexts in game theory are examples of continuations we can see that classical game theory narrowly misses being in CPS, and that a small change of viewpoint yields a theory of games that is better behaved, and especially more compositional.
Motivation & Objective
- To clarify the relationship between the selection monad and CPS by showing it as a refined form of continuation-passing style.
- To explore the existence and behavior of a call/cc-like operator in the selection monad, contrasting it with standard call/cc.
- To apply selection functions as generalized rationality models in game theory, enabling context-dependent and non-classically rational agents.
- To develop a compositional, scalable framework for game theory and proof interpretation using selection functions and CPS.
- To extend the application of selection monads to nondeterministic, infinite, and mixed-strategy games through monad transformers and topological structures.
Proposed method
- Uses the selection monad $\mathscr{J}X = (X \to R) \to X$ as a CPS transformation, where the intermediate result $X$ is returned rather than the final result $R$, contrasting with the continuation monad $\mathscr{K}X = (X \to R) \to R$.
- Introduces a call/cc-like operator for the selection monad with a specific type, enabling control flow manipulation analogous to, but distinct from, standard call/cc.
- Employs experimental Haskell implementations to explore the behavior of selection monad operations, particularly the call/cc-like operator.
- Applies the product of selection functions to model backward induction in game theory, showing equivalence to Spector’s bar recursion.
- Uses a graphical calculus based on string diagrams and monoidal categories to represent strategic interactions, with composition and tensor product defined via delimited continuation transformers.
- Introduces a new 'sum of selection functions' operator $\oplus$ for modeling simultaneous, nondeterministic games, improving solution space structure over pure or mixed strategies.
Experimental results
Research questions
- RQ1How does the selection monad serve as a CPS transformation, and what distinguishes it from the standard continuation monad?
- RQ2What is the nature and behavior of a call/cc-like operator in the selection monad, and how does it differ from traditional call/cc?
- RQ3Can selection functions model non-classically rational agents in game theory, particularly in context-dependent decision-making?
- RQ4How can the product of selection functions be used to interpret classical analysis proofs in a human-readable, game-theoretic way?
- RQ5What is the role of continuations in strategic contexts, and how can they be formalized using CPS and monad transformers?
Key findings
- The selection monad is a CPS transformation that returns intermediate results ($X$) rather than final results ($R$), offering a refined view of computation compared to the standard continuation monad.
- A call/cc-like operator exists in the selection monad with a distinct type and behavior, enabling control flow manipulation that differs from standard call/cc.
- The product of selection functions corresponds to backward induction in game theory and is equivalent to Spector’s bar recursion, enabling the extraction of computable programs from classical proofs.
- Selection functions model generalized rationality in game theory, allowing for context-dependent agents such as 'Keynes agents' who prefer to vote for the expected winner or 'punks' who avoid it.
- The 'sum of selection functions' operator $\oplus$ enables modeling of simultaneous, nondeterministic games with better-structured solution spaces than pure or mixed strategies.
- A graphical calculus based on string diagrams and delimited continuations provides a compositional framework for game theory, with analogies to shift/reset and compact categories.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.