Misere combinatorial games.
Combinatorial games from a type of states #
In the literature, games are often described in terms of their game graphs, which can be thought of as (not necessarily properly) 2-edge-coloured rooted arborescences. Or more informally as a set of states with move relations for Left and Right (the two players).
We define a structure GameGraph that facilitates this viewpoint, bundling the
Left and Right option set functions along with the type, as well as
GameGraph.toForm, which turns the graph into the relevant type of game form.
Design notes #
When working with any "specific" game (Nim, Domineering, Hackenbush, et
cetera), one can use GameGraph to set up the basic theorems and definitions,
but the intent is that one need not work with GameGraph directly most of the
time.
A game graph is a type of states endowed with option sets for Left and Right.
Use GameGraph.toForm to turn this structure into the appropriate game type.
The sets of options for the players.
Instances For
Well-founded games #
A game graph is well-founded if from every position there is no infinite sequence of (not necessarily alternating) Left and Right moves. In the literature, such a game is called loopfree (see [Siegel, Definition 4.1 on p. 34][siegel:CombinatorialGameTheory:2013]).
- wf : IsWellFounded α fun (a b : α) => ∃ (p : Player), a ∈ c.moves p b
Instances
Conway induction: build data for a game by recursively building it on its Left and Right sets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Turns a state of a GameGraph into a Form.
Equations
- One or more equations did not get rendered due to their size.