Overview
A Java Swing application that plays a modified Connect 4 with adversarial search: minimax with alpha-beta pruning and a transposition table, a human mode, and agent-versus-agent tournaments.
The strongest agent explores the game tree assuming the opponent plays optimally, prunes the branches that cannot change its decision, and stops at a depth where a heuristic scores the position instead. A transposition table keeps positions that can be reached by different move orders from being searched twice.
Alongside it the application ships a spectrum of weaker agents, from trivial to probabilistic. That is what the tournament mode is for: an agent that beats a human once has proved nothing, and playing every agent against every other one is the only claim about strength worth making.
Project 6 of 7 for the Advanced Algorithms course at the Universitat de les Illes Balears, the one on adversarial search.
javaadversarial-searchgame-ai