Assignment 3: Othello


Screen Shot 2014-01-31 at 11.14.45 PM.png

=

Information

The Othello assignment is to write an AI that plays the game Othello. You can find the rules for Othello here.

Your AI will be queried once per turn for a move, You have 3 seconds to calculate your move. For every 10 seconds over you take making your turns, you lose 1 point from your final score.

Your AI should use a negamax tree like was discussed in class to make your move. It is recommend you use pruning and some form of iterative deepening to get good results within your 3 second time limit. For designing your move scoring, you can find Othello strategy guides on the web.

For more information on negamax and iterative deepening you can look in Millington or Buckland, as well as this web page:
Negamax on Wikipedia

Developing your AI


Readying your development environment


First download Unity3D 4.3 or later. You may use the PC, OSX or Linux versions.
If you do not have it you can get it here:
Unity3D Download

After you install Unity you will need to make an account. If you like you can then select the 30 day pro trial or the free Community version. Everything we do in class you will be able to do with the free version.

Note that if you try Pro you will be have to be careful not to use pro features in personal projects you wish to save unless you intend to buy a license. If you would like a 1 year academic student license to Unity Pro, you can get that for about $150 here:
Unity Store at Studica.com

Once you have Unity installed, you will need the Othello project. Download it from the link below:





After you have it downloaded the project, unzip it someplace safe and then start Unity. After the initial welcome and licensing screen you should see a chooser that looks like this:

Screen Shot 2014-01-28 at 5.21.57 PM.png
Screen Shot 2014-01-28 at 5.21.57 PM.png


Make sure you have the Open Project tab selected at the top.

Click Open Other... and you should see a dialog that looks something like this:

Screen Shot 2014-02-02 at 2.41.24 PM.png

Navigate to where you unzipped the Robotanks folder. Select it and click Open and after a bit of loading you should see this:
(Note that the dark theme of the windows is pro mode, your will probably be lighter grey.)
Screen Shot 2014-02-02 at 2.43.50 PM.png

If you do not see the game board then you do not have the scene open yet. In that case, select the Assets window in the Project pane on the bottom left of the screen and you should see the Game Scene object to open in the Assets window like this:
Screen Shot 2014-02-02 at 2.46.55 PM.png

You can press the play icon at the top of the Unity window and watch the default Ai play (it isn't very good).

Writing your Negamax tree search


In the assets folder you will see a script called "StupidPlayer". This is an AI that makes random moves. However, it illustrates how your AI will be called, how to work with the game board, and how to return your move.

Screen Shot 2014-02-02 at 2.50.39 PM.png


Screen Shot 2014-02-02 at 2.55.39 PM.png

Just like in the Robotanks game, the script is made available to the game by assigning it to a prefab. The prefab is simply a GameObject that has your AI class as its only component.

Write your negamax code in the method
public override OthelloGame.BoardPosition nextMove(GameBoard game)


Use the game board passed into you and use its Clone method as you descend the tree trying different moves. DO NOT MODIFY THE BOARD THAT IS PASSED IN To YOU, ONLY IT'S CLONES.

To test your AI, make a prefab out of it and then drop it in one of the slots in the PlayerPrefabs list which is part of the Othello Game component on the Checker Board game object.