CSD 4040: AI Home Page
Middlesex Logo

CSD 4040 AI Course Work

Due Feb 29th at Midnight.

Submit to the student office (library), but you can email me a copy too. I'll try to get them back to you by the last lecture.


This coursework revolves around the Connect 4 game. You'll implement a game, do some analysis of the game, and do some machine learning from a dataset based on the game.

Marking scheme

10Self marking sheet and description.
15Two Player Game
20Game against agent (or two agents).
20Machine learning game.
20Analysis of play.
15Best game.


You need to make a connect four game. It's all pretty flexible, but to get the full marks you'll have to follow some constraints.

Firstly, you need to make a connect four game where two users play each other. To get the full marks for this component you need to write it yourself. If you take some (or all) of the code from somewhere else (including Chris' code), you will get only partial credit for this component. Please state in the marksheet if you take code from elsewhere (and where you took it from). Note you can write this in any programming language you like, but you'll need Java for the best game mark. Also note that you're not marked on the quality of the interface, just on whether it works.

Add a mode where the user plays against an agent. The better your agent, the better the mark. A simple random agent should get 5 points.

Somewhat independently of your game program, you need to do some machine learning on this data set. Use the connect-4 data from lab3, either the connect 4 data in xl. ( My server doesn't serve up .xlsm files so it's a .txt file. Just save it as connect-4.xlsm) or you can get the data right from the University of California at Irvine's site. All I did was take every other line with the odds being the train set and the evens the test set.You can pick any algorithm you like. You can implement the algorithm yourself or take the code from elsewhere. You need a 2-fold test with results and an explanation of your work. The explanation should be about a page.

Similarly, somewhat indpendent of your game program, you need to describe the state space. Apparently, this game is always winnable from the first move. Explain how.

Finally, there will be a tournament between the agents. Agents will play each other. The best agent will receive these 15 points. To compete in this, you'll need to submit a java agent class. It needs to be a subclass of the connectFourAgent from lab 2 and use the connectFour api. Note if several agents all play perfectly, they all will receive these marks.

Finally, you'll ned to make a self-marking sheet. Please tell me what you think you deserve for each component. If you're honest (even if you're wrong), this should be an easy 10 points. It should take no more than a page.