CS470/570
Aritificial Intelligence
Spring 2008
Project #2, Part A
Due: Monday, Febuary 25th

Connect Four is played on a vertical board with 7 columns each 6 positions high . Players alternate dropping different colored pieces into one of the 7 columns. Once a column is filled (i.e. six pieces have been dropped into it) that column is no longer a legal move. The goal is to get four pieces in a row; either vertically, horizontally, or diagonally. It is possible for the game to be a tie, if the board is filled without anyone connecting four pieces. This is a relatively easy game for computers because of the low branching factor.

Project, Part A: Write a program that allows two humans to play Connect Four on the computer. This is simply the starting point for Project 2. The next step will be to replace one of the human players with the minmax algorithm described in the full project hand-out.

Requirements: The program must display the board after each move. (This can be a simple text based display.) The program must not allow illegal moves. The program should recoginize and report a win or a draw if either one occurs.

Hand-In:

  1. Output showing the first few moves of a game.
  2. Output showing how illegal moves are handled.
  3. Output showing a victory.