Project 2: Adversarial Search

For this project, you will program an automated player for a 2-player zero-sum game of your choice. Good choices are tic-tac-toe, checkers, chess, go, connect four, or almost any abstract strategy game: a game with perfect information (the entire state of the game is available to both players), and no chance. Here's a list of more abstract strategy games.

What you need to do

First, choose a game. Try to choose a game where it is straightforward to adjust the branching factor and/or depth of the terminal nodes of the game tree. For instance, in tic-tac-toe, you can change the size of the board and how many X's or O's in a row you need.

Part A: Minimax

Write a player for your game that uses the (regular) minimax algorithm to play. Obviously, this player should play optimally. Because some games have very large search trees, this is where you can adjust the aspects of your game to make a full minimax search feasible.

Part B: Alpha-Beta Pruning plus Heuristics

Write a player for your game that uses the alpha-beta pruning version of the minimax algorithm to play. You will need to write an evaluation function as well, because for this part you should use a version of the game with a search tree that is too large for regular minimax. This may be the regular version of the game (e.g., checkers, chess), or you may need to "scale-up" your game to make it interesting (e.g., tic-tac-toe).

For this part, your player is not expected to play optimally, because your evaluation function may make mistakes. However, you should try to write a good evaluation function so the player plays well.

Part C: Random Player

Write a player for your game that plays randomly (just picks moves arbitrarily). It should not do the same thing in the same situation all the time; there should actually be some stochastic behavior.

Writeup

You will turn in your code, but also a writeup with the following:

What to turn in

Through Moodle, turn in your code, instructions on how to run your code, and your writeup.

Grading

You will be graded on correctness of your program, the quality of your evaluation function, and the thoroughness of your writeup.