Due Sunday, June 9 at 11:59PM via Blackboard. Submit your report in PDF, and submit your code in a separate .py or .cpp file.

Assignment

This assignment can be performed in pairs. The code for this assignment will be written by the team; however, each student must turn in their own homework write-up, so each team member is responsible for understanding all key pieces of the code and producing the example boards (question 2).

C++ Starter Code

The C++ starter code includes the following key functions:

Python Starter Code

The Python starter code includes the basic functionality of Othello. Each function in the code includes comment that describes its purpose, inputs, and outputs.

IMPORTANT: This Othello.py starter code changed on 6/6/2013 to standardize the order of the row and col arguments in each function. If you do not want to move to the new starter code, that is okay but you MUST update the play_square function to the proper argument order so that our matchmaker will call your code correctly. The order should be play_square(self, row, col, player, opp).

Also, the Python code board is 0-indexed, so 0,0 is the upper-left corner of the board.

The above Othello.py player was distributed initially, but does not include the functionality to return its move as a return value. An example of a player that does include that functionality can be found in TeamA.py.

Key Requirements

Note that following requirements are very important for the tournament. Please try your best to stick to them.

Hint: To test your play_square() works properly, create two instances of the game in the main function and have two instances of your program play against each other, by wiring them with a loop.

What to turn in

  1. Extend your tic-tac-toe program to play Othello. Turn in the following:
    1. (3 points) Your code
    2. (1/2 point) Describe who within your group performed which piece of the design/programming effort.
  2. Answer the following questions regarding your program. These answers can be brief (about two or three sentences for a-c).
    1. (1/2 point) What did you do to try to make your Othello player good?
    2. (1/2 point) Describe your evaluation function.
    3. (1/2 point) How did you alter your code to execute moves within the time limit?
    4. (2 points) Provide three example boards, one in which the white player has an advantage, one in which the black player has an advantage, and another in which it's fairly even. Give the evaluation function value for each case, and a one sentence explanation why the value makes sense.