Deriving Concepts and Strategies from Chess Tablebases Matej Guid, Martin Možina, Aleksander Sadikov, and Ivan Bratko Faculty of Computer and Information.

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Advertisements

Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
1 State-Space representation and Production Systems Introduction: what is State-space representation? What are the important trade-offs? (E.Rich, Chapt.2)
1 CS 385 Fall 2006 Chapter 4 Heuristic Search. 2 Heuristics eurisko ("I discover" in Greek) "the study of the methods and rules of discovery and invention."
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Learning Positional Features for Annotating Chess Games: A Case Study Matej Guid, Martin Mozina, Jana Krivec, Aleksander Sadikov and Ivan Bratko CG 2008.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
Games & Adversarial Search
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Adversarial Search Chapter 6 Section 1 – 4.
Adversarial Search Chapter 5.
"Programming a Computer to Play Chess" A presentation of C. Shannon's 1950 paper by Andrew Oldag April
Adversarial Search Chapter 6.
Artificial Intelligence in Game Design Heuristics and Other Ideas in Board Games.
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
Find a Path s A D B E C F G Heuristically Informed Methods  Which node do I expand next?  What information can I use to guide this.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Factors Affecting Diminishing Returns for Searching Deeper Matej Guid and Ivan Bratko CGW 2007.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
G OAL -O RIENTED C ONCEPTUALIZATION OF P ROCEDURAL K NOWLEDGE Martin Možina, Matej Guid, Aleksander Sadikov, Vida Groznik, Ivan Bratko Artificial Intelligence.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
KU NLP Heuristic Search Heuristic Search and Expert Systems (1) q An interesting approach to implementing heuristics is the use of confidence.
Game Playing.
Artificial Intelligence in Game Design Lecture 22: Heuristics and Other Ideas in Board Games.
1 Learning Agents Laboratory Computer Science Department George Mason University Prof. Gheorghe Tecuci 3. Rote Learning.
Introduction Many decision making problems in real life
Othello Artificial Intelligence With Machine Learning
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Games as Game Theory Systems (Ch. 19). Game Theory It is not a theoretical approach to games Game theory is the mathematical study of decision making.
Game-playing AIs Part 1 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part I (this set of slides)  Motivation  Game Trees  Evaluation.
University of Amsterdam Search, Navigate, and Actuate – Search through Game Trees Arnoud Visser 1 Game Playing Search the action space of 2 players Russell.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Well Posed Learning Problems Must identify the following 3 features –Learning Task: the thing you want to learn. –Performance measure: must know when you.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
 2003, G.Tecuci, Learning Agents Laboratory 1 Learning Agents Laboratory Computer Science Department George Mason University Prof. Gheorghe Tecuci 2.
For Friday Finish chapter 6 Program 1, Milestone 1 due.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Outline Intro to Representation and Heuristic Search Machine Learning (Clustering) and My Research.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 42 Wednesday, 14.
CSE473 Winter /04/98 State-Space Search Administrative –Next topic: Planning. Reading, Chapter 7, skip 7.3 through 7.5 –Office hours/review after.
Solving Kriegspiel endings with brute force: the case of KR vs. K Paolo Ciancarini Gian Piero Favini University of Bologna.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Well Posed Learning Problems Must identify the following 3 features –Learning Task: the thing you want to learn. –Performance measure: must know when you.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Fighting Knowledge Acquisition Bottleneck
Using Cognitive Science To Inform Instructional Design
Influence of Search Depth on Position Evaluation
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Adversarial Search.
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Game Playing Fifth Lecture 2019/4/11.
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

Deriving Concepts and Strategies from Chess Tablebases Matej Guid, Martin Možina, Aleksander Sadikov, and Ivan Bratko Faculty of Computer and Information Science University of Ljubljana, Slovenia May 2009 Advances in Computers and Games (ACG 12) Pamplona, Spain, May 11-13, 2009

Introduction Chess tablebases contain a wealth of knowledge, however, mining for this knowledge, manually or automatically, proved as extremely difficult. RESEARCH QUESTION How to produce human-understandable models and use them to generate instructions suitable for teaching humans? RESEARCH QUESTION How to produce human-understandable models and use them to generate instructions suitable for teaching humans? Machine learning from tablebases did not yield much success… relatively small domains (such as KRK endgame in chess) resulting models are hardly intelligible to human experts (novices, beginners…)

IF... THEN ABML hierarchical goal-based rules textbook instructionsgames with instructions

Obtaining Knowledge from Domain Expert Computer (to the expert): What goal would you suggest for white in this position? What are the reasons for this goal to apply in this position? The expert (a FIDE master): Black king is quite close to the edge of the board, but the king is not constrained by white pieces. Therefore I would suggest White to constrain black king. A new attribute king_constrained was introduced. The argument was used to induce a new rule.

Strategic Goal-Based Rules Hierarchical model of an ordered set of rules of the following form: IF preconditions THEN goal Preconditions and goals are both expressed by using the features that resulted from the knowledge elicitation process. IF edist < 3 AND king_constrained = false THEN king_constrained = true AND edist should not increase added by computer induced from experts argument preconditions: conjunction of particular conditions goal: conjuction of particular subgoals The expert may add, modify, and/or remove any of the preconditions and subgoals. It is important to rely on common knowledge about the domain! The expert may add, modify, and/or remove any of the preconditions and subgoals. It is important to rely on common knowledge about the domain!

Strategic Goal-Based Rules Hierarchical model of an ordered set of rules of the following form: IF preconditions THEN goal Preconditions and goals are both expressed by using the features that resulted from the knowledge elicitation process. IF edist < 3 AND king_constrained = false THEN king_constrained = true AND edist should not increase added by computer induced from experts argument A subgoal can specify: desired value of an attribute: true/false,, … its optimization: minimize, maximize qualitative changes: decrease, increase, not decrease, not increase A subgoal can specify: desired value of an attribute: true/false,, … its optimization: minimize, maximize qualitative changes: decrease, increase, not decrease, not increase

F|5 F|-- T|6 F|7 F|-- goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX iterative deepening goal achievable: player MAX can force its execution desirable: distance to mate decreases at given search depth allowing non-optimal play, but aiming towards final goal: delivering checkmate 7

?|? T|7 F|6 ?|? T|5 T|4 F|4 F|6 ?|??|? goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX the student can sometimes achieve the goal in several ways do they all decrease distance to mate? 7

T|5 ?|? T|7 F|6 T|6 T|8 ?|? T|5 T|4 F|4 F|6 ?|??|? goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX the student can sometimes achieve the goal in several ways do they all decrease distance to mate? 7

T|5 T|6 T|7 F|6 T|6 T|8 T|9 T|5 T|4 F|4 F|6 ?|??|? goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX the student can sometimes achieve the goal in several ways do they all decrease distance to mate? 7

T|5 T|6 T|7 F|6 T|6 T|8 T|9 T|5 T|4 F|4 F|6 T|10 goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX the student can sometimes achieve the goal in several ways do they all decrease distance to mate? 7

T|5 T|6 T|7 F|6 T|6 T|8 T|9 T|5 T|4 F|4 F|6 T|10 goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX 7 goal achievable dtm decreases goal achievable dtm does not decrease

T|5 T|6 T|7 F|6 T|6 T|8 T|9 T|5 T|4 F|4 F|6 T|10 goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX 7 max search depth Counter example: goal can be achieved, but resulting play does NOT decrease distance to mate

T|5 T|6 T|7 F|6 T|6 T|8 T|9 T|5 T|4 F|4 F|6 T|10 goal achievabledistance to mate Achievability of Goals search depth MAX MIN MAX 7 max search depth Among counter examples, the position with highest distance to mate is chosen as the key counter example.

Key counter example Computer (to the expert): Would you admonish a student if he or she played 1.Rd1-c1 in this position?" 1.Ke7-d7 is optimal move according to tablebases: achieves mate in 6 moves (after 1...Kb7-b6 2.Rd1-d5!) 1.Rd1-c1 is the worst possible execution of suggested goal (constrain king…) achieves mate in 11 moves -> much worse!

Key counter example Computer (to the expert): Would you admonish a student if he or she played 1.Rd1-c1 in this position?" Human players typically choose a longer path to win by systematically achieving intermediate goals. The resulting play in counter examples should lead to overall progress towards achieving the final goal of delivering checkmate.

Key counter example Computer (to the expert): Would you admonish a student if he or she played 1.Rd1-c1 in this position?" The expert found this execution of the goal to be perfectly acceptable. The rule IF edist < 3 AND king constrained = false THEN king constrained = true AND edist should not increase was therefore accepted.

Hierarchy of Goals goal is achievable also when goals can be executed regardless of the defender's play (optimal or non-optimal) the student is instructed to always try to execute the highest achievable goal typical of a human way of thinking It would be redundant to express goals in the following way: Constrain black king or deliver a checkmate, if the opponent plays badly and allows it." It would be redundant to express goals in the following way: Constrain black king or deliver a checkmate, if the opponent plays badly and allows it."

Constructing Human-Friendly Instructions instructions are obtained by stating only the progressive subgoal IF king_constrained = false … THEN king constrained = true … IF … THEN edist should decrease IF edist>0 … THEN edist=0 the exception is the last, default goal IF edist < 1 THEN edist should not increase AND knight_on_edge = false AND wrong_corner_way should decrease AND wrong_corner_way minimize AND white_king_more_central = true derived instruction: Block the way to the wrong corner."

Obtaining Diagrams and Variations desirable to provide most useful representation of the goals and concepts simulations of delivering checkmate randomly chosen initial positions the program used hierarchy of goals as a heuristic execution of goals in these simulations was optimal (quickest play) For each goal… Position that occurred most frequently is presented by a diagram. When several positions occurred equally frequently, more diagrams were used and variation (sequence of moves) given. For each goal… Position that occurred most frequently is presented by a diagram. When several positions occurred equally frequently, more diagrams were used and variation (sequence of moves) given.

The Bishop and Knight Checkmate (KBNK) regarded as the most difficult of the elementary mates general strategy: driving the opposing king to the edge of the board forcing the king to the appropriate corner delivering a checkmate only knowing this basic strategy hardly suffices for delivering checkmate For example, grandmaster Epishin (Kempinski-Epishin, Bundesliga 2001) failed to force the defending king to the appropriate corner and the game ended in a draw. No formalized models for KBNK endgame suitable for teaching purposes were derived by any machine-learning programs.

Derived Strategy, Concepts, and Example Games 1. (highest) goal: Deliver checkmate. 2. goal: Prepare the knight for checkmate. 3. goal: Restrain black to a minimal area beside the right corner. 4. goal: Build a barrier and squeeze black king's area. 5. goal: Approach black from the center. 6. goal: Block the way to the wrong corner. 7. goal: Push black towards the right corner. 8. goal: Push black towards the edge. 9. goal: Approach with the king. 10. goal: Bring the knight closer to black king. default goal: Keep the kings close. A strategy is an ordered list of goals: The rule-based model for KBNK, description of the attributes and example games containing automatically generated instructions can be found in a web appendix at

Evaluation Three chess teachers (among them a selectors of Slovenian women's and youth squad) all agreed on the usefulness of the presented concepts and found the derived strategy suitable for educational purposes. Among the reasons to support this assessment was that the instructions clearly demonstrate the intermediate subgoals of delivering checkmate. The rules by using them as a heuristic function for 6-ply minimax search to play 100 randomly chosen KBNK positions (at least 28 moves to mate with optimal play) against perfect defender: quickest play: average game length was 32 moves, 100% checkmate slowest play: average game length was 38 moves, 100% checkmate Four strong grandmasters were asked to express their assessment for each game to what degree (1 to 10) they find KRK play to be human-like: our program tablebases

Conclusions We developed a procedure for semi-automatic synthesis of textbook instructions for teaching the difficult KBNK endgame, accompanied by example games containing generated instructions. Derived strategy includes concepts and key positions from KBNK that help the human learner to easily understand main principles of this strategy: detected automatically from simulated games goals enable correct play also against sub-optimal defence Positive assessment of derived textbook instructions by chess coaches We explained : guidelines for interaction between the machine and the expert to obtain a human-understandable rule-based model for playing a chess endgame how the instructions, including illustrative diagrams, could be derived semi-automatically from such a model.