Misere combinatorial games.
Push #
Push is played on the same horizontal strip of squares as Shove (see
Strip.Piece), and a move again consists of choosing one of your pieces and
sliding it one square to the left. The difference is that in Push only the
adjacent run of pieces moves: the movement stops at the first empty square to
the left of the chosen piece, which gets filled. If there is no empty square to
the left, the leftmost piece falls off the board, exactly as in Shove.
In terms of the shared Strip primitive shiftDown, the Push move pushing the
piece at position n is shiftDown b g n, where g is the position of the
first empty square to the left of n (Push.startPos), or 0 if there is
none. So Push is the Strip ruleset whose shift anchor start is the
rightmost gap below n.
A Push position is a strip board (a function from positions to pieces with
finite support).
- toBoard : Strip.Board
The underlying strip board.
Instances For
The anchor of a Push move at position n: the position of the rightmost empty
square strictly to the left of n (the "gap" the adjacent block slides into),
or 0 if there is no empty square to the left.
Equations
- MisereGames.Push.startPos b n = Nat.findGreatest (fun (j : ℕ) => b.board j = MisereGames.Strip.Piece.none ∧ j < n) n
Instances For
Push is the Strip ruleset whose shift starts at the rightmost gap below
n: pushing the piece at position n slides only the contiguous block of
pieces adjacent to n into the first empty square to its left (or drops the
leftmost piece when there is no gap).
Equations
- One or more equations did not get rendered due to their size.
When there is an empty square to the left of n, the Push anchor is itself an
empty square: the adjacent block slides into it. This is what makes Push "stop
at the first empty tile".
The GameForm of a Push position.
Instances For
The misère quotient of Push is isomorphic to ℤ.