Anteater Chess

A chess variant in C, the first EECS 22L project.

TYPE
Course Project
YEAR
2026
ROLE
Algorithm developer
STACK
C · GTK 3 · Make

About the project

Anteater Chess is the team project from EECS 22L: a chess variant on an 8×10 board that adds two anteater pieces to standard chess. The team had six people, and the game uses a GTK 3 GUI, with clocks, move history, hints and undo. I was responsible for the bot’s algorithm; the board, rules and interface were built by my teammates.

The engine is a C file of a little over two thousand lines. At its core is iterative deepening alpha-beta: each iteration opens a narrow window around the previous score, positions already searched go into a transposition table, and null-move pruning plus quiescence search keep the tree small. Move ordering relies on killer moves, history scores and static exchange evaluation; the good moves have to be searched first for the pruning to bite. The difficulty levels and the hint button in the interface all run this same search. The only difference is how much time it gets, and it returns the best result found so far before the time runs out.

The tournament rules give each side 10 minutes. After many rounds of self-play I settled on a budget of about 10 seconds per move. How deep those 10 seconds reach depends on how efficient the pruning and move ordering are, so that is where the optimization effort went: search deeper in the same time and the difference shows in play. To get there we used the smallest numeric types we could and avoided copying wherever possible. The engine finished second in the course tournament, tied with first place; against an opponent that strong, a draw was all either side could manage.

The variant itself is not that different from a standard board, but the new pieces have no reference values anywhere, so theirs had to come out of several rounds of tuning. By the final numbers, the mascot piece turned out to be worth less than a single pawn, which is a little sad.

My part

  1. 01

    Search

    Alpha-beta search with null-move pruning and quiescence search.

  2. 02

    Evaluation

    Material combined with phase-dependent piece-square tables, plus several positional terms such as mobility, king safety, ant structure and open files. The values of the new pieces were confirmed and tuned through a lot of self-play.

  3. 03

    Time management

    The search was optimized to reach deeper iterations in less time. Within the tournament's 10 minute limit, that works out to a budget of about 10 seconds per move.

Search

Quick actions