GAME AI / SEARCH
CONNECT4 AI
A move is a small decision inside a much larger tree.

01 / THE PROBLEM
Search the game tree. Choose the next column.
A Connect Four player needs to look beyond the immediate move, compare possible replies and score positions before the full game tree becomes too large to search.
02 / THE APPROACH
How the system fits together.
The pinned university project includes a Java player that searches to a configured depth with minimax and alpha-beta pruning. Its evaluation checks winning outcomes and scores horizontal, vertical and diagonal board patterns. The repository credits the player to Pau and a collaborator.
Current board → legal column choices
Candidate move → copied game state
Replies → depth-bounded minimax
Alpha / beta bounds → pruned branches
Position patterns → heuristic score
03 / ENGINEERING DECISIONS
Spend search effort where it matters
Alpha-beta bounds stop exploring branches that cannot improve the current choice, while depth limits keep the search bounded.
Evaluate positions before they are decided
A board heuristic scores promising runs in each direction; terminal wins and losses receive decisive values.
CURRENT SCOPE
Collaborative coursework rather than a deployed game product. The pinned source includes a supplied course game library; PAU.OS links to the repository but does not copy or redistribute its code or bundled materials. No runtime or strength benchmark is claimed.