AI Chess
Implementation & Source Code
The
program is implemented entirely in Java. There is a stand-alone version, as
well as an online applet version. The applet version
is identical to the stand-alone, except for the implementation of the main
GUI, which is based on the Applet class instead of the
Frame class. Furthermore, the applet version doesn't use the
opening move database, which is stored in a physical file, which would
be slow to use over the internet.
The following diagram shows the relationships between different modules
of the program.
Below the diagram is a listing of the modules, as they correspond to Java
classes, with short descriptions and links to the source files.
Game
– implements an abstract representation of all aspects of the game being played
ChessInterface
– an interface definition that any class wishing to interact with the Game
engine must implement.
The GameInterface is the main GUI for my project, so
it of course implements it.
GameInterface
– implements the main user GUI to the program
ChessApplet
- the online applet version of the GameInterface
GeneticInterface
– a class implementing the ChessInterface which runs the genetic algorithms
and tournaments for finding good static evaluation functions.
Chess
– implements the rules of chess
ChessBoard
– implements an abstract representation of the chess board
ChessBoardGUI
– implements a graphical representation and user GUI of the chess board
AIPlayer
– implements all parameters of the computer players
ScoringGenome
– implements the static board evaluation function
AIEngine
- implements the artificial intelligence computer move-making algorithms
Piece
– implements an abstract representation of a chess piece
Move
– implements an abstract representation of a chess move
ECODatabase
– implements low-level interaction with files storing opening moves
EcoReader
– implements high-level interface between the game and the ECODatabase
CompThread
– tool for running the AIEngine in a separate process so as not to interfere
with GUI
(not included in organizational chart as technically not an element
of the main program)
AIChess
- the application launcher; creates a new instance of the GameInterface to
start the program
ECO.pgn
- text file of the encyclopedia of chess openings used by the program
Back to the main page.