IMGD 4000 (D 10)
Individual Homework Assignment #3
Due by Web Turn-In: Midnight, Wednesday, March 31
(See general homework instructions for turn-in details.)
The goal of this third assignment is to add an AI opponent to your chess game. "Shallow Blue" is a pun on Deep Blue, the IBM computer chess system which beat the reigning world champion in 1997.
Please post any questions to the myWPI discussion board for the course.
- Use the NegaMax with Alpha-Beta Pruning algorithm discussed in class and in handout from Millington, Section 8.2.
Hint: For information about static evaluation functions in chess, see articles at gamedev.net and GNU.
Hint: To avoid the AI playing exactly the same game over and over (b-o-o-oring!), consider introducing the Collections.shuffle() method at appropriate points, e.g., before searching the next moves at a given level, so that when the evaluations are tied, a different move is sometimes chosen. Make sure you use a random seed, so that play is reproducible for debugging purposes.
Hint: Some students have found it helpful to first implement a "random legal move" AI to get the modularity right, and then to replace the random move choice with the NegaMax search.
- For simplicity, assume the human player always plays white (and thus goes first).
- Provide a maxDepth (int) parameter to the AI search, settable from the command line.
Hint: Use Integer.parseInt to parse command line argument.
- Include at toplevel in your uploaded jar file the following two chess logs generated by the system. (You may set the maxDepth as necessary to achieve these results).
- A game in which the player wins.
- A game in which the AI wins or the game is a stalemate.
- Hint: The file 'shortest_checkmate.log' at toplevel in the chess project folder shows the shortest possible (checkmate) chess game.