Skip to content

Winning bot of CS 3600 Fall 2025 ByteFight Competition

Notifications You must be signed in to change notification settings

BANANAPEEL202/StockChicken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StockChicken

"turds together strong 💩"

Winning bot of the CS 3600 Fall 2025 ByteFight Competition (1952 ELO)

Screenshot 2025-12-09 at 6 40 47 PM

Game Summary

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.

Major Components

Expectiminimax

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.

Heuristic

StockChicken uses a relatively simple heuristic of:

$$ \text{value} = (\text{my eggs} - \text{opponent eggs}) \cdot \text{turns remaining} + \text{my potential} - \text{enemy potential} $$

Where potential is the sum over all BFS reachable squares where an egg can be laid:

$$ \text{potential} = \sum_{i, j \in \text{reachable}} \text{turns remaining} / \text{distance(i, j)} $$

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

Zobrist Hashing to cache evaluated positions

Timing

StockChicken uses the following exponential formula to allocate the time per turn and uses 350 out of the 360 allowed seconds per game.

$$ \text{time per turn} = 26.2 \cdot 0.93^{\text{turn number} - 1} $$

Development

Bot versions are labeled alphabetically in chronoligcal order:

  1. Alex - Initial bot using minimax and a very simple heuristic.
  2. Beckman - Minimax bug fixes and a new heuristic that introduces a sense of map control
  3. Charlie - First bot to use the potential-based heuristic.
  4. Dayes - Added Bayesian trapdoor tracking. Evaluated trapdoor within the heuristic
  5. Emmet - Switched from minimax to expectiminimax and added Zobrist hashing. (FINAL SUBMITTED VERSION)
  6. Frank - Performance optimization over Emmet (~4x speedup). Only saw a marginal competitiveness boost over Emmet
  7. 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.

About

Winning bot of CS 3600 Fall 2025 ByteFight Competition

Resources

Stars

Watchers

Forks

Languages