A tiny implementation of the game Connect Four (a.k.a. Four in a Row), featuring a command-line interface and a computer player. The primary purpose of the project is to explore search algorithms. The computer player uses the negamax variant of an iterative deepening depth-first search with alpha-beta pruning, move ordering, and transposition tables. The computer player relies only on very simple board evaluations in contrast. Hint: if you want to win against the computer player, do so in the early stages of the game when the computer player is not able to completely compute the remainder of the game.
Pictures / Screenshots
Clone the c4nnect repository.
hg clone https://bitbucket.org/jeadorf/c4nnect
cd c4nnect mkdir build cd build cmake .. make
Run the game with
Run the tests with
cd build make test
Please let me know in case of problems.