Description
Project Goals
The project is designing and implementing a system that plays Connect-N. The objective of Connect-N is to get N checkers in a row vertically, horizontally or diagonally. Your program will have to use the minimax algorithm and alpha-beta pruning to determine the best move. A variant of the Connect-N game is the Connect-four game. The task in Connect-Four is thus to get 4 checkers in a row. Connect-four is an interesting game in the sense that it is easy to understand but can involve techniques such minmax and alpha beta pruning that can provide a very interesting introduction to search and decision strategies in two player games. Connect-four was first sold in 1974 and solved mathematically by Dr Victor Allis in 1988. The broad goal of this project is to motivate search and game playing in AI. To get an intuition about how Connect-four works (and thus connect-N), you are encouraged to play this game. It must be implicit that the difficulty level (beginner, medium, hard etc) in this game is a function of better strategies for making the next move. This project should be done in groups of two. If you really don’t want a partner, you can do it alone. Please turn-in only one solution per group. (When turning in group work, make sure all the partners names on one everything turned in. ) |
Game Description
From the link to the game above, the rules must be somewhat clear. However here is a description of the rules.
Make sure you hand in a simple report that explains you attempt to test something empirically.
You are provided with a .zip file that contains an eclipse java project. This project has a referee class with a main method that you will run when testing your program.
The project has an abstract class called “Player”. You will create a class that extends player. This class is what you will initialize in the referee and what will be prompted for moves.
In the project there is also an abstract StateTree class. This class stores information relating to the state of the game. A simple class called RefereeBoard which extends this class is used by the referee to keep track of the board.
An instance of RefereeBoard is passed to the player as a parameter of the getMove method in player. This is how your code will get information on the current state of the game.
In the project there is a Move class. An instance of this class is returned by the getMove method of the Player class which informs the Referee of what move your player would like to make. In the project there is a class called SimplePlayer which provides a basic example of how a player would make decisions. Your player class will have a much more complex getMove method because you have to build a tree and min-max and alpha-beta prune.
|
Test Your Player
To test your player you can initialize your player as “player1” and/or “player2” in the Referee class, change any of the starting parameters as you see fit (rows, columns, N, timeLimit), then run the referee. The console should display the board state and information on what move your players tried to make and how long it took.
|
Tournament
Empirical Valuation
We want you to do some experiment where you quantitatively evaluate an idea of yours. It could be comparing evaluation functions. It could be using an opening book, or decided to use memory to memorize states, or explore issues around the operation done each time. For this please explain in detail what you compared, and provide some empirical basis upon which you decided whether it was good, or not, or that your data could not tell you reliable.
If you forget your stats take a look at this https://www.youtube.com/watch?v=pTmLQvMM-1M as its really important to me that you know if your results are reliable or not.
|
Report Submission
For the due date see the class schedule.
Submit your solution via canvas. All the files should be compressed in .zip format (Please do not use other formats). Name of the project should ($username)_project1.zip and if you are working in a group your file name should be ($username1)_($username2)_project1.zip. You will lose 10 point for a wrong name.
Your .zip file should contain only your player and all the helper classes used by your player. When grading, the Referee, RefereeBoard, Player, StateTree and Move classes will be used as they were provided to you. So don’t create a player that relies on a different version on any of those classes.
Please name your classes something unique (like putting your initials at the end of every class you make) that way during the tournament we don’t run into an issue where two player have the same name.
|
Grading
100 Points Total
20 points: Minimax Implementation 20 points: Alpha Beta Pruning
20 points: Heuristic Evaluation Function
10 points: Describe an experiment you did. That could be comparing different evaluation functions. Your grade will depend on the quality of your explanation not on whether your idea panned out.
30 points: Referee Interaction and Documentation. Implementation following the instruction in “Test your player section”. Your code can be run by the grader according to your documentation without extra work.
|