"turds together strong 💩"
Winning bot of the CS 3600 Fall 2025 ByteFight Competition (1952 ELO)
A 2-player chicken game on an 8×8 board. Each chicken tries to lay more eggs than its opponent in 40 turns while avoiding opponent eggs, turds, and trapdoors. On each turn, a chicken moves one square in any cardinal direction and can perform a Plain, Egg, or Turd action (each chicken can only drop 5 turds). Stepping on a trapdoor teleports the chicken back to its starting square and gives the opponent 4 bonus eggs.
StockChicken uses expectiminimax to determine actions, using trapdoor probabilities based on Bayesian Statistics. Trapdoor probabilities are only evaluated to depth 5 since trapdoor probabilities are much more uncertain beyond 2-3 moves.
StockChicken uses a relatively simple heuristic of:
Where potential is the sum over all BFS reachable squares where an egg can be laid:
Laid eggs are weighted with the maximum possible potential value for an egg (ie when distance is 1). The intuition for this heuristic is that eggs closer to the chicken should be more heavily weighted than distant eggs, scaled by how many turns are left in the game. If an egg is farther away than there are turns left, the weight is < 1.
Zobrist Hashing to cache evaluated positions
StockChicken uses the following exponential formula to allocate the time per turn and uses 350 out of the 360 allowed seconds per game.
Bot versions are labeled alphabetically in chronoligcal order:
- Alex - Initial bot using minimax and a very simple heuristic.
- Beckman - Minimax bug fixes and a new heuristic that introduces a sense of map control
- Charlie - First bot to use the potential-based heuristic.
- Dayes - Added Bayesian trapdoor tracking. Evaluated trapdoor within the heuristic
- Emmet - Switched from minimax to expectiminimax and added Zobrist hashing. (FINAL SUBMITTED VERSION)
- Frank - Performance optimization over Emmet (~4x speedup). Only saw a marginal competitiveness boost over Emmet
- Lee - Experimental bot using voronoi-based heuristic
Target - A bot that moves back and forth used for testing a bot's ability to "trap" their opponent
A test script, run_tournament.py was also created to run multiple matches locally and concurrently. Each bot is guaranteed to start first 50% of the time.