Genetically Programmed Strategies for Chess Endgame

Genetically Programmed Strategies for Chess Endgame

Genetically Programmed Strategies For Chess Endgame Nicolas Lassabe, Stephan´ e Sanchez Herve´ Luga and Yves Duthen IRIT/UT1 21 all´e de Brienne 31042 Toulouse, France [lassabe,sanchez,luga,duthen]@irit.fr ABSTRACT spite this, chess engines commonly use such tables of best Classical chess engines exhaustively explore moving possi- moves but only for endgame situations with less than five bilities from a chessboard configuration to choose what the pieces on the chessboards and only a few with six pieces next best move to play is. In this article we present a new on chessboard. Even under such restricted conditions, the method to solve chess endgames without using Brute-Force needed storage size for each table is often several gigabytes. A second approach is what is commonly called Brute- algorithms or endgame tables. We are proposing to use Ge- 2 netic Programming to combine elementary chess patterns Force method . It consists in calculating the best next defined by a chess expert. We apply this method specifi- move considering exhaustively the possibilities of the op- cally to the classical King-Rook-King endgame. We show ponent from the actual chessboard configuration. Here the that computed strategies are both effective and generic for problem is no longer storage but the exponential growth of they manage to win against several opponents (human play- search space. Nevertheless, over the years, algorithms to ers and artificial ones such as the chess engine CRAFTY). search through trees of moves, and evaluation functions to Besides, the method allows to propose strategies that are estimate the correctness of a move, have improved to such clearly readable and useable for a purpose such as teaching an extent that modern chess engines play almost like chess chess. grandmasters. Still, this approach has a flaw. Even if chess engines based on Brute-Force algorithms play near perfectly, they only mathematically compute the next best move: it is Categories and Subject Descriptors impossible to qualitatively know why such move is preferred Algorithm [Genetic Programming] to another one. The method to choose a move is not the one used by a real chess player. Keywords A third approach to conceive artificial chess engines is to try and solve the chess game considering it and under- chess, Genetic Programming, evolving strategies standing it as a chess grandmaster does. This induces a cognitive study of a chess game that began with the appear- 1. INTRODUCTION ance of the first artificial chess engines. This study shows One of the first challenges of computer science, and more that chess players elaborate strategies splitting up the con- specifically Artificial Intelligence, is to create chess engines. figuration of chessboards in to specific patterns. Modelling But, from quite simple rules and a limited chessboard size, these patterns and putting them together could be a good chess game generates a great complexity and chess engines way of creating chess engines that use understandable and have been conceived in several ways. readable strategies instead of using Brute-Force algorithms The first one is to evaluate and to store, for each chess- or large endgame tables such those used by Nalimov’s ones board configuration what the best move to play is. This [12]. Several works already propose such an approach to simplistic and idealistic approach of the problem seems tech- specifically solve chess endgames. They usually highlight nically difficult for it is commonly said that there are more the difficulty of creating strategies that are both effective possible chess games than atoms in the universe1 [17] . De- end generic enough to win all the configurations of a spe- cific chess endgame. 1The number of chess games is approximately 10123,thatof 43 50 This paper refers to this third approach as we propose legal positions is between 10 and 10 as a comparison, the to use Genetic Programming to automatically create an ar- number of atoms in the Universe is estimated to be betwee 4 × 1078 and 6 × 1079 tificial chess player that plays using specific patterns and moves proposed by an associate chess expert. In order to implement and evaluate the performance of the method we will only for this time focus on a classic endgame, the King- Permission to make digital or hard copies of all or part of this work for Rook-King endgame (KRK). Genetic Programming allows personal or classroom use is granted without fee provided that copies are to put patterns and moves together in order to compute not made or distributed for profit or commercial advantage and that copies generic strategies that can be effective against several op- bear this notice and the full citation on the first page. To copy otherwise, to ponents and in various starting configurations of a KRK republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. endgame. We will also show in the results section that com- GECCO’06, July 8–12, 2006, Seattle, Washington, USA. 2 Copyright 2006 ACM 1-59593-186-4/06/0007 ...$5.00. See Appendix 831 puted strategies are realistic and clearly readable by any of moves. They just exhaustively consider moving possibil- chess player. Last, to evaluate the quality of computed ities and eliminating the least interesting ones in order to strategies, we will discuss games played by our artificial play the most promising move. On the contrary, human player against a perfect player using Nalimov’s tables and players have the capacity to focus only on a few available compare them to those played by a referring chess engine, moves without exhaustively exploring the moving possibili- CRAFTY by Hyatt3 [14], against the same perfect oppo- ties. nent. To prove this, Herbert Simon and others have studied the cognitive mechanisms of chess players. Using psychological tests, they have highlighted the importance of learning and 2. BACKGROUND the systematic use of patterns by chess players [18]. From Chess players need to develop a tactical and strategic this study, work about the solving of chess endgames using sense to master this game and about ten years are gener- specific patterns has been pursued. Weill shows that it is ally necessary to become an international master. If the possible to create by hand strategies for chess endgames by chess players devoted a lot of time to their passion, very building decision trees using patterns [19]. The same year, early in the history of computer sciences, researchers also Bain [2] proposed to solve a KRK endgame by learning logi- spent a lot of time trying to create chess programs able to cal rules from the extraction of patterns from KRK endgame play like chess grandmasters. tables. Similar work about solving the KRK endgame was The first article on artificial chess engines was written by carried out [11] but learned strategies came from human Shannon in 1950 [17]. At the time, they thought that re- versus human games and they were modified by hand when solving this game would be fast and so they could prove they were unable to propose the next move. the power of artificial intelligence. In 1957, Herbert Simon said that within ten years, a digital computer would be the 3. EVOLVING STRATEGIES FOR KRK world chess champion. One year later, he discovered the alpha-beta pruning algorithm for chess [13]. Since then, per- In this work, our main purpose is to automatically gener- formance of chess engines has never cease improving along ate strategies that can checkmate the Black King in every with the improvement of alpha-beta, of its heuristics and of possible configuration of KRK endgame. Our concern is its evaluation functions [15]. Over the past years, research in not to use endgame tables or classical algorithms bases on this domain has focused on ways to improve evaluation func- trees of moves and evaluation functions anylonger, but to tions. The most original ones is proposing to optimize the build strategies as a human chess player does. That is to evaluation function using genetic algorithms [9], to replace say by combining elementary chess patterns to build a win- it by artificial neural networks or to build it automatically ning strategy. This work differs from previous studies about using genetic programming [1]. In this perspective, genetic endgames solving due to a fact that we do not try to extract programming [10] has been mainly used in two ways. The patterns or playing rules from known endgame tables such first one is the automatic production of new heuristics for as Nalimov’s or from recorded played games, but we intend alpha-beta pruning [7], and the second is to find new evalua- to propose a chess engine that learns how to play effectively tion functions to estimate the value of potential next moves using patterns proposed by chess experts. [5, 8]. Though these uses of GPwere original and effective, The learning technique that we have chosen to apply is they still rely on an exhaustive exploration of possible moves Genetic Programming (GP), by which computer programs to play in order to choose the best next one. A third ap- can evolve [10]. A prime advantage of using GPis that we proach is to use Genetic Programming to classify endgames do not need to estimate topologies of evolved programs in situations according to the remaining moves to checkmate advance or to determine precisely what the operators (or the opponent. This classification is done using standard predicates) are to be used to compute a correct strategy. endgames tables [6]. In GP, we start with an initial set of operators and func- One inconvenience of such an approach (based on evalu- tions and we let the system evolves according to the fitness ation of moves and alpha-beta pruning) is that it is bound function.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us