15
Application of Application of Artificial Intelligence Artificial Intelligence to Chess Playing to Chess Playing Jason Cook Jason Cook Capstone Project Capstone Project

Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Embed Size (px)

Citation preview

Page 1: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Application of Artificial Application of Artificial Intelligence to Chess Intelligence to Chess PlayingPlaying

Jason CookJason CookCapstone ProjectCapstone Project

Page 2: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

OutlineOutline

What this project is/isn'tWhat this project is/isn't Goals: Personal and ProjectGoals: Personal and Project Relevant areasRelevant areas

Decision Trees, Bitboards, Evaluation FunctionsDecision Trees, Bitboards, Evaluation Functions RequirementsRequirements DemonstrationDemonstration

Interface and simple game playInterface and simple game play

Additional ideas/possible continuationAdditional ideas/possible continuation ValidationValidation

Page 3: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

What it is/is notWhat it is/is not

Is:Is: Chess engineChess engine

- - LogicLogic

Vehicle for investigating AIVehicle for investigating AI

Is not:Is not: Full computer gameFull computer game

- GUI, saved games, teaching mode…- GUI, saved games, teaching mode… - Specialized hardware project e.g. Deep Blue- Specialized hardware project e.g. Deep Blue

Page 4: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Personal GoalsPersonal Goals

Deepen my understanding of Artificial Deepen my understanding of Artificial IntelligenceIntelligence

- No employer/client context - No employer/client context

Gain experience from a significant Gain experience from a significant piece of software engineering and piece of software engineering and coding, and demonstrate my skills in coding, and demonstrate my skills in those areasthose areas

Investigate optimizing the program for Investigate optimizing the program for speed speed

Page 5: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

High Priority Project GoalsHigh Priority Project Goals

No illegal movesNo illegal moves- Check user and computer moves- Check user and computer moves

Engine never fails to produce a Engine never fails to produce a movemove

Continually improve the strength of Continually improve the strength of the engine the engine

Page 6: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Relevant AreasRelevant Areas

BitboardsBitboards

– 64 bit unsigned integers64 bit unsigned integers– Takes 12 to represent a chess boardTakes 12 to represent a chess board

– Bitwise operation speed advantageBitwise operation speed advantage

Page 7: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Relevant AreasRelevant Areas

Decision TreesDecision Trees

- - Plies, anytime algorithm, iterative deepeningPlies, anytime algorithm, iterative deepening

Page 8: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Evaluation FunctionsEvaluation Functions

One score for each board in the One score for each board in the Decision TreeDecision Tree– Calculated independentlyCalculated independently

NegaMax and recursive descentNegaMax and recursive descent– Gets a single score back to the rootGets a single score back to the root

Credit for each of your pieces on the Credit for each of your pieces on the board, negative for your opponent’s board, negative for your opponent’s piecespieces – Weightings per type of pieceWeightings per type of piece

EmpriseEmprise

Page 9: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Evaluation Functions Evaluation Functions (cont.)(cont.) OSTRICH program literatureOSTRICH program literature

– ““Head in the sand”Head in the sand” PredictabilityPredictability

– Theoretical weaknessTheoretical weakness– Behavior is affected by how much of the Behavior is affected by how much of the

tree is evaluated, etc.tree is evaluated, etc.

Page 10: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

ConstraintsConstraints

Runs on my personal desktopRuns on my personal desktop

Moves in less than one minuteMoves in less than one minute

Uses only free development tools Uses only free development tools and information and information

Using C Using C (trees, bit-wise ops…)(trees, bit-wise ops…)

Page 11: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

DemonstrationDemonstration

Page 12: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Ideas for Further WorkIdeas for Further Work

Evolutionary reasoning for settingsEvolutionary reasoning for settings

GUI, WinBoard/XBoard compatibility, GUI, WinBoard/XBoard compatibility, or web interfaceor web interface

Beginning and/or endgame Beginning and/or endgame databasesdatabases

Make the program “learn”Make the program “learn”

Page 13: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

ValidationValidation

Works within project constraints Works within project constraints and meets high priority goalsand meets high priority goals

Continual progress toward Continual progress toward stronger AIstronger AI– Playing the engine against other Playing the engine against other

enginesengines

Page 14: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

ConclusionConclusion

Only valid movesOnly valid moves

Engine that balances power with Engine that balances power with constraintsconstraints

Elements of Intelligent BehaviorElements of Intelligent Behavior- Can’t build the entire decision treeCan’t build the entire decision tree

- Seek the best “visible” boardSeek the best “visible” board

- Tries to predict the human player’s movesTries to predict the human player’s moves

Page 15: Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project

Questions?Questions?