How To Develop Chess Ai

Similar documents
Game Playing in the Real World. Next time: Knowledge Representation Reading: Chapter

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / October 3, 2012

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / September 23, 2014

Keywords-Chess gameregistration, Profile management, Rational rose, Activities management.

FIRST EXPERIMENTAL RESULTS OF PROBCUT APPLIED TO CHESS

DESPITE the many advances in machine learning and

TD-Gammon, A Self-Teaching Backgammon Program, Achieves Master-Level Play

D A T A M I N I N G C L A S S I F I C A T I O N

Game playing. Chapter 6. Chapter 6 1

Masters in Human Computer Interaction

Masters in Information Technology

Masters in Advanced Computer Science

Masters in Computing and Information Technology

Masters in Networks and Distributed Systems

Masters in Artificial Intelligence

School of Computer Science

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

INTRODUCTION 4 1 OVERALL LOOK ON CHESS PROGRAMMING 8

AI Techniques Used in Computer Go

CSE 517A MACHINE LEARNING INTRODUCTION

BBC LEARNING ENGLISH 6 Minute English Do you fear Artificial Intelligence?

COMPUTER ANALYSIS OF WORLD CHESS CHAMPIONS 1

Genetic Algorithms and Sudoku

School of Computer Science

10. Machine Learning in Games

An Early Attempt at Applying Deep Reinforcement Learning to the Game 2048

Roulette Wheel Selection Game Player

Artificial Intelligence (AI)

Masters in Human Computer Interaction

CHAPTER 15: IS ARTIFICIAL INTELLIGENCE REAL?

Cellular Computing on a Linux Cluster

Introduction To Genetic Algorithms

We employed reinforcement learning, with a goal of maximizing the expected value. Our bot learns to play better by repeated training against itself.

Checkers Is Solved. *To whom correspondence should be addressed.

School of Computer Science

BCS HIGHER EDUCATION QUALIFICATIONS Level 6 Professional Graduate Diploma in IT. March 2013 EXAMINERS REPORT. Knowledge Based Systems

Simulations, Games and Experiential Learning Techniques:, Volume 1,1974

Treemaps for Search-Tree Visualization

This Workbook has been developed to help aid in organizing notes and references while working on the Chess Merit Badge Requirements.

Generalized Widening

NEUROEVOLUTION OF AUTO-TEACHING ARCHITECTURES

A Systemic Artificial Intelligence (AI) Approach to Difficult Text Analytics Tasks

CS MidTerm Exam 4/1/2004 Name: KEY. Page Max Score Total 139

School of Computer Science

How to Write a Project Proposal. Martyn Amos

The Taxman Game. Robert K. Moniot September 5, 2003

Temporal Difference Learning in the Tetris Game

BPM: Chess vs. Checkers

Building Your "Bench Strength" How the best organizations select and develop tomorrow's leaders By Guido M.J. de Koning

PLAANN as a Classification Tool for Customer Intelligence in Banking

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

A Note on Rim Width, Tire Sensitivity, and Rim Depth in High Performance Bicycle Wheels.

Gerard Mc Nulty Systems Optimisation Ltd BA.,B.A.I.,C.Eng.,F.I.E.I

Building a Unique Total Rewards and HR System For A Unique Company At

BUILDING AN INNOVATIVE INNOVATION TEAM

TURF ToTal UndUplicaTed Reach and FReqUency analysis

CSCI Historical Development. May 29, 2015

The Cross-Platform Implementation

Using Adaptive Random Trees (ART) for optimal scorecard segmentation

Average producers can easily increase their production in a larger office with more market share.

Artificial Intelligence Beating Human Opponents in Poker

Practice Questions 1: Evolution

Monte Carlo Tree Search and Opponent Modeling through Player Clustering in no-limit Texas Hold em Poker

Current California Math Standards Balanced Equations

SURVIVAL OF THE FITTEST

WHITE PAPER. Be Active about Passives! Why Corporations need to rethink how they recruit for executive and strategic roles

The Intelligent Resource Managment For Local Area Networks

A Least-Certainty Heuristic for Selective Search 1

How to Use Problem-Solving Simulations to Improve Knowledge, Skills, and Teamwork

Product Brief SysTrack VMP

in the Kingdom Where Content Rules, Telemarketing is

THE GREEK YOUTH PROGRAM: OFFENSIVE PHILOsOPHY

Programming Risk Assessment Models for Online Security Evaluation Systems

CHAPTER - 5 CONCLUSIONS / IMP. FINDINGS

A robust metrics program can provide directional guidelines and a basis for advancement in process efficiency and flexibility.

COMP 590: Artificial Intelligence

Proof-of-Concept Studies and the End of Phase IIa Meeting with the FDA

Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm

Making Decisions in Chess

Abstract The purpose of this paper is to present the results of my action research which was conducted in several 7 th /8 th grade language arts

So You d Like a Sport Psychology Consultant to Work With Your Team? Three Key Lessons Learned from Olympic Teams

Acknowledgements I would like to thank both Dr. Carsten Furhmann, and Dr. Daniel Richardson for providing me with wonderful supervision throughout my

Hierarchical Judgement Composition: Revisiting the Structural Credit Assignment Problem

Using Artificial Intelligence to Manage Big Data for Litigation

Behaving Intelligently: Leadership Traits & Characteristics Kristina G. Ricketts, Community and Leadership Development

Fostering Strong Interactions Between Industry and Academia

Planning and Research: Its Evolution and Role in the Internal Revenue Service

International IPTV Consumer Readiness Study

BEST PRACTICES RESEARCH INSERT COMPANY LOGO HERE

BUYER S GUIDE. The Unified Communications Buyer s Guide: Four Steps to Prepare for the Modern, Mobile Workforce

A Robust Method for Solving Transcendental Equations

Learning is a very general term denoting the way in which agents:

ASSESSMENT PLAN: M.S. in Computer Science

International Journal of Computer Science Trends and Technology (IJCST) Volume 2 Issue 3, May-Jun 2014

Who needs humans to run computers? Role of Big Data and Analytics in running Tomorrow s Computers illustrated with Today s Examples

Neural Networks and Back Propagation Algorithm

Enhancing Artificial Intelligence in Games by Learning the Opponent s Playing Style

A Knowledge-based Approach of Connect-Four

21 st Century Knowledge Worker: the Centaur

A SIMULATOR FOR LOAD BALANCING ANALYSIS IN DISTRIBUTED SYSTEMS

Transcription:

A Brief Survey of Chess AI: Strategy and Implementation Mark S. Montoya University of New Mexico CS 427 Fall 2012 Introduction Chess AI seems to be a less popular area of research since the 1997 defeat of Chess grandmaster Garry Kasparov by IBM's Deep Blue, but the decades-long quest to build a chess playing automata such as Deep Blue produced a strong foundation and helped form many of the strategies used in AI applications nowadays. Currently, there is research done in Chess AI studying possibilities through techniques including machine learning, neural networks, and genetic algorithms. Chess AI development is truly a cornerstone of early interest in AI techniques and one of the fundamental problems which helped build modern game-playing AI. Chess was popular enough for people to care about creating a chess AI, simple enough to allow represention of the game board and rule system, yet complicated enough for it to require ingenuity, strategy, and innovation. Long-Term Planning The branching factor of a typical chessboard configuration is considered nontrivial by today's computing capabilities, and for the pioneers of game-playing AI (specifically chess), it was a major limitation. A basic chess AI suffers from a phenomenon called myopia, the culprit of its superficial and predictable play. This problem is found in any tree-searching, game-playing program and it stems from an inability to fully represent the search space of the game. When building a tree with ply n (n levels deep), there is a chance that the n+1 level could contain a drastic, game-altering state which the program would critically avoid if it had knowledge of the state. Even use of techniques such as alpha-beta pruning, iterative deepening, and transposition tables are a band-aid on the root of the problem they simply don't help enough to produce a championship AI. Like chess grandmasters, the program must think long-term. This can be achieved by including some expert knowledge, or some type of pre-processer which evaluates the board and decides on a long-term strategy. The idea here is to first pass the current game-board into a long-term planning program, and 1

this program will decide on a suitable strategy for playing the game, well outside of the scope of the search tree. Then, with this long-term strategy in mind, the short-term, n-ply search tree could be used to decide on appropriate moves for the short term. To influence the short-term planner, the long-term planning program could devise a new set of heuristics for each long-term strategy. For example, if the goal is to achieve checkmate with a queen and a rook using a ladder checkmate, the long-term planner could place high value on those pieces, strongly discouraging the short-term planner from sacrificing those pieces. The long-term planning method is similar to how a grandmaster might initially approach a move decision. First, the overall status of the board must be considered and a long term strategy is devised. Only then, after deciding on how to act in the long term, should we consider the optimal move in the short term which also moves the game in the planned long-term direction. Implementing this in a program could probably best be described as an expert knowledge implementation. The overall state of the board is assessed, and matched as closely as possible to some type of general board configuration for which there exists a known strategy. One way to define these strategies is on the current depth of the game. We can think of opening strategies, mid-game play, and finales methods for achieving checkmate. Opening strategies are based on any number of opening-play strategies which can be found online. These are not difficult to encode and are highly effective at producing a good opening-board situation. Determining a mid or end-game strategy, however, is more difficult. These choices rely heavily on well-implemented, innovative, and properly abstracted expert knowledge. Hans Berliner, a pioneer of chess AI at CMU claims that Chess programs may be viewed as highly tuned expert systems (Berliner et al, 338), and defines what he calls a taxonomy for defining moves and board positions which could be effective in a long-term planning program. Another advantage of this long-term planning approach is that the program can be thought of as two distinct parts, the short-term and the long-term planner, which can be implemented separately and with minimal dependency between them. Arguably, however, the long-term planning interface can be thought of as far more important than the short-term planner as it defines the direction of game-play. 2

Man vs. Machine In 1988, a computer designed by F. H. Hsu named Deep Thought defeated a human with the grandmaster title for the first time. One year later, Hsu joined IBM and they began development on the next iteration of this machine, named Deep Blue. Deep Blue was to be the first chess program using massively-parallel computation, and was completed in 1995. It was a successful program, but it was not until 1997 that the latest version of Deep Blue defeated a slightly-bitter Garry Kasparov, marking the first defeat of a renowned world-champion by a computer in match play. Although Deep Blue was encoded with top-tier expert knowledge and highly optimized search algorithms, the main advantage of Deep Blue is its computation ability. Deep Blue employed specifically designed search algorithms which allowed for parallel search. Using the super-computing capabilities of Deep Blue, the algorithm speedup allowed Deep Blue to calculate unprecedented numbers of positions in short-term play, sometimes extending search from the current game state as deep as 40 ply. Deep blue was an expensive device implemented with an exclusive purpose in mind. Its hardware was centered around playing chess, and after its defeat of Garry Kasparov in 1997 the program was ended and Deep Blue dismantled. Today, due to the steep level of growth in computing power, the capabilities of Deep Blue can be nearly attained in a PC. Deep Blue, however, will remain a landmark in not only chess-playing AI, but in the capabilities of game-playing automata over even the greatest of human players. The well-publicized victory of Deep Blue prompted public interest in AI, documentaries, and books about the event. Modern Techniques: Genetic Algorithms & Evolving Strategy Over time, brute-force algorithms such as those described above have been a successful means of attacking the chess problem. They have improved significantly over the years, to the point where they can pose a formidable challenge to human chess grandmasters. These methods, however, seem to lack something that makes them truly intelligent. The creator of a program wielding such a method knows its strengths and its weaknesses he is the one who encoded the expert knowledge, and the methods of decision. The program is an extension of the programmer, and it will compute the next best move based on quantitative information with which it has been encoded. The automata does not know why it is 3

choosing to take one move over the other in any qualitative sense which might evoke the idea of intelligence. It is useful to consider how a human would play chess. The human player will not need to search to a large depth to realize that an obviously poor move should not be considered. Humans have the ability to focus on a select few moves without having to explore the entire search space of possibilities. This is accomplished by systematic pattern recognition and learning. How then, can we create chess programs that learn like humans do? There are many conventional learning methods which have been applied to chess, such as reinforcement learning and temporal difference learning. These methods have typically produced poor results even after being given extensive learning time. Such methods have successfully been applied to games such as checkers, but with chess the problem is best described as an optimization problem. The search space is massive, with about 10^46 possible states in a chess game. Further, the search space is not smooth or unimodal that is, it won't be matched with a heuristic which gives it nice, gradient slopes. Instead, the space is erratic and unpredictable. Genetic algorithms, on the other hand, typically perform well in large, non-unimodal search spaces. Genetic algorithms are simple enough to explain at a high level, and can be extremely powerful in many situations. The idea came from the evolution and learning of life itself it is a direct application of survival of the fittest to machines. In life, there are occasional mutations in our DNA structure which, over large periods of time, prove to be beneficial mutations or harmful. If they are beneficial, this mutation will eventually propagate throughout the population, while harmful mutations will die out. The amount of time this process takes to produce a noticeable effect is proportional to the length of one generation. In machines, this can be an extremely short amount of time, allowing evolutionary algorithms to produce outstanding results in relatively short time. The two essential components are: a means to create new, different generations, and a method to determine if a particular specimen is worthy of further consideration typically called the fitness function. Genetic algorithms can be applied to chess in many ways. A simple way would be to have each generation, say with population size 100, play games against each other member of the population and tally the score of each at the end of this round-robin tournament. The top-scorers are considered for the next round of breeding or generation, and this continues until a superior chess-playing AI is produced. Unfortunately, the amount of time required for this tempting method makes it unfeasible. 4

A better idea is to combine supervised and unsupervised learning to produce chess AI with genetic algorithms. In the first supervised phase, the programs are taught to mimic the play of human grandmasters, comparing the way they play to a large database of previously recorded games played by human grandmasters. The fitness function can be thought of as how close the prospective AI's decision was to a human grandmaster's decision in a similar game. Since this is a learning phase, the candidate can perform a search of low ply with a very simple evaluation function to determine its next move the main goal here is to evolve candidate AI which act like grandmasters. A strong advantage of this method is that it doesn't require an already robust evaluation function for determining the next move, but rather uses a simple evaluation function and is trimmed by the fitness function. In the unsupervised phase, the candidates will play against each other and co-evolve. Now that they are already made to play like grandmasters, they will compete in a long series of successive tournaments and breeding cycles to produce a superior chess AI. Experimentally, this method has been shown as an effective means of producing chess AI through the work of David-Tabibi, Jaap van den Herik, et al in 2009. It should also be noted that in the breeding phase, inbreeding is something to avoid this occurs when too many similar candidates are in the pool, and eventually all candidates are essentially the same with only minor differences setting them apart. When this happens, the final result may not be a suitable AI as it has not been tested against a well-represented group of candidates with various play styles and strategies. Conclusion Over time, developing AI for game playing has proven to be an important testbed and starting point for the creation of AI techniques across the board, including search, planning, and learning. Chess was considered as early as 1950 as a potentially worthwhile candidate for developing AI, and has been challenging the field ever since. The popularity and complexity of chess make it a fascinating and sought-after problem in AI, while the simplicity of representing the board and the rule-set makes it an accessible problem to anyone, including those without advanced training in computer science. Truly, it will be interesting to see how far chess AI will develop, and at what point we will consider the game to be beaten. Will there ever reign an undefeated, insurmountable chess AI, and how long will it take? 5

References Berliner, H., Kopec, D., & Northam, E. (1990). A taxonomy of concepts for evaluating chess strength. Supercomputing '90 Proceedings of the 1990 ACM/IEEE conference on Supercomputing, 336-343. David-Tabibi, O., Jaap van den Herik, H., Hoppel, M., & Netanyahu, N. (2009). Simulating human grandmasters: evolution and coevolution of evaluation functions. GECCO '09 Proceedings of the 11th Annual conference on Genetic and evolutionary computation, 1483-1490. Lassabe, N., Sanchez, S., Luga, H., & Duthen, Y. (2006). Genetically programmed strategies for chess endgame. GECCO '06 Proceedings of the 8th annual conference on Genetic and evolutionary computation, 831-838. Marshland, T. A., & Rushton, P. G. (1973). Mechanisms for comparing chess programs. ACM '73 Proceedings of the ACM annual conference, 202-205. Schaeffer, J. (1983). Long-range planning in computer chess. ACM '83 Proceedings of the 1983 annual conference on Computers : Extending the human resource, 170-179. Tan, C. J. (1995). Deep blue: Computer chess and massively parallel systems. ICS '95 Proceedings of the 9th international conference on Supercomputing, 237-239. 6