Manuscript Offprint

arXiv:2610.07640

Towards the Automatic Synthesis of Interpretable Chess Tactics

Abhijeet Krishnan, Chris Martens

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

State-of-the-art reinforcement learning agents are capable of outperforming human experts at games like chess, Go and StarCraft II. These agents do not simply take advantage of their digital hardware in being able to react and calculate faster than humans, but employ better strategies that lead to more victories. Interpreting these strategies would give human players valuable insight into how to improve their play. In this preliminary work, we propose a symbolic sub-policy model for playing chess. Inspired by chess tactics, our model attempts to incorporate domain knowledge to improve interpretability. We adapt patterns learned by an inductive logic programming system called PAL to derive our model. We contribute a divergence metric to evaluate our model against a random baseline, and find a set of tactics that is able to suggest moves of similar playing strength to a human beginner. Finally, we propose a computational evaluation scheme for the model by augmenting an off-the-shelf engine with it.

Introduction

Recent advancements in reinforcement learning (RL) have produced agents capable of competing with and even outperforming the best human experts at various games like chess (Silver et al. 2018), Go (Silver et al. 2016), Shogi (Li et al. 2020), Mahjong (Silver et al. 2018), StarCraft II (Vinyals et al. 2019) and Dota 2 (Berner et al. 2019). These agents do not simply take advantage of faster reaction and calculation abilities, but are actually employing new, better strategies that lead to more victories. Borrowing from Jeanette Wing's definition of computational thinking (Wing 2008), these agents have better abstractions than human experts for the games they're trained to play.

Despite the existence of such agents in various competitive games, we still see human competition continue to thrive, with these agents leading to new ways of thinking and a re-evaluation of long-held beliefs about the game. These discoveries have, so far, involved manual or engine-assisted analysis of the games played by the agents (Sadler and Regan 2019; Zhou 2018). If the agents could themselves explain their strategies and decision-making to human players, we posit that it would help improve their play.

Such chess-playing agents (chess engines) are used extensively in game analysis (Smith 2004; Tukmakov 2020) and tournament preparation (Andrei 2021). Expert chess players utilize engine move suggestions and evaluations to analyze new lines to play (PTI 2016). Most current engines use a neural network-based model with many thousands of parameters trained using deep reinforcement learning (DRL) in conjunction with a search algorithm to produce game moves. Examples include Monte Carlo Tree Search in AlphaZero (Silver et al. 2016), Predictor+Upper Confidence Bound tree search in Leela Chess Zero (Pascutto, Gian-Carlo and Linscott, Gary 2019) or alpha-beta pruning in Stockfish 14 (Romstad, Costalba, and Kiiski 2021). However, this is very different to how human chess players employ pattern-recognition to produce moves (de Groot 1946; Connors, Burns, and Campitelli 2011).

Current research in the newly emerging field of explainable RL (XRL) attempts to develop methods to help humans understand RL agent decision. Multiple techniques like t-SNE (Moore and Stamper 2019), trajectory clustering (Osborn, Samuel, and Mateas 2018) and heatmaps (Broll et al. 2019) have been applied to visualize agent behaviour in games. Symbolic policies have been investigated as interpretable representations of neural network-based policies learned via DRL. They have been learned directly from reward signals (Trivedi et al. 2021; Landajuela et al. 2021), as surrogate models for more complex policies (Verma et al. 2018), or from input/output pairs (Derner, Kubalík, and Babuška 2018). However, most research in this area learns policies for optimal control in continuous environments, with discrete game environments like chess receiving little attention.

In this work, we propose a framework to learn a symbolic sub-policy model for chess. We describe our sub-policy as being a collection of first-order logic rules which model chess tactics. We use patterns learned by an existing inductive logic programming (ILP) system called PAL (Patterns and Learning) (Morales 1992) to derive these tactics. We contribute a divergence metric to evaluate our model of a tactic using the move evaluation capabilities of a chess engine. We present an evaluation of a set of tactics obtained from PAL against a random baseline using our metrics. Finally, we propose a computational evaluation of this approach by augmenting a chess engine with the synthesized tactics. We

Copyright © 2022, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

conclude with a discussion on the limitations of this approach, along with future work.

References (54)

  • A supercomputer helped set up the World Chess Championship game
  • Verifiable reinforcement learning via policy extraction (opens arXiv in a new tab)
  • Evolving board-game players with genetic programming
  • A representation and some mechanisms for a problem solving chess program
  • Dota 2 with Large Scale Deep Reinforcement Learning
  • Representation of Knowledge for Chess Endgames Towards a Self-Improving System
  • Knowledge-based problem-solving in AL3
  • Customizing scripted bots: Sample efficient imitation learning for human-like behavior in minecraft
  • Generalized subsumption and its applications to induction and redundancy
  • Synthesizing interpretable strategies for solving puzzle games
  • Evolving agents for the hanabi 2018 cig competition
  • Programming a Computer for Playing Chess
  • Expertise in complex decision making: the role of search in chess 70 years after de Groot
  • Distilling deep reinforcement learning policies in soft decision trees
  • Inductive logic programming at 30: a new introduction (opens arXiv in a new tab)
  • Learning programs by learning from failures
  • Evolving Controllers for Mario AI Using Grammar-based Genetic Programming
  • Het denken van den schaker: een experimenteel-psychologische studie
  • Data-driven construction of symbolic process models for reinforcement learning
  • Learning explanatory rules from noisy data
  • Computer analysis of world chess champions
  • Using heuristic-search based engines for estimating human skill at chess
  • The 20th Top Chess Engine Championship, TCEC20
  • A program to play chess end games
  • Cumulated gain-based evaluation of IR techniques
  • A review of possible effects of cognitive biases on interpretation of rule-based machine learning models
  • Human evaluation of models built for interpretability
  • Discovering symbolic policies with deep reinforcement learning
  • Adaptive pattern-oriented chess
  • Li, J.; Koyamada, S.; Ye, Q.; Liu, G.; Wang, C.; Yang, R.; Zhao, L.; Qin, T.; Liu, T.-Y.; and Hon, H.-W. 2020. Suphx: Mastering mahjong with deep reinforcement learning. arXiv preprint arXiv:2003.13590. (opens arXiv in a new tab)
  • Programmatic Strategies for Real-Time Strategy Games
  • Chess as the Drosophila of AI. In Computers, chess, and cognition, 227–237
  • Acquisition of Chess Knowledge in AlphaZero
  • Aligning Superhuman AI with Human Behavior: Chess as a Model System
  • Exploring Expertise through Visualizing Agent Policies and Human Strategies in Open-Ended Games
  • First order induction of patterns in Chess
  • Visualizing the strategic landscape of arbitrary games
  • A chess combination program which uses plans
  • Explainable reinforcement learning: A survey
  • Computer analysis of world chess championship players
  • Stockfish 14
  • Game Changer
  • Explaining Deep Reinforcement Learning Agents In The Atari Domain through a Surrogate Model
  • Mastering the game of Go with deep neural networks and tree search
  • A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play
  • Modern Chess Analysis
  • Online adaptation of game opponent AI with dynamic scripting
  • Learning to Synthesize Programs as Interpretable and Generalizable Policies
  • Modern Chess Formula - The Powerful Impact of Engines
  • Programmatically interpretable reinforcement learning
  • Grandmaster level in StarCraft II using multi-agent reinforcement learning
  • Using patterns and plans to solve problems and control search
  • Computational thinking and thinking about computing
  • Rethinking Opening Strategy: AlphaGo's Impact on Pro Play