Scenario
Two players play the combinatorial game of Chomp on an m×n grid of chocolate squares. The bottom-left square (0,0) is poisoned. A legal move consists of choosing any remaining chocolate square (r,c) and removing all squares (x,y) such that x≥r and y≥c (the chosen square and all squares above/right of it). The player forced to eat the poisoned square (0,0) loses.
Your Task
- Classify Chomp as a finite, impartial game of perfect information with no draws.
- State Zermelo's Theorem on the existence of a winning strategy in two-player games.
- Use a strategy-stealing argument to prove that Player 1 (first mover) must possess a winning strategy for any grid size larger than 1×1.
- Implement a minimax retrograde game-tree solver to verify that Player 1 wins on a 2×3 grid.
Constraints
- Grid dimensions m≥2 or n≥2.
- Normal play / misère play convention.
Examples
For a 2×2 grid, Player 1 eats (1,1), leaving an L-tromino, and can always mirror Player 2's moves to win.