CSCI 335 - Programming Project #3: Checkers
Fall 2017
Due: Tuesday, September 19, 1:15 pm
Overview
You will develop an intelligent AI for the game of Checkers. You will implement
alpha-beta search as well as some customized board evaluation functions.
Setup
The Java source files are provided in checkers.zip.
To set up the files in Eclipse, do the following:
- Place the files into your current project.
- Place checkers.zip inside your project
src
directory, and unzip the file.
- Click on your project in the package explorer, and press F5 to refresh.
- The files should now be there.
Programming Assignment
The files are placed in three packages.
-
checkers
-
AutoCheckers.java
is a GUI that can run exprimental
tournaments to compare the ability of different AI players.
-
Checkerboard.java
represents a checkerboard. Key methods
include (but are not limited to):
-
getLastMove()
: Returns the last move played on this
Checkerboard.
-
gameOver()
: Returns true if the current player to
move has no legal moves.
-
getCurrentPlayer()
: Returns an integer designating
the player who is about to move.
-
playerWins()
: Returns true if the specified player
has won the game.
-
getNextBoards()
: Generates every possible successor
board given the current position.
-
numPiecesOf()
: Returns the number of pieces in play
for the specified player.
-
opponent()
: Returns an integer designating the
opponent of the specified player. (static method)
-
Checkers.java
is a GUI that allows a human to play
against either another human or a computer opponent. To move a checker,
click and drag it to the target location.
-
EvalFunc.java
is an interface that your board evaluation
functions will implement.
-
Searcher.java
is an abstract class that your search
algorithms will extend.
-
Move.java
describes a game move from one location to
another.
-
MoveScore.java
pairs a Move object with a value for
applying that move. It is the value returned from Searcher objects.
-
checkers.evaluators
is where you will place your board evaluation functions that implement the EvalFunc
interface. A dummy evaluation function that rates all positions equally (NoPreference.java
) is included as an example.
-
checkers.searchers
is where you will place your search algorithms that extend the Searcher
class. A dummy search algorithm that
picks a move at random (OnePlyShuffle.java
) is included as an
example.
Requirements
- Implement a basic material board evaluation function. It should subtract
the number of pieces the opponent has from the number of pieces the
current player has, and return that difference.
- Implement NegaMax search. Determine the depth it can generally reach in
about ten seconds of time. This number will vary considerably based on
the specifics of the board position, so for this purpose try to figure out
what the worst case is like.
- Play agains the program. Assess its performance subjectively. In your
asssessment, use concrete examples of its play.
- Use AutoCheckers to run your NegaMax player with the basic material
evaluator against a random player 32 times. Assess its performance.
- Make a copy of your NegaMax searcher, and modify it to implement
alpha-beta search. Determine the depth it can generally reach in about
ten seconds of time. Assess the improvement.
- Play against the alpha-beta searcher with your basic evaluation function
but the increased search depth. Again, subjectively assess its performance.
- Having evaluated your player, attempt to improve the evaluation function.
Then evaluate it again as you did for the first function. In addition,
use AutoCheckers to compare your first and second evaluation functions.
- Attempt to improve your search algorithm. The requirement is to
perform two modifications, but you may choose more if you would
like. You may choose to do any of the following:
- Extend the search with the search-until-quiescent strategy
- Extend the search with a singular extension
- Create a database of solved endgame positions
- Create a database of openings
- Implement a transposition table
- Implement an ordering heuristic
- Perform any other modification of your choice
- Your modification must be approved in advance by the instructor if it is not one of the two required modifications.
- There is no need to discuss with the instructor additional modifications beyond the first two.
- Continue to modify both the search algorithm and the evaluation function
until you find performance to be satisfactory.
- Write a paper summarizing your results.
- A description of each search strategy you implemented, along with its rationale.
- A discussion of how you modified the board evaluation function, again with its rationale.
- Qualitative assessment of the quality of play.
- Quantitative information about the time necessary for alpha-beta searches of varying depths.
- Presentations (PowerPoint or equivalent):
- Thursday, Septebmer 14: Progress and performance so far.
- Tuesday, September 19: Final results