Chomp

An Intelligent
Chomp Player
Presenter: Alan Higby
Mentor: Dr. John Bonomo
Chomp: The Rules
• M x N board
• Top left piece is the poison piece
• By choosing any piece on the board, a
player must also take every other piece
below and to the right of that piece
A Sample Game
Poison
Piece
A Sample Game
Poison
Piece
A Sample Game
Poison
Piece
A Sample Game
Poison
Piece
A Sample Game
Poison
Piece
Chomp: The Initial Proof
David Gale’s Proof:
Player 1 takes the lower right piece.
2 possible scenarios:
1. This is the first move of a winning strategy.
2. Player 2 makes a move that is the first
move of a winning strategy, but the board layout
could have been attained by Player 1’s initial
move…
Chomp: The Proof’s Conclusion
Therefore, Player 1 ought to have a winning
strategy.
Notice though, that the proof says nothing as
to what this winning strategy is. This is
called an existence proof.
An Explanation of Terminology
• Winning board: any board which guarantees
a win for the player that just moved
• Losing board: any board that does not
guarantee a win for the player that just
moved
Winning Boards
Poison
Piece
Poison
Piece
Losing Boards
Poison
Piece
Poison
Piece
The Three Approaches
• Top-down exhaustive search
• Top-down exhaustive search, eliminating
duplication
• Bottom-up search built on known winning
boards
Approach #1
• Branching algorithm (minimax)
• All possible moves tried until winning
move found
Branching
Player 1
Player 2
Bounding
• Bounding a search tree is a method of
improving the efficiency of the search.
• To bound a search tree, one must be able to
identify scenarios which are not worth
pursuing.
The Bites Theory
• ‘Bites’ of a board: the minimum number of
moves to attain such a board.
• Proposed that any winning board would
have an odd number of ‘bites’
An Odd ‘Bite’ Board
Poison
Piece
An Even ‘Bite’ Board
Poison
Piece
A Counterexample
• To disprove the theory, a counterexample of
a winning board that had an even number of
‘bites’ needed to be found
• This is just such a board:
Approach #2
• Branching algorithm (minimax)
• Hash table used to store previously seen
boards
• Duplication eliminated
Duplication example
Initial board:
XXXX
XXXX
Possible move:
XXXX
X
Another possible move:
XXXX
XXX
XXXX
XX
XXXX
X
Approach #3
• Dynamic programming algorithm
• Knowing that the board consisting of only
the poison piece is a winning board, a set of
losing boards can be built from this
• To find the next winning board, simply find
the smallest board not yet accounted for
The First Winner
X (winner) leads to these losers:
XX
XXX
X X X X etc.
X
X
X
X
X
X
X
X
X
etc.
The Second Winner
• The next winner turns out to be
XX
X
• More losers are built from this winner, and
the process is repeated
First Revision
• The process of constructing losers can be
time consuming. Some recognizable
winners were checked for and losers were
not constructed from these.
• Stairstep board (separate slide with pic)
• Symmetric wedge (sep slide with pic)
Second Revision
• Any board that will be time consuming to
expand on is identified and future possible
winners are checked against these boards.
• (picture here of board with large loser set)
Third Revision
• Eventually, no losers are created. Instead,
winners are identified by the fact that they
are not one move away from a previous
winner.
Results
5x7
Approach 1
Approach 2
Approach 3
6x8
7x9
Results, continued
• Max size solved in 5 minutes, where board
size is in the form N x (N+2):
Approach 1
Approach 2
Approach 3
Possible Future Work
• Graphical Interface
• Neural Network Approach
Thank You’s
• Dr. John Bonomo
• Dr. C. David Shaffer