Misere combinatorial games.
Hackenbush #
Hackenbush is played on a connected graph with a designated "ground" vertex. All edges are coloured either Left (bLue) or Right (Red). On their turn, a player removes one of their coloured edges. The resulting position is the connected component containing the ground vertex.
A Hackenbush position on a finite supported graph with a ground vertex.
- graph : SimpleGraph V
The underlying graph.
- ground : V
The ground vertex.
Edge colouring: assigns a colour/player (Left or Right) to each pair of vertices.
Every vertex incident to an edge is reachable from the ground vertex.
- supportFinset : Finset V
A finset witnessing the finiteness of the graph's support.
The supportFinset coerces to exactly the graph's support.
Instances For
The edge set of a Hackenbush position is finite.
The edge finset of a Hackenbush position's graph, derived from support finiteness.
Equations
- hack.edgeFinset = ⋯.toFinset
Instances For
The number of edges in a Hackenbush position.
Equations
- hack.edgeCard = hack.edgeFinset.card
Instances For
Ground component #
The ground component after removing an edge: the subgraph of G.deleteEdges {e} restricted to vertices reachable from the ground vertex. An edge {u, v}
is kept iff it was in G, it is not the removed edge, and both u and v are
still reachable from ground.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The support of a ground component is a subset of the original graph's support.
Reachability in G.deleteEdges {e} from ground implies reachability in the
ground component.
The ground component is connected.
Remove an edge from a Hackenbush position and take the ground component.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ground edges #
The set of p-coloured ground edges (edges incident with the ground vertex).
Equations
- hack.groundEdges p = {e ∈ hack.edgeFinset | hack.ground ∈ e ∧ hack.coloring e = p}
Instances For
The number of p-coloured edges incident with ground vertex.
Equations
- hack.groundCount p = (hack.groundEdges p).card
Instances For
A ground edge (other than the removed one) survives in the ground component.
Ground edges of the removed position = ground edges of original minus the removed edge.
Ground count properties under edge removal #
Ground count is preserved when removing an edge of different colour.
Ground count is preserved when removing a non-ground edge.
Removing a p-coloured edge preserves (-p)-coloured ground count.
For any p-move, the groundCount p of the result is ≥ groundCount p - 1.
Hackenbush game structure #
Moves in Hackenbush: remove an edge of your colour and take the ground component.
Equations
Instances For
The game graph whose moves are Hackenbush edge removals.
Equations
- GameGraph.hackenbush = { moves := MisereGames.Hackenbush.moves }
Instances For
Convert a Hackenbush position to a GameForm.
Equations
- hack.toGameForm = MisereGames.GameGraph.toForm hack
Instances For
The game form is zero iff the graph has no edges.
Existence of ground edges #
A p-move cannot lead to the zero game when groundCount p = 0.
Removing any edge preserves the zero-ness of groundCount p.
Stride theory #
When p has no ground edges, the position is solved for p.
When groundCount p ≥ 1, the position is not solved for p.
The p-stride of a Hackenbush position equals the number of p-coloured ground edges.
Equations
- MisereGames.Hackenbush.instRuleset = { toGameForm := MisereGames.Hackenbush.toGameForm, moves_toGameForm := ⋯ }
A star Hackenbush position over ℕ with l left ground edges and r right
ground edges. Ground vertex is 0. Left edges connect 0 to 1, ..., l.
Right edges connect 0 to l+1, ..., l+r. The colouring uses max u v (the
non-zero endpoint of each star edge) to determine colour.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The misère quotient of finite-star Hackenbush positions is equivalent to ℤ.
Instances For
The additive closure of Hackenbush positions has quotient equivalent to ℤ.