Heirs Game Agent
Overview
Heirs Game Agent is my submission for USC CSCI 561 (Foundations of Artificial Intelligence), Homework 2 — a strategic board game called Heirs. The program reads tournament game states from input.txt and writes the chosen move to output.txt under strict time limits. The agent uses depth-limited minimax with alpha-beta pruning, iterative deepening, and aggressive move ordering, and placed 4th out of 201 students in the class competition.
Duties
- Designed and implemented a complete game-playing agent in C++ for the Heirs ruleset and Vocareum tournament protocol
- Built minimax search with alpha-beta pruning, principal variation search, iterative deepening, and quiescence search
- Tuned move ordering (transposition table moves, killers, history, countermoves, capture SEE) to reach deeper searches within time limits
- Implemented time management that adapts search depth to remaining clock and opponent pacing
- Added incremental Zobrist hashing, transposition table bounds, and incremental evaluation for high node throughput
- Handled draws, repetitions, and the 50-move rule with context-aware terminal scoring
- Iterated on search speed over heavy heuristics after profiling showed depth mattered more than evaluation complexity
Gallery
Heirs — strategic board game of youthful royalty (assignment overview)
Process
Development focused on measurable tournament impact: each technique was added or removed based on whether it improved practical depth and win rate. The assignment spec defines Heirs as a strategic board game played under automated grading on Vocareum; the agent must parse standardized input and emit a legal move within the allotted time.
The final implementation prioritizes fast make/unmake, fixed-size data structures, lightweight evaluation (material, prince safety, mate/draw awareness), and selective extensions such as late move reductions and root guards for prince-race endgames. ChatGPT assisted with planning and implementation iteration, consistent with course guidelines.
Artifacts: Assignment description PDF · GitHub repository