A position in Generalized Geography: the current vertex (whose owner is about to move) together with the set of already-visited vertices.
- current : V
- visited : Finset V
Instances For
Update a position by moving the token to next, marking it visited.
Instances For
The "has winning strategy" relation for Generalized Geography. HasWinningStrategy G pos b
holds when the player whose turn it is (b = true for Player I, b = false for Player II)
has a strategy to win from position pos:
- Player I (
true) wins by choosing some valid move leading to a position where Player II loses. - Player II (
false) wins immediately if the position is stuck (Player I cannot move), or if every valid move by Player I leads to a Player-I-winning position.
- playerI_moves {V : Type u_1} [DecidableEq V] {G : Digraph V} {pos : Position V} {next : V} (hmove : ValidMove G pos next) (hwin : HasWinningStrategy G (makeMove pos next) false) : HasWinningStrategy G pos true
- playerII_stuck {V : Type u_1} [DecidableEq V] {G : Digraph V} {pos : Position V} (hstuck : IsStuck G pos) : HasWinningStrategy G pos false
- playerII_moves {V : Type u_1} [DecidableEq V] {G : Digraph V} {pos : Position V} (hnotStuck : ¬IsStuck G pos) (hwin : ∀ (next : V), ValidMove G pos next → HasWinningStrategy G (makeMove pos next) true) : HasWinningStrategy G pos false
Instances For
The initial position of the game starting at vertex s, with s already visited.