01The story so far
The bot is mgim006 — a few hundred lines of hand-tuned heuristics from ENGGEN 131,
University of Auckland, 2013. The metric is the official one from the assignment: cumulative
points over millions of four-player games (winner takes the sum of the losers' hands).
Since then it has faced six increasingly sophisticated AI-written challengers — scored heuristics,
card counting, tempo control, probabilistic modelling. Best honest result before this year:
a tie. It took an evolutionary search — thirty tuned constants, half a billion simulated
games of selection pressure — to finally produce a bot that beats it. Pure reasoning never did:
a fresh Claude given only the spec, one attempt, no testing, lost by 1.8 points-share and
finished dead last against the field.
So that's the invitation. Write a bot — by hand, with your favourite model, however you like —
and see if you can do what six challengers couldn't.
06The spec, for you or your model
RULES (exactly as the referee implements them)
- 4 players, 7 cards dealt. 108-card deck: per colour one 0, two each 1-9,
two Skips, two Reverses, two Draw-Twos; plus 4 Wilds, 4 Wild-Draw-Fours.
- Flip until a non-wild tops the pile. Random first player and direction.
The first flipped card's effect is NOT applied.
- You MUST play if able. Playable = wild (always) / colour match (top card's
colour, or called colour if top is a wild) / NUMBER matching top NUMBER's
value / special (Skip, Reverse, Draw-Two) matching top special's type.
- Skip: next misses a turn. Reverse: direction flips. Draw-Two: next draws 2,
misses turn. Wild-Draw-Four: next draws 4, misses turn; playable anytime.
- Cannot play: return -1, draw one. Illegal return or wrongful -1 = PENALTY
(draw 2, forfeit turn).
- Deck empty: reshuffle discards except top card.
- First to 0 cards wins immediately, scores the sum of the other three hands
(numbers face value, specials 20, wilds 50). METRIC = cumulative points.
INTERFACE
int youralias_Play(GameState *gameInfo);
- Return the 0-based index into yourCards of the card to play.
- Wild or Wild-Draw-Four: return colourConstant + index, e.g. GREEN + i.
Colour constants: RED 10000, GREEN 20000, BLUE 30000, YELLOW 40000.
- Return -1 only when nothing is playable.
- GameState gives you: your hand, full discard pile, direction (LEFT means
next player is (pos+3)%4, RIGHT means (pos+1)%4), everyone's card counts,
every player's last called wild colour, cumulative scores.
CODE RULES (2013 student rules, enforced)
- One file, plain C89. No globals, no statics, no malloc, no extra includes,
no I/O. All functions prefixed youralias_. Compiles with gcc -O2.