Assigned: October 28, 2008
Intent to REDO Due: November 4, 2008
Programming Due: November 11, 2008
The day before HW5 was due, a student's code was accidentally left in the public directory by the TA, and some of you have mistakenly thought that it was part of the support code. This is a regrettable accident, and we want to find the fairest way to resolve this dilemma. Here is how this problem will be handled:
The assignment is exactly the same as before, except for the following: instead of playing tic-tac-toe, you are now playing Connect n/2, a generalized version of the board-game Connect-4.
In the actual Connect-4 board game, each player is given a set of tokens, which s/he inserts into the top of a 7x6 grid. Due to the way the game is designed, the token can freely drop down due to gravity. The aim is to have four tokens lined up, which secures a win. In some cases, neither of the players lines up four tokens, and the game is a draw.
For our Connect n/2 homework, we have generalized the game, to make it very similar to our original n x n tic tac toe. In Connect n/2, we make the grid n x n, and to win a player has to have n/2 tokens lined up. So the board and goal are similar to the original assignment, just the legal moves and heuristics are different. A legal move consists of a player putting a token in any column that is not full. Once the token is put in the column, it will fall down to the lowest unoccupied row in the column.
As before, the support code written for this assignment lets you play two different programs against each other. You can find the new code here. Alternatively, you can get it on javalab at