Wiki

Clone wiki

c4nnect / Home

c4nnect

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

Rendered board positions and screenshot of command-line game

Installation

Clone the c4nnect repository.

hg clone https://bitbucket.org/jeadorf/c4nnect

To build

cd c4nnect
mkdir build
cd build
cmake ..
make

Run the game with

build/c4nnect

Run the tests with

cd build
make test

Troubleshooting

Please let me know in case of problems.

Updated