Towards A World-Champion Level Computer Chess Tutor

Similar documents
NOTE 6 6 LOA IS SOLVED

Today. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing

OPENING IDEA 3: THE KNIGHT AND BISHOP ATTACK

Chapter 1: Positional Play

FACTORS AFFECTING DIMINISHING RETURNS FOR SEARCHING DEEPER 1

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

Dan Heisman. Is Your Move Safe? Boston

C SC 483 Chess and AI: Computation and Cognition. Lecture 2 August 27th

The Implementation of Artificial Intelligence and Machine Learning in a Computerized Chess Program

How to Become Master Rated in One Year or Less.

Opponent Models and Knowledge Symmetry in Game-Tree Search

Automated Chess Tutor

2. Review of Pawns p

A Quoridor-playing Agent

Programming Bao. Jeroen Donkers and Jos Uiterwijk 1. IKAT, Dept. of Computer Science, Universiteit Maastricht, Maastricht, The Netherlands.

Strategic Evaluation in Complex Domains

Chess Rules- The Ultimate Guide for Beginners

Real-Time Connect 4 Game Using Artificial Intelligence

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Chess for Kids and Parents

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

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

Retrograde Analysis of Woodpush

A Simple Pawn End Game

Games solved: Now and in the future

but they need to use their own brains!! or Chess Engines: the death of correspondence chess? by Simon Hradecky

Two-Player Perfect Information Games: A Brief Survey

Two-Player Perfect Information Games: A Brief Survey

Influence of Search Depth on Position Evaluation

An End Game in West Valley City, Utah (at the Harman Chess Club)

Challenging the Nimzo-Indian

Review on The Secret of Chess by Lyudmil Tsvetkov. by IM Herman Grooten

Computer Chess Compendium

Artificial Intelligence Search III

CS221 Project Final Report Gomoku Game Agent

Ponnuki, FiveStones and GoloisStrasbourg: three software to help Go teachers

Go-Moku Solved by New Search Techniques

YourTurnMyTurn.com: chess rules. Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com

THE NATURE OF RETROGRADE ANALYSIS FOR CHINESE CHESS 1

Queen vs 3 minor pieces

Algorithms for solving sequential (zero-sum) games. Main case in these slides: chess. Slide pack by Tuomas Sandholm

SBASE ACCOUNT S E H C

A Re-Examination of Brute-Force Search

Contents. Introduction 5 How to Study this Book 5

Five-In-Row with Local Evaluation and Beam Search

The Chess Set. The Chessboard

Winning Chess Strategies

Guidelines III Claims for a draw in the last two minutes how should the arbiter react? The Draw Claim

3. Bishops b. The main objective of this lesson is to teach the rules of movement for the bishops.

Algorithms for solving sequential (zero-sum) games. Main case in these slides: chess! Slide pack by " Tuomas Sandholm"

On Games And Fairness

Essential Chess Basics (Updated Version) provided by Chessolutions.com

- 10. Victor GOLENISHCHEV TRAINING PROGRAM FOR CHESS PLAYERS 2 ND CATEGORY (ELO ) EDITOR-IN-CHIEF: ANATOLY KARPOV. Russian CHESS House

Towards the Unification of Intuitive and Formal Game Concepts with Applications to Computer Chess

Artificial Intelligence. Minimax and alpha-beta pruning

Adversarial Search. CMPSCI 383 September 29, 2011

Ar#ficial)Intelligence!!

Whitcomb Wins Harman Chess Club Championship of 2018

POSITIONAL EVALUATION

CHESS SOLUTION PREP GUIDE.

Novice Nook. When You're Winning, It's a Whole Different Game. Dan Heisman

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

Evaluation-Function Based Proof-Number Search

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

CPS331 Lecture: Search in Games last revised 2/16/10

Chess Lessons in Utah

Playing Othello Using Monte Carlo

Solving 8 8 Domineering

Ayo, the Awari Player, or How Better Represenation Trumps Deeper Search

Basic Introduction to Breakthrough

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol

After learning the Rules, What should beginners learn next?

Foundations of Artificial Intelligence

SOLVING KALAH ABSTRACT

Foundations of Artificial Intelligence

DOWNLOAD PDF HOW TO PLAY CHESS! TACTICS, TRAPS, AND TIPS FOR BEGINNERS

THE PRINCIPLE OF PRESSURE IN CHESS. Deniz Yuret. MIT Articial Intelligence Laboratory. 545 Technology Square, Rm:825. Cambridge, MA 02139, USA

Permanent minor piece outposts. Definition: minor piece outpost, with no enemy minor pieces able to attack them

Konstantin Sakaev COMPLETE SLAV I

Adversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I

SEARCH VS KNOWLEDGE: EMPIRICAL STUDY OF MINIMAX ON KRK ENDGAME

Game-playing AIs: Games and Adversarial Search I AIMA

Artificial Intelligence. Topic 5. Game playing

Adamczewski,Jedrzej (1645) - Jankowski,Aleksander (1779) [C02] Rubinstein Memorial op-c 40th Polanica Zdroj (2),

Dynamic Move Tables and Long Branches with Backtracking in Computer Chess

CHESS CALCULATION TRAINING

Mastering basic rook endgames

Practical Chess Defence

More Adversarial Search

Contents. Part 1: General. Part 2: The Opening. Part 3: Tactics and Combinations. Introduction 6 Symbols 6

CHESS IN SCHOOLS DO WE TEACH IT THE RIGHT WAY?

Artificial Intelligence Adversarial Search

Creating a Havannah Playing Agent

The Grandmaster s Positional Understanding Lesson 1: Positional Understanding

CS 4700: Foundations of Artificial Intelligence

BayesChess: A computer chess program based on Bayesian networks

LESSON 2. Opening Leads Against Suit Contracts. General Concepts. General Introduction. Group Activities. Sample Deals

Early Playout Termination in MCTS

The King Hunt - Mato Jelic

The Modernized Reti, a Complete Repertoire for White

Transcription:

Towards A World-Champion Level Computer Chess Tutor David Levy Abstract. Artificial Intelligence research has already created World- Champion level programs in Chess and various other games. Such programs have a sufficient understanding of how to play these games well, to enable them to teach weaker players how to improve their own skills, yet little has thus far been accomplished in this field. Here we describe an important step on the road to a World Champion calibre tutor program. The example used in this paper is Chess, but the general ideas discussed here are equally applicable to other games. The paper discusses many of the typical situations of interest that a strong human Chess player employs when teaching pupils how to improve. For each type of situation of interest some guidelines are presented to indicate how a computer program could identify such situations. This task is comparable to that of writing an annotation program, able to comment on a Chess game in the style employed in books, newspaper columns and magazines. A state-of-the-art example is presented of a game annotated by a World Champion calibre Chess program. 1 Introduction Artificial Intelligence researchers have already created World Champion level programs in Chess (van den Herik, 1998) and various other games (for example Allis, van den Herik, and Herschberg, 1991; Uiterwijk, van den Herik, and Allis, 1989; Allis, van den Herik, and Huntjens, 1996). Continuing research in this field will inevitably lead to similarly strong programs in more games (van den Herik, Uiterwijk, and Rijswijck, 2002) A World Champion calibre program has the necessary knowledge and understanding of its game to be able to teach human players how to improve their own skills, and it would be of great interest and benefit to many human players to receive lessons from such a strong program. Fürnkranz (1997) discusses this potential use of strong programs thus: For example, imagine a program that analyzes a certain position or an entire game on an abstract strategic level, tries to understand your opponent s and your own plans, and provides suggestions on different ways to proceed. Some commercial programs already provide such capabilities, but at a very preliminary level that usually is only able to detect tactical, but not strategic mistakes. David Levy is Chairman of the International Computer Games Association and CEO of Intelligent Toys Ltd, London. Email: davidlevylondon@yahoo.com.

26 David Levy Since the late 1980s the ICCA (latterly the ICGA) has recognized the potential of such programs and therefore created the Best Annotation Award, to be given annually for the best computer-generated annotation of a Chess game (Van den Herik and Herschberg, 1994). Annotating a Chess game is very similar in many respects to explaining a game in a tutor-student environment. What is common to both annotation and traditional Chess tutoring is the explanation of why particular moves are good or bad, not merely the fact that they are good or bad. And it is not difficult to imagine how a program capable of explaining the whys, could also make generalizations about its tutee, explaining, for example, that You have a tendency to give up the advantage of the two bishops too readily. Despite the obvious benefits of having a World Champion player on call as a tutor, little has thus far been accomplished in this field. There is an annotation feature in the Fritz series of Chess programs published by Chessbase GmbH, and that feature promises great potential for future versions. Not surprisingly, however, Chess programmers normally put as much of their effort as possible into improving the playing strengths of their creations, with the result that across the computer chess community as a whole the state of the art in Chess annotation shows considerably more potential than it does progress. This paper addresses two questions: 1 What types of situation deserve comment from a human tutor of a Chess pupil? 2 For each of these types of situation, how can information readily available from a Chess program be adapted to identify when such situations exist? 2 On What Types of Situation Should a Tutor Comment? Here we identify the different types of situation, deserving of some explanation to the tutee, that are often encountered in published annotations to Chess games. Some of these involve comments on a particular move, while in other cases the comment is an assessment of the position arising after a move or a sequence of moves. 2.1 The Opening Moves Enormous books of Chess openings are employed by just about every World Champion calibre program. These books are often derived from databases such as Chessbase which include literally millions of games played in Grandmaster competition and at lower master levels, together with the names of the players and details of where and when each game was played. Such databases are often included with commercially available Chess programs, allowing the game data to be accessed by the playing program and hence by an annotation program. In addition to such data as the names of the openings and many of the variations within them, both of which are traditionally included with printed annotations

Towards A World-Champion Level Computer Chess Tutor 27 of games, these databases typically incorporate statistics on the relative popularities of the different moves that have been played in top level games, as well as the number of wins, draws and losses that have resulted from each of those moves. By extracting the relevant data from a playing program s openings book and a games database, an annotation program could, when a game is still in book, provide comments that are fashion-related or of historical interest. For example: Three other moves have been popular in this position. (i) 10 Re1 was played a lot by Anand in 1995 and 1996, after which it was taken up by Shirov, Topalov, and Adams. (ii) 10 a4 was Anand s main choice from 1997 onwards. (iii) 10 Be3 was hardly played until 1998 but then became the most popular move in this position. All of the data necessary to enable an annotation program to make such comments can be found in the relevant databases. It is merely question of extracting that data. A games database can also provide quantitative data that could give the reader useful statistics as to the success or failure of various moves in the openings in top level competitive Chess: This is the most popular move in the current position, played in 62% of games. It has also been the most successful, leading to wins in 29% of those games, losses in 11% and draws in 60%. The other main choice here has been Bg5, played in 27% of games, scoring, 18% wins, 12% losses and 70% draws. Again, all of the necessary data is there in the games database, and needs only to be extracted by the annotation program. One often sees a comment at the end of the opening phase, indicating that a move is a novelty or new move or theoretical innovation. These synonymous comments mean that the move in question had not been played before in top level Chess, or to put it more accurately there are no games with this move in the database. Yet again, identifying such moves in a games database is trivial for an annotation program. 2.2 Moves After the Opening Phase Most of the moves deserving of comment in a Chess annotation come after the opening phase. In this section we discuss eleven types of move, explaining in each case how they might be defined and how moves corresponding to those definitions could be identified by a program. We make no claim that our suggested definitions are the only ones or even the best ones, merely that they are reasonably sensible and can serve as the basis for a simple algorithm to identify such moves. What we are presenting here are ideas and suggestions more than assertions and definitive algorithms. We employ the following terminology and notation:

28 David Levy T = An appropriate threshold, not necessarily the same threshold for every type of move. (In some cases a value of T is suggested, measured in pawns.) Shallow search means a 1-ply search (plus capture search). Medium search means a 5-ply search (plus capture search). I Good move The move is (a) the best move, after a full search; and (b) not obvious, that is to say its evaluation is at least T below that of the best move after a shallow search (T 0.2). II Brilliant or Very Good Move The move is (a) the best move, after a full search; and (b) very unobvious, that is to say its evaluation is at least T below that of the best move after a medium search (T 1). The adjective brilliant could be reserved for those moves that result in a short-term loss of material (at 2-ply or 4-ply) of at least a certain amount (say 2 pawns). III Mistake After a full search the move has an evaluation at least T below the evaluation of the best move. IV Blunder After both a shallow search and a full search the move has an evaluation at least T below the evaluation of the best move (T > 1 pawn), and that evaluation difference is due to material loss rather than an accumulation of positional factors in the evaluation function. V Dubious Move A complicated move but one that has an evaluation at least T below the evaluation of the best move after a full search (T > 0.5 pawn). The definition of complicated move and how such a move can be recognized by a program is itself a complicated question. It could, for example, be related to how often the principal continuation changes during the first few iterations of the search (say up to a depth of 5 or 7 ply). VI Interesting Move A complicated move whose evaluation is within T of the evaluation of the best move after a full search (T 0.1 pawn). VII Threat If the same side had a second successive move in this position it could gain material or force mate. In the case of a gain in material, it would be more than could be gained by a different move from the current position. (This caveat is needed because a move that refuses to make a viable capture could otherwise be seen as a threat to make that capture.) In the case of forcing mate it would not be appropriate to make the comment Threatening mate in n moves if it is possible to force mate without having a second successive move in the position.

Towards A World-Champion Level Computer Chess Tutor 29 VIII With the Idea (This refers to strategic ideas.) If the same side had two or more successive moves in this position, excluding capturing moves and checks, it could improve its score by at least T relative to the score it could achieve by making the same sequence of successive moves after a different move from the current position. IX Better Is This annotation can apply when III (Mistake) applies. The annotator indicates the best move, possibly with some analysis to support the statement that it is better. X Only Move Many positions arise in Chess where there is only one sensible move and every other move throws away a win or changes a draw into a loss. Making an obvious capture or recapture (or making a checkmating move) should disqualify a move from being categorized as an only move. Moving or defending a threatened piece are obvious moves and should also be excluded from consideration as an only move. Apart from the above exceptions, a move can be designated as an only move if every other move reduces the evaluation for the player making that move by enough to change a win into a draw, or a draw into a loss. This determination can generally be made on the basis of the tree search and evaluation of the principal continuations, though in the endgame it can also be made on the basis of win/draw/loss evaluations for positions in an endgame database. XI Trap The annotation Setting a trap is appropriate if a move allows the opponent to make a move that appears, from a shallow search, to win material or gain a big positional advantage (above T ), but which, after a full search, is seen to lose material or suffer a big positional disadvantage (above T ). The annotation Avoiding a trap is appropriate if a move is rejected that appears, from a shallow search, to win material or gain a big positional advantage (above T ), but which, after a full search, is seen to lose material or suffer a big positional disadvantage (above T ). 2.3 Commenting on the Most Important Feature in the Position Chess annotations often employ comments on the most salient feature or features in a position. For example, a position might be assessed as being better for White because White has the advantage of the two bishops. An annotation program could detect the size of the contribution to the overall evaluation from each feature in the evaluation function, and from this data determine whether one (or possibly two) features of the position warrant mention. For example, if a position is assessed as being +0.3 (meaning 0.3 pawns better for White), and if the score is 0 when ignoring the component that gives a bonus for having the two bishops, then the annotation program has determined that White has an advantage of 0.3 because he has the bishop pair.

30 David Levy This approach can be employed with any Chess feature that is quantified in the evaluation function. The other features most commonly commented on in Chess annotations, apart from the bishop pair, are: doubled pawns, isolated pawns, passed pawns, one or more rooks on an open file, united (connected) pawns, an advantage in development, an attack on the K-side, an attack on the Q-side, an advantage in space, having the initiative,... It is also possible to make use of a similar idea in the endgame, for example in the case of a game where one side has a material advantage but cannot win because of what might be called a perverse reason. One such reason is bishops of opposite color, which often results in a game being drawn even though one side is a pawn (or even two pawns) ahead. For an annotation program it would be trivial to detect when a player has what would usually be a winning material advantage but in which the correct result is nevertheless a draw. 3 Position Assessment It is normal in annotations to include from time to time assessments of a position, either the position as it currently stands in the game or a position at the end of a variation of analysis. Most of these assessments indicate the size of the advantage: slightly better, clearly better, or decisive (winning) advantage. In these cases the appropriate assessment can be determined simply on the basis of the evaluation, and the appropriate ranges can be somewhat at the discretion of the programmer. The following are suggestions: Equal position (absolute value of score < 0.1) Slight advantage (0.1 < absolute value of score < 0.4) Clear advantage (0.4 < absolute value of score < 1.0) Decisive advantage (absolute value of score > 1.0) Roughly equal position (absolute value of score < 0.1) Certain other commonly used comments on positions can likewise be based on data that can be extracted from a program s evaluation function. In Chess, when a player sacrifices material in the expectation of gaining a compensating advantage in the non-material aspects of the position, a program could detect the fact that the player is behind on material, and measure the overall score for the position in order to determine whether positional factors provide sufficient compensation. Such a test would give rise to comments of the following nature:... has sufficient compensation for the sacrificed material... has more than sufficient compensation for the sacrificed material... has insufficient compensation for the sacrificed material The above examples demonstrate the relative ease with which data, that can be extracted by a program s evaluation function and search, can assist in making appropriate comments that would be of value to a Chess pupil. The author believes that a World Champion level annotator for Chess games would not be far off if just a handful of Chess programmers were to devote themselves to this task for a few weeks.

Towards A World-Champion Level Computer Chess Tutor 31 References 1. Allis, L.V., Herik, H.J. van den, and Huntjens, M.P.H. (1996). Go-Moku Solved by New Search Techniques. Computational Intelligence: An International Journal, Vol. 12, No. 1, pp. 7 24. Special Issue on Games. 2. Fürnkranz, J. (1997). Knowledge Discovery in Chess Databases: A Research Proposal. Technical Report OEFAI-TR-97-33, Austrian Research Institute for Artificial Intelligence, 1997. Available at http://www.ke.informatik.tu-darmstadt.de/ juffi/publications/chess-ws.ps.gz. 3. Herik, H.J. van den (1998). Game Over. ICCA Journal, Vol. 21, No. 2, pp. 73 74. 4. Herik, H.J. van den and Herschberg, I.S. (1994). The Best Annotation Award. ICCA Journal, Vol. 17, No. 1, pp. 39 40. 5. Herik, H.J. van den, Uiterwijk, J.W.H.M., and Rijswijck, J. van (2002). Games Solved: Now and in the Future. Artificial Intelligence, Vol. 134, Nos. 1-2, pp. 277 311. 6. Uiterwijk, J.W.H.M., Herik, H.J. van den and Allis, L.V. (1989). A Knowledgebased Approach to Connect-Four. The Game is Solved! In: Heuristic Programming in Artificial Intelligence: The First Computer Olympiad (eds. D.N.L. Levy and D. F. Beal), pp. 113 133. Ellis Horwood Ltd., Chichester. Appendix - The State of the Art in Computerized Chess Annotation The following annotation, which is by the commercially available program Deep Fritz 9 (analyzing each move for 1 minute), represents the current state of the art. There are two personal historical notes that this author would like to add here. (a) At the time of writing, Van den Herik s opponent in this game (which was played almost forty years ago), the Italian Master Capece, is still active in the world of competitive Chess. During 2006 he was the joint winner of the European Blitz Championship. He also officiated as the Chief of Press during the 2006 Chess Olympiad and World Computer Chess Championship in Torino. (b) The event in which the following game was played was the first time that this author and Van den Herik met - both were competing for their respective countries in the 15 th annual Student Team World Championship in, Ybbs am der Donau, Austria, but they did not actually meet, even though each of them played several games in the same playing hall at the same time. Their first meeting where they were introduced and spoke to each other was not until twelve years later. In these annotations a few symbols are employed, with their traditional meanings, namely: b A better move is! Good move?? Blunder!? Interesting move = The position is equal f White has a slight advantage c White has a clear advantage h White has a decisive advantage g Black has a slight advantage Worse is

32 David Levy Acknowledgement 8 The author wishes to thank Frederic Friedel of Chessbase GmbH who kindly ran the annotations feature of Fritz 9 on the above game.