Automatically Solving Chess Variants

Total Page:16

File Type:pdf, Size:1020Kb

Automatically Solving Chess Variants Automatically solving chess variants Fr´ed´ericProst [email protected] December 7, 2017 Internship Motivations The game of chess has often been presented as "unsolvable" due to the enormous size of the space search. Indeed, it is estimated that the number of legal positions of this game lies around 1043 and 1050, and the number of interesting games is roughly 10120 (ref. Shannon number). These numbers have to be seen at the light of the number of atoms in the universe which is estimated to 1080. Nevertheless, using an hybrid human/computer approach, it has been possi- ble to solve a smaller variant of chess on a 5x5 board (see [1]). The space search of this variant is around 1020, roughly equivalent to that of the checkers game on 8x8 board (see [2]). A small web site has been made to gather informations on the solved variants of chess: http://membres-lig.imag.fr/prost/MiniChessResolution/. We have developped some ideas to completely automatize the proof search. The aim of the internship is to work them on and implement these ideas and ulitmately to test them on several variants of chess (notably Los Alamos chess and atomic chess). Internship Objectives The aim of the internship is to implement an oracle finder in a distributed way. More precisely: • Implement an oracle finder that starting from a position builds a formal proof of the theoretical value of the position. • Implement a mate finder based on asymetrical search once an unbalanced position is reached. • Conduct tests to find heuristics in order to downsize the size of the oralces produced. Further researches could investigate machine learning in order to find out those heuristics autmatically. 1 Location This intership will be held at the LIG laboratory in Grenoble France in the team CAPP, coached by Fr´ed´ericProst. Requisite skills and abilities • C++ programming • Artificial Intelligence • Ability to modify large programs (typically stockfish) • Curiosity... References [1] M. Mahlla and F. Prost. Gardner's minichess is solved. International Com- puter Games Association Journal, 2013. International Computer Games Asso- ciation Journal, 36(4), 2013. Article available here. [2] Jonathan Schaeffer, Neil Burch, Yngvi Bj¨ornssonAkihiro Kishimoto, Martin M¨uller,Robert Lake, Paul Lu and Steve Sutphen. Checkers Is Solved. Science Vol. 317, Issue 5844, pp. 1518-1522, 2007. Article available here. 2.
Recommended publications
  • Preparation of Papers for R-ICT 2007
    Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm Ryan Ignatius Hadiwijaya / 13511070 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung, Jl. Ganesha 10 Bandung 40132, Indonesia [email protected] Abstract—Chess is popular game played by many people 1. Any player checkmate the opponent. If this occur, in the world. Aside from the normal chess game, there is a then that player will win and the opponent will special board configuration that made chess puzzle. Chess lose. puzzle has special objective, and one of that objective is to 2. Any player resign / give up. If this occur, then that checkmate the opponent within specifically number of moves. To solve that kind of chess puzzle, branch and bound player is lose. algorithm can be used for choosing moves to checkmate the 3. Draw. Draw occur on any of the following case : opponent. With good heuristics, the algorithm will solve a. Stalemate. Stalemate occur when player doesn‟t chess puzzle effectively and efficiently. have any legal moves in his/her turn and his/her king isn‟t in checked. Index Terms—branch and bound, chess, problem solving, b. Both players agree to draw. puzzle. c. There are not enough pieces on the board to force a checkmate. d. Exact same position is repeated 3 times I. INTRODUCTION e. Fifty consecutive moves with neither player has Chess is a board game played between two players on moved a pawn or captured a piece. opposite sides of board containing 64 squares of alternating colors.
    [Show full text]
  • Should Chess Players Learn Computer Security?
    1 Should Chess Players Learn Computer Security? Gildas Avoine, Cedric´ Lauradoux, Rolando Trujillo-Rasua F Abstract—The main concern of chess referees is to prevent are indeed playing against each other, instead of players from biasing the outcome of the game by either collud- playing against a little girl as one’s would expect. ing or receiving external advice. Preventing third parties from Conway’s work on the chess grandmaster prob- interfering in a game is challenging given that communication lem was pursued and extended to authentication technologies are steadily improved and miniaturized. Chess protocols by Desmedt, Goutier and Bengio [3] in or- actually faces similar threats to those already encountered in der to break the Feige-Fiat-Shamir protocol [4]. The computer security. We describe chess frauds and link them to their analogues in the digital world. Based on these transpo- attack was called mafia fraud, as a reference to the sitions, we advocate for a set of countermeasures to enforce famous Shamir’s claim: “I can go to a mafia-owned fairness in chess. store a million times and they will not be able to misrepresent themselves as me.” Desmedt et al. Index Terms—Security, Chess, Fraud. proved that Shamir was wrong via a simple appli- cation of Conway’s chess grandmaster problem to authentication protocols. Since then, this attack has 1 INTRODUCTION been used in various domains such as contactless Chess still fascinates generations of computer sci- credit cards, electronic passports, vehicle keyless entists. Many great researchers such as John von remote systems, and wireless sensor networks.
    [Show full text]
  • 200 Játék a Sakktáblán
    sakkvaransokUJ.qxd 10/11/2006 12:47 PM Page 1 Birkás György 200 játék a sakktáblán ÕRÜLET FEKETÉN-FFEEHHÉÉRREENN Magyar Sakkvilág, 2006 sakkvaransokUJ.qxd 10/11/2006 12:47 PM Page 2 Magyar Sakkvilág könyvei sorozat VII. kötete 200 játék a sakktáblán Birkás György, 2006 Mûszaki szerkesztõ: Maros Gábor ISSN 1787-3568 ISBN Kiadó: Magyar Sakkvilág sakkvaransokUJ.qxd 10/11/2006 12:47 PM Page 3 3 Fejezet cím Elõszó Kr.u. 500 körül Indiában jelent meg az elsõ sakkra emlékeztetõ játék, a csaturanga. Nyugat felé terjedve az általunk ismert sakká változott, észak felé terjedve a kínai sakk (xiangqi) és a japán sakk (shogi) alakult ki. A janggi Korea, a makruk Thaiföld, a sittuyin Burma nemzeti sakkja. A nyugati sakknak is több mint ezer változata ismert. A változatok a hagyományostól eltérhetnek a tábla méretével, új figurákkal, új szabá- lyokkal, vagy többszörös lépéslehetõséggel, esetleg a véletlen szerep- hez juttatásával. Sok változatot találtak ki a sakktábla méretére: bonyolították a játékot nagyobb táblán (pl. az Aljechin-sakk 14x8-as táblán új figurákkal; egyik ezek közül egyesíti a bástya és huszár lépéslehetõségeit), vagy egyszerû- sítették a játékot kisebb táblán. Egészen új lehetõséget ad a játéknak az, ha nem négyzet alakú mezõ- kön játsszák. A legelterjedtebb ezek közül a hexasakk, több Európa-baj- nokságot rendeztek már. A tábla 30 fehér, 30 fekete és 31 szürke mezõ- bõl álló szabályos hatszög alakú tábla. Könyvemben csak a hagyományos, 8x8-as táblán, hagyományos figurákkal játszható sakkváltozatokkal foglalkozom. Reményem sakkvaransokUJ.qxd 10/11/2006 12:47 PM Page 4 200 játék a sakktáblán 4 szerint ezek közül is a legérdekesebbeket, legszórakoztatóbbakat sike- rült összegyûjtenem.
    [Show full text]
  • Learn Chess the Right Way
    Learn Chess the Right Way Book 5 Finding Winning Moves! by Susan Polgar with Paul Truong 2017 Russell Enterprises, Inc. Milford, CT USA 1 Learn Chess the Right Way Learn Chess the Right Way Book 5: Finding Winning Moves! © Copyright 2017 Susan Polgar ISBN: 978-1-941270-45-5 ISBN (eBook): 978-1-941270-46-2 All Rights Reserved No part of this book maybe used, reproduced, stored in a retrieval system or transmitted in any manner or form whatsoever or by any means, electronic, electrostatic, magnetic tape, photocopying, recording or otherwise, without the express written permission from the publisher except in the case of brief quotations embodied in critical articles or reviews. Published by: Russell Enterprises, Inc. PO Box 3131 Milford, CT 06460 USA http://www.russell-enterprises.com [email protected] Cover design by Janel Lowrance Front cover Image by Christine Flores Back cover photo by Timea Jaksa Contributor: Tom Polgar-Shutzman Printed in the United States of America 2 Table of Contents Introduction 4 Chapter 1 Quiet Moves to Checkmate 5 Chapter 2 Quite Moves to Win Material 43 Chapter 3 Zugzwang 56 Chapter 4 The Grand Test 80 Solutions 141 3 Learn Chess the Right Way Introduction Ever since I was four years old, I remember the joy of solving chess puzzles. I wrote my first puzzle book when I was just 15, and have published a number of other best-sellers since, such as A World Champion’s Guide to Chess, Chess Tactics for Champions, and Breaking Through, etc. With over 40 years of experience as a world-class player and trainer, I have developed the most effective way to help young players and beginners – Learn Chess the Right Way.
    [Show full text]
  • Yearbook.Indb
    PETER ZHDANOV Yearbook of Chess Wisdom Cover designer Piotr Pielach Typesetting Piotr Pielach ‹www.i-press.pl› First edition 2015 by Chess Evolution Yearbook of Chess Wisdom Copyright © 2015 Chess Evolution All rights reserved. No part of this publication may be reproduced, stored in a retrieval sys- tem or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, photocopying, recording or otherwise, without prior permission of the publisher. isbn 978-83-937009-7-4 All sales or enquiries should be directed to Chess Evolution ul. Smutna 5a, 32-005 Niepolomice, Poland e-mail: [email protected] website: www.chess-evolution.com Printed in Poland by Drukarnia Pionier, 31–983 Krakow, ul. Igolomska 12 To my father Vladimir Z hdanov for teaching me how to play chess and to my mother Tamara Z hdanova for encouraging my passion for the game. PREFACE A critical-minded author always questions his own writing and tries to predict whether it will be illuminating and useful for the readers. What makes this book special? First of all, I have always had an inquisitive mind and an insatiable desire for accumulating, generating and sharing knowledge. Th is work is a prod- uct of having carefully read a few hundred remarkable chess books and a few thousand worthy non-chess volumes. However, it is by no means a mere compilation of ideas, facts and recommendations. Most of the eye- opening tips in this manuscript come from my refl ections on discussions with some of the world’s best chess players and coaches. Th is is why the book is titled Yearbook of Chess Wisdom: it is composed of 366 self-suffi - cient columns, each of which is dedicated to a certain topic.
    [Show full text]
  • Some Chess-Specific Improvements for Perturbation-Based Saliency Maps
    Some Chess-Specific Improvements for Perturbation-Based Saliency Maps Jessica Fritz Johannes Furnkranz¨ Johannes Kepler University Johannes Kepler University Linz, Austria Linz, Austria [email protected] juffi@faw.jku.at Abstract—State-of-the-art game playing programs do not pro- vide an explanation for their move choice beyond a numerical score for the best and alternative moves. However, human players want to understand the reasons why a certain move is considered to be the best. Saliency maps are a useful general technique for this purpose, because they allow visualizing relevant aspects of a given input to the produced output. While such saliency maps are commonly used in the field of image classification, their adaptation to chess engines like Stockfish or Leela has not yet seen much work. This paper takes one such approach, Specific and Relevant Feature Attribution (SARFA), which has previously been proposed for a variety of game settings, and analyzes it specifically for the game of chess. In particular, we investigate differences with respect to its use with different chess Fig. 1: SARFA Example engines, to different types of positions (tactical vs. positional as well as middle-game vs. endgame), and point out some of the approach’s down-sides. Ultimately, we also suggest and evaluate a neural networks [19], there is also great demand for explain- few improvements of the basic algorithm that are able to address able AI models in other areas of AI, including game playing. some of the found shortcomings. An approach that has recently been proposed specifically for Index Terms—Explainable AI, Chess, Machine learning games and related agent architectures is specific and relevant feature attribution (SARFA) [15].1 It has been shown that it I.
    [Show full text]
  • Chess Composer Werner 2
    Studies with Stephenson I was delighted recently to receive another 1... Êg2 2. Îxf2+ Êh1 3 Í any#, or new book by German chess composer Werner 2... Êg3/ Êxh3 3 Îb3#. Keym. It is written in English and entitled Anything but Average , with the subtitle Now, for you to solve, is a selfmate by one ‘Chess Classics and Off-beat Problems’. of the best contemporary composers in the The book starts with some classic games genre, Andrei Selivanov of Russia. In a and combinations, but soon moves into the selfmate White is to play and force a reluctant world of chess composition, covering endgame Black to mate him. In this case the mate has studies, directmates, helpmates, selfmates, to happen on or before Black’s fifth move. and retroanalysis. Werner has made a careful selection from many sources and I was happy to meet again many old friends, but also Andrei Selivanov delighted to encounter some new ones. would happen if it were Black to move. Here 1st/2nd Prize, In the world of chess composition, 1... Êg2 2 Îxf2+ Êh1 3 Í any#; 2... Êg3/ Êxh3 Uralski Problemist, 2000 separate from the struggle that is the game, 3 Îb3# is clear enough, but after 1...f1 Ë! many remarkable things can happen and you there is no mate in a further two moves as will find a lot of them in this book. Among the 2 Ía4? is refuted by 2... Ëxb1 3 Íc6+ Ëe4+! . most remarkable are those that can occur in So, how to provide for this good defence? problems involving retroanalysis.
    [Show full text]
  • Dorian Van Den Heede Reinforcement Learning Teaching Computers To
    Teaching Computers to Play Chess Through Deep Reinforcement Learning Dorian Van den Heede Supervisors: Prof. dr. ir. Francis wyffels, Prof. dr. ir. Joni Dambre Counsellors: Ir. Jeroen Burms, Prof. dr. ir. Francis wyffels, Prof. dr. ir. Joni Dambre Master's dissertation submitted in order to obtain the academic degree of Master of Science in Computer Science Engineering Department of Electronics and Information Systems Chair: Prof. dr. ir. Rik Van de Walle Faculty of Engineering and Architecture Academic year 2016-2017 2 To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep; To sleep: perchance to dream: ay, there's the rub; For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause: there's the respect That makes calamity of so long life; For who would bear the whips and scorns of time, The oppressor's wrong, the proud man's contumely, The pangs of disprized love, the law's delay, The insolence of office and the spurns That patient merit of the unworthy takes, When he himself might his quietus make With a bare bodkin? who would fardels bear, To grunt and sweat under a weary life, But that the dread of something after death, The undiscover'd country from whose bourn No traveller returns, puzzles the will And makes us rather bear those ills we have Than fly to others that we know not of? Thus conscience does make cowards of us all; And thus the native hue of resolution Is sicklied o'er with the pale cast of thought, And enterprises of great pith and moment With this regard their currents turn awry, And lose the name of action.
    [Show full text]
  • Chess Algorithms Theory and Practice
    Chess Algorithms Theory and Practice Rune Djurhuus Chess Grandmaster [email protected] / [email protected] October 4, 2018 1 Content • Complexity of a chess game • Solving chess, is it a myth? • History of computer chess • AlphaZero – the self-learning chess engine • Search trees and position evaluation • Minimax: The basic search algorithm • Negamax: «Simplified» minimax • Node explosion • Pruning techniques: – Alpha-Beta pruning – Analyze the best move first – Killer-move heuristics – Zero-move heuristics • Iterative deeper depth-first search (IDDFS) • Search tree extensions • Transposition tables (position cache) • Other challenges • Endgame tablebases • Demo 2 Complexity of a Chess Game • 20 possible start moves, 20 possible replies, etc. • 400 possible positions after 2 ply (half moves) • 197 281 positions after 4 ply • 713 positions after 10 ply (5 White moves and 5 Black moves) • Exponential explosion! • Approximately 40 legal moves in a typical position • There exists about 10120 possible chess games 3 Solving Chess, is it a myth? Assuming Moore’s law works in Chess Complexity Space the future • The estimated number of possible • Todays top supercomputers delivers 120 chess games is 10 1016 flops – Claude E. Shannon – 1 followed by 120 zeroes!!! • Assuming 100 operations per position 14 • The estimated number of reachable yields 10 positions per second chess positions is 1047 • Doing retrograde analysis on – Shirish Chinchalkar, 1996 supercomputers for 4 months we can • Modern GPU’s performs 1013 flops calculate 1021 positions.
    [Show full text]
  • Women's Underperformance in Chess
    Women’s Underperformance in Chess: The Armenian Female Champions by Ani Harutyunyan Presented to the Department of English & Communications in Partial Fulfillment of the Requirements for the Degree of Bachelor of Arts American University of Armenia Yerevan, Armenia May 22, 2019 WOMEN’S UNDERPERFORMANCE IN CHESS 2 Table of Contents Abstract…………………………………………………………………………………………...3 Introduction……………………………………………………………………………………..4-8 Literature review……………………………………………………………………………….9-15 Key terms and definitions…………………………………………………………………….16-17 Research questions……………………………………………………………………………….18 Methodology……………………………………………………………………………….…19-20 Research findings and analysis……………………………………………………………….21-33 Limitations and avenues for future research……………………………………………………..34 Conclusion……………………………………………………………………………………….35 References…………………………………………………………………………………....36-40 Appendices…………………………………………………………………………………...41-48 WOMEN’S UNDERPERFORMANCE IN CHESS 3 Abstract Women have historically been underrepresented and less successful in chess as compared to men. Despite a few female players who have managed to qualify for the highest-rated chess tournaments and perform on an equal level with men, the chess world continues to be male- dominated. From time to time, different female players make achievements among men, but they fail to show consistent results. This project focuses on Armenia, which, despite its small population size, nearly three million people (Worldometers, 2019), ranks the seventh in the world by the average rating of its all-time top 10 players (Federations Ranking, n.d.-a) and the 18th by the rating of female players (Federations Ranking, n.d.-b). It represents the stories and concerns of the strongest Armenian female players of different age groups and aims to understand the reasons for their relatively less success in chess. WOMEN’S UNDERPERFORMANCE IN CHESS 4 Introduction In 1991, the world witnessed a young Hungarian girl breaking a record that had stood for 33 years.
    [Show full text]
  • The Classified Encyclopedia of Chess Variants
    THE CLASSIFIED ENCYCLOPEDIA OF CHESS VARIANTS I once read a story about the discovery of a strange tribe somewhere in the Amazon basin. An eminent anthropologist recalls that there was some evidence that a space ship from Mars had landed in the area a millenium or two earlier. ‘Good heavens,’ exclaims the narrator, are you suggesting that this tribe are the descendants of Martians?’ ‘Certainly not,’ snaps the learned man, ‘they are the original Earth-people — it is we who are the Martians.’ Reflect that chess is but an imperfect variant of a game that was itself a variant of a germinal game whose origins lie somewhere in the darkness of time. The Classified Encyclopedia of Chess Variants D. B. Pritchard The second edition of The Encyclopedia of Chess Variants completed and edited by John Beasley Copyright © the estate of David Pritchard 2007 Published by John Beasley 7 St James Road Harpenden Herts AL5 4NX GB - England ISBN 978-0-9555168-0-1 Typeset by John Beasley Originally printed in Great Britain by Biddles Ltd, King’s Lynn Contents Introduction to the second edition 13 Author’s acknowledgements 16 Editor’s acknowledgements 17 Warning regarding proprietary games 18 Part 1 Games using an ordinary board and men 19 1 Two or more moves at a time 21 1.1 Two moves at a turn, intermediate check observed 21 1.2 Two moves at a turn, intermediate check ignored 24 1.3 Two moves against one 25 1.4 Three to ten moves at a turn 26 1.5 One more move each time 28 1.6 Every man can move 32 1.7 Other kinds of multiple movement 32 2 Games with concealed
    [Show full text]
  • Review Article
    Amu Ban 201 ARTIFICIAL INTELLIGENCE Review Article A Chronology of Computer Chess and its Literature Hans J. Berliner Computer Science Department, Carnegie-Mellon University, Pittsburgh, PA, U.S.A. on While our main objective in this article is to review a spate of recent books surveying computer chess, we believe this can best be done in the context of the field as a whole, and pointing outvaluable contributions to the literature,both past consider and present. We have appended a bibliography of those items which we to constitute a definitive set of readings on the subject at hand. Pre-History instance was Even before there were computers there was computer chess. The first which played a famous automaton constructed by Baron von Kempclen in 1770, excellent chess. It won most of its games against all comers which supposedly included Napoleon. The automaton consisted of a large box with chess pieces on fashion, top and aproliferation of gear wheels inside, which were shown in magician 1 However, one compartment at a time to the audience before a performance. a skilled (and small) chessplayer was artfullyhidden in the midst ofall this machinery, and this was the actual reason for the "mechanism's" success. In contrast, a genuine piece of science was the electro-mechanical device con- of structed by Torres y Quevedo, a Spanish engineer, in 1890 which was capable mating with king and rook vs. king. Its construction was certainly a marvel of its day. The Dawn few, Shannon In 1950, when computers were becomingavailable to a selccl Claude describing a chess then of Bell Telephone Laboratories wrote an article how Artificial Intelligence 10 0978), 201-214 Copyright © 1978 by North-Holland Publishing Company 202 H.
    [Show full text]