Solving Kriegspiel endings with brute force: the case of KR vs. K

Similar documents
Monte Carlo tree search techniques in the game of Kriegspiel

Algorithmic explorations in a Partial Information Game

Representing Kriegspiel States with Metapositions

COMPUTER PROGRAMMING OF KRIEGSPIEL ENDINGS: THE CASE OF KR VS. K

Solving Problems by Searching: Adversarial Search

Artificial Intelligence

Searching over Metapositions in Kriegspiel

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

More Adversarial Search

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

Artificial Intelligence

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

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

4. Games and search. Lecture Artificial Intelligence (4ov / 8op)

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

Movement of the pieces

CS440/ECE448 Lecture 9: Minimax Search. Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

Artificial Intelligence

Towards Strategic Kriegspiel Play with Opponent Modeling

CSC 380 Final Presentation. Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis

SEARCH VS KNOWLEDGE: EMPIRICAL STUDY OF MINIMAX ON KRK ENDGAME

2 person perfect information

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

The dark side of the board: advances in chess Kriegspiel

Foundations of Artificial Intelligence

Game-playing: DeepBlue and AlphaGo

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

Foundations of Artificial Intelligence

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

Game-Playing & Adversarial Search

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Mastering Chess and Shogi by Self- Play with a General Reinforcement Learning Algorithm

Games CSE 473. Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie!

A Rational Approach to Kriegspiel

SUPPOSE that we are planning to send a convoy through

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

Queen vs 3 minor pieces

Your first step towards nobility

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

After learning the Rules, What should beginners learn next?

Foundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1

Artificial Intelligence Search III

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Learning long-term chess strategies from databases

Pengju

COMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )

Using Neural Networks in the Static Evaluation Function of a Computer Chess Program A master s thesis by Erik Robertsson January 2002

TURNING ADVANTAGE INTO VICTORY IN CHESS: ALGEBRAIC NOTATION (MCKAY CHESS LIBRARY) BY ANDREW SOLTIS

AI in Tabletop Games. Team 13 Josh Charnetsky Zachary Koch CSE Professor Anita Wasilewska

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

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

Adversarial Reasoning: Sampling-Based Search with the UCT algorithm. Joint work with Raghuram Ramanujan and Ashish Sabharwal

Games and Adversarial Search

ADVERSARIAL SEARCH 5.1 GAMES

ROOK VS BISHOP PAWNS 1 VS 1 SAME SIDE

Contents. Foundations of Artificial Intelligence. Problems. Why Board Games?

Chapter 1: Positional Play

CSE 332: Data Structures and Parallelism Games, Minimax, and Alpha-Beta Pruning. Playing Games. X s Turn. O s Turn. X s Turn.

CS188 Spring 2014 Section 3: Games

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

Adversarial Search and Game Playing

LEARN TO PLAY CHESS CONTENTS 1 INTRODUCTION. Terry Marris December 2004

CMPUT 396 Tic-Tac-Toe Game

Adversarial Search: Game Playing. Reading: Chapter

Artificial Intelligence. Minimax and alpha-beta pruning

Games (adversarial search problems)

UNCLASSIFIED UNCLASSIFIED 1

CS 771 Artificial Intelligence. Adversarial Search

Game Engineering CS F-24 Board / Strategy Games

Theory and Practice of Artificial Intelligence

An Experiment in Students Acquisition of Problem Solving Skill from Goal-Oriented Instructions

CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA

A Simple Pawn End Game

Adversarial Search. CMPSCI 383 September 29, 2011

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

Programming Project 1: Pacman (Due )

Outline. Game Playing. Game Problems. Game Problems. Types of games Playing a perfect game. Playing an imperfect game

Automatic Generation of an Evaluation Function for Chess Endgames

Adversarial Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA

Foundations of AI. 6. Board Games. Search Strategies for Games, Games with Chance, State of the Art

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

AI Approaches to Ultimate Tic-Tac-Toe

CS 221 Othello Project Professor Koller 1. Perversi

Computer Game Programming Board Games

Contents. Introduction 5 How to Study this Book 5

Retrograde Analysis of Woodpush

The Series Helpmate: A Test of Imagination for the Practical Player by Robert Pye

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1

Whitcomb Wins Harman Chess Club Championship of 2018

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

Learning to Play like an Othello Master CS 229 Project Report. Shir Aharon, Amanda Chang, Kent Koyanagi

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm

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

CSE 40171: Artificial Intelligence. Adversarial Search: Game Trees, Alpha-Beta Pruning; Imperfect Decisions

Universiteit Leiden Computer Science

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

Transcription:

Solving Kriegspiel endings with brute force: the case of KR vs. K Paolo Ciancarini Gian Piero Favini University of Bologna 12th Int. Conf. On Advances in Computer Games, Pamplona, Spain, May 2009

The problem Endgame tablebases are an essential component of chess programs. They are built through retrograde analysis of the game tree, from the leaves up. Positions in the tablebase are optimal. Can we apply the same concepts to a game of imperfect information?

Kriegspiel Kriegspiel is an imperfect information version of chess. Players do not see their opponent s pieces; they only hear the outcome of each move from a referee. If a player tries to make an illegal move, he is allowed to try again.

Kriegspiel endgames The endgame is quite interesting in Kriegspiel, because what is enough material to mate in chess might not be sufficient in Kriegspiel. Mating the lone king is the main object of interest. We use the graphical notation on the right to represent an enemy king whose position is not perfectly known. This is a mate in 1.

Notes The enemy king positions look like a quantum wave because its location is undetermined until we try a move. Some Kriegspiel endgames can only be won with probability approaching 1; we limit our analysis to cases where victory is certain. This is almost always the case in our scenario, the KRK endgame (King and Rook versus King).

Existing solutions (1/2) So far, there were two ways of solving these endgames, neither of which is fully satisfactory. Method #1: informal algorithms such as Boyce for KRK. Reach this position and then try these moves Does it always work? Is it optimal? How difficult is it to implement?

Existing solutions (2/2) = X Method #2: evaluation function. Each position can be evaluated according to some heuristics (such as, having kings on the edge of the board is better than in the middle). We then run a minimax-like search to decide our move. This performs better than an informal algorithm, but is not flawless, either (possible loops, incomplete or suboptimal functions)

Our approach We apply retrograde analysis to Kriegspiel endgames. Our algorithm takes a list of positions that can be won in up to X moves, and generates the list of positions that can be won in (X+1) moves. The goal is to have a full list of won positions, together with the optimal move. Optimal means that it leads to the fastest mate in the worst case, without making any assumptions on the opponent.

Problem size The Kriegspiel state space is huge. The main risk is that the list be too large to be computed and stored. There are up to 52 possible king squares on a KRK board. Even with mirroring, there are 630 ways to place White s pieces. There are ~ 10 17 theoretical combinations. However, most of them are irrelevant as they become undistinguishable after two plies.

Board generation Given a move, a position can generate several new positions depending on the referee s feedback. In this example, Kc3 can be silent, rank check or illegal. Our algorithm performs the inverse step; starting from the three possible results, it would recover the starting position.

The algorithm It maintains a list of active positions. For all moves and White piece layouts, all compatible positions are tried as the hypothetical results of that move. When a new position is constructed that is not a subset of one already in the list, it is added to the list. When no more positions are found, the algorithm proceeds to the next depth level. As we try all combinations, we will necessarily find the optimal solutions.

Optimizations As each position is tried for each referee message, this algorithm is exponential in the number of referee messages. Optimization is extremely important. Most optimizations consist of dropping unnecessary positions and duplicates, or ignoring positions that are clearly not going to add anything.

Querying the tablebase If the current position is not in the tablebase, we return its superset with the shortest distance from mate. If no such superset exists, it means there is no forced mate from this position.

KRK Statistics Computed in 10 days (3 days with optimized algorithm) on a single computer. The resulting tablebase includes slightly over 10 6 positions; only 1 in 10 10 positions turn out to be significant. The longest forced mate is 41 moves, making the 50-move rule harmless.

Active positions 350000 300000 250000 200000 150000 100000 50000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 Positions that are not a subset of another position: a measure of complexity.

Longest mate 41 moves It takes White 9 moves to secure the Rook: Rf4, Kc2, Rf8, Kd3, Rg8, Rh8, Rh1, Rd1, Kc2. Many positions in the tablebase look like riddles, but their subsets can occur in normal play.

Future research Can our approach be extended to cases where White wins almost certainly? KRK is actually the simplest Kriegspiel endgame. Other cases are being researched. KQK (interestingly, harder to solve than KRK, due to more possible referee messages) KBBK and KBNK

Question time