Transcript slides

Integrating CWU Chess in the ARENA Chess GUI
Kyle Littlefield - CS Department
Advisor: Razvan Andonie
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
1
Program Collaborators
Ashur Odah (graduated 2004)
 Pushpinder Heer (graduated 2004)
 Joseph Lemnley (graduated 2006)
 Jonathan Widger (graduated 2006)
 Berk Erkul (graduated 2007)
 Lukas Magill (graduated 2008)
 Kyle Littlefield (currently enrolled)

Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
2
The CWU Chess Program

Increases in skill level per set of 10
games.

Genetic Algorithm trains 10 separate
weights used in the neural network.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
3
What is a Neural Network?

A neural network is excellent at
 It Starts with the basic
classifying an input to an output.
unit called a Neuron
Outputs
the “learned”input
result
Takes continuous
from
fromthe
anacquired
externalinput.
source

Projects output based on
the sum of the inputs and
threshold of the neuron.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
4
Criteria used by Neural Network
Carrascal, A, Manrique, D, & Rios, J Neural networks evolutionary learning in chess game.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
5
What is a Genetic Algorithm?

Uses a population of
chromosomes

Each chromosome
represents an individual.

Has a fitness value representing
how well it survives in this world
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
6
The Goal…

To optimize the population
 Find the individuals with the highest fitness.
 Avoid getting caught in a local optima
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
7
The CWU Chess Program

Increases in skill level per set of 10
games.

Genetic Algorithm trains 10 separate
weights used in the neural network.

Neural Network controls the behavior
of an Alpha-Beta Search algorithm.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
8
What is an Alpha-Beta Search?
No need to evaluate the left branch of the
 A search algorithm
examined node.
 Seeks
to reduce

The value
will bethe
1 number
or less. of nodes
in a be
search
Node being
 evaluated
The root will
8. tree.
Examined

8
8
1
8
8
9
5
2
1
9
0
1
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
Cut Off Region
9
CWU Chess Program Running
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
10
The Problem

The CWU-Chess program used a
Windows Form for a User Interface.
 This didn’t allow for communications with
other chess interfaces or engines.

The Universal Chess Interface (UCI)
Protocol allowed this to happen.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
11
The UCI Protocol

Uses the console to
communicate
between the User
Interface and the
Chess Engine.

Communication is
performed by
sending and
receiving textual
information.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
12
Implementation

Remove the Windows Form Interface
and all dependencies to it.
 Redesign
Genetic Algorithm fitness
function and network parameters.

Parse UCI Commands and parameters.
 Use them to control the engine.
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
13
UCI Chess Running On ARENA
Symposium On University Research and Creative
Expression (SOURCE2009), Central Washington
University, Ellensburg, USA, May 21st 2009
14