2AIT614 Artificial Life and Computer Games Referred-Deferred Coursework 2 Due Thursday 14th August 2008 The goal of this course work is to implement a 5X5 grid version of Tic-Tac-Toe (Noughts and Crosses). The following site will allow you to play a version of this game: http://boulter.com/ttt/ In the implementation of the game on the above site any player who gains possession of 3 consecutive squares in a row, either horizontally, vertically or diagonally wins. In order to simplify your version of the game only horizontal or vertical rows win the game. Possession of three diagonal squares does not win the game and need not be checked for in the implementation. You need only implement a simple character based interface of the following type, where + represents an unoccupied square:
1 2 345 A +++++ B +++++ C +++++ D +++++ E +++++ Player 1 move? B2 1 2 345 A +++++ B +x+++ C +++++ D +++++ E +++++ Player 2 move? C2 1 2 345 A +++++ B +x+++ C +0+++ D +++++ E +++++
And so on.
Your implementation should allow either two human players to play the game or a human to play the computer. The program should play the game “intelligently”, not just picking legal moves at random but applying whatever techniques you feel are appropriate in order to play the game to win. Your report should describe the techniques you have implemented in order to allow the program to play the game intelligently and discuss any techniques that you feel would be useful but you have not had time to implement. You must implement this program in C++ and it must compile and run on Microsoft Visual Studio. You may be required to demonstrate your program. If this is required the Demonstration will take place on Monday 1st September 2008. You will be notified via email if a demonstration is necessary.
Hand In
To the Undergraduate Office A printout of the source for your code. Your Report. A CD containing your full Visual Studio implementation including all source code
THIS IS AN INDIVIDUAL EXERCISE. YOU MUST NOT COLLABORATE WITH YOUR FELLOW STUDENTS. IF THERE IS ANY SUSPICION THAT THE WORK HANDED IN IS NOT ENTIRELY YOUR OWN IT WILL BE PASSED DIRECTLY TO THE ACADEMIC STANDARDS REGISTRAR FOR INVESTIGATION AS A POSSIBLE CASE OF PLAGIARISM