||CS 391 Selected Topics: Game AI
First draft players due the beginning of class on Thursday 4/14. These
should outperform the SimpleGinRummyPlayer
draft players due the beginning of class on Thursday 4/28. These are your
final competition entries. You will present your work during class, including
your performance against the SimpleGinRummyPlayer and your 4/14 submission.
Note: This work is to be done in groups of 2. Each group will submit one assignment. Although
you may divide the work, both team members should be able to present/describe
their partner's work upon request.
Gin Rummy Competition
- Read the rules of
Gin Rummy from the
- Read the
design notes for AI Factory 7-card Gin Rummy AI players.
- Study our code base (distributed via email) and accompanying
- Create a uniquely named Gin Rummy player implementing the
GinRummyPlayer interface with an ability to be constructed with no parameters.
You will be provided with an implementation of a simple Gin Rummy player.
- Your player due on 4/14 should significantly outperform the given
SimpleGinRummyPlayer which ignores most game information.
- Your player due on 4/28 should be your best effort for tournament
You are not expected to compute optimal two player play. This
would require resources and time that far beyond the state of the art for
imperfect information games. Thus, this is a open-ended challenge to engineer your best
player given the time constraints of the assignment.
I recommend beginning with a simple player. Remember the
Consider what information you do have in this imperfect
- your cards,
- cards your opponent has drawn face-up from the discard pile,
- cards buried in the discard pile, and,
- derived from all preceding information, cards potentially still
in the draw pile or in your opponent's hand.
- Use this information to your advantage in the simplest ways at
Evaluation: Your player should be able to significantly outperform
The high variance of outcomes for small sample sizes will likely require
many games before distinctions can be made between players, so fast,
efficient players will be easier to demonstrate as superior to our
Thoughts on design
This is another open-ended assignment, inviting creative thought and good
engineering. Read what you can find online about Gin Rummy strategy.
One basic consideration is the number of deadwood points in your hand.
For example, how long into the game should one hold onto a pair of kings?
Even sets with great melding potential become dangerous if ranks are high and
many turns have passed.
Another basic consideration is the number of cards still potentially
available that could complete melds in your hand. Certain card combination
patterns allow more melding possibilities than others, although what is known
about card availability must be taken into consideration.
What can be easily inferred about the state of the opponent's hand?
How does this affect discard choices?
This assignment is open-ended as long as your player can play an entire game
against itself in less than 1 second. This will allow us to easily have a
tournament with 1000 or more games per match.
Your player should also not use more than one-third of the default Java heap
for dynamic memory allocation or more than half of the available cores.