A Connect Four player

The problem

Build a program that plays Connect Four well, using depth-limited minimax with alpha-beta pruning and an evaluation function, and show how strong it is.

Requirements

Technologies

Step by step

  1. Write the board, move generation and win detection, with tests for every direction of four in a row.
  2. Add plain minimax at a small depth and check it never misses a win in one move.
  3. Add alpha-beta pruning and confirm it chooses the same moves while visiting fewer positions.
  4. Write the evaluation function and tune its weights by playing matches.
  5. Add move ordering and iterative deepening with a time limit.
  6. Run matches and write up the results.

Expected result

A Connect Four program that beats a random player every time and explains its search with position counts.

How it is evaluated

Ways to improve it