Due Friday, May 11 at 11:59 PM via Blackboard. Please submit your code and write-up separately. LATE ASSIGNMENTS WILL NOT BE GRADED.

Relevant Reading

Chapter 5, Sections 5.1 to 5.3.

Assignment

You can work in pairs on this assignment. Each student must turn in their own, individual homework write-up along with the code.

YOUR CODE MUST BE RUNNABLE USING EITHER VISUAL C++ 2010 EXPRESS or PYTHON 3.2.2. DO NOT USE 2.x VERSIONS OF PYTHON.

Starter code

We've provided starter code that plays a basic version of the game.

C++ Starter Code

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

Python Starter Code

The Python starter code includes the same functions as documented for the C++ code above.

What to turn in

  1. Implement a tic-tac-toe program that uses Minimax and Alpha-Beta Pruning. See the implementation guidelines below. Include the following:
    1. (1 point) Your code
    2. (1 point) A output trace of your program in action, with the computer playing as the O player (moving second) in one game and the X player (moving first) in the other (each team member must do his or her own runs).
    3. (1 point) Describe who within your group performed which piece of the design/programming effort.
  2. Answer the following questions regarding your program. These answers should be succinct (two or three sentences each), but specific enough that we could almost re-implement your solution based on the answers.
    1. (1 points) Which part of your code generates the next ply, and how does it work?
    2. (1 points) What is your evaluation function, and why is it good?
  3. (1 point) How will you have to alter your code in order to play Othello? In about one paragraph, describe the changes you'll need to make and where these will occur in the code. Assume we will provide starter code that implements the basic rules of Othello, as we did for Tic Tac Toe.