A Chess Engine

Total Page:16

File Type:pdf, Size:1020Kb

A Chess Engine A Chess Engine Paul Dailly Dominik Gotojuch Neil Henning Keir Lawson Alec Macdonald Tamerlan Tajaddinov University of Glasgow Department of Computing Science Sir Alwyn Williams Building Lilybank Gardens Glasgow G12 8QQ March 18, 2008 Abstract Though many computer chess engines are available, the number of engines using object orientated approaches to the problem is minimal. This report documents an implementation of an object oriented chess engine. Traditionally, in order to gain the advantage of speed, the C language is used for implementation, however, being an older language, it lacks many modern language features. The chess engine documented within this report uses the modern Java language, providing features such as reflection and generics that are used extensively, allowing for complex but understandable code. Also of interest are the various depth first search algorithms used to produce a fast game, and the numerous functions for evaluating different characteristics of the board. These two fundamental components, the evaluator and the analyser, combine to produce a fast and relatively skillful chess engine. We discuss both the design and implementation of the engine, along with details of other approaches that could be taken, and in what manner the engine could be expanded. We conclude by examining the engine empirically, and from this evaluation, reflecting on the advantages and disadvantages of our chosen approach. Education Use Consent We hereby give our permission for this project to be shown to other University of Glasgow students and to be distributed in an electronic format. Please note that you are under no obligation to sign this declaration, but doing so would help future students. Name: Signature: Name: Signature: Name: Signature: Name: Signature: Name: Signature: Name: Signature: 1 Contents 1 Introduction 7 1.1 Motivation . 7 1.2 Aims . 7 1.3 Background . 8 1.4 Preliminaries . 8 1.5 Outline . 9 2 Background 10 2.1 History of Computer Chess . 10 2.2 Traditional Engine Design . 12 2.3 Present Day . 16 2.3.1 Engine Ratings . 16 2.3.2 Current Chess Engines . 16 2.3.3 Man Versus Machine . 17 3 Design 19 3.1 Overview . 19 3.1.1 Chess Engine Communication Protocol . 19 3.1.2 Major Classes . 19 3.1.3 Threading . 20 3.1.4 Rejected Designs . 20 3.2 Board . 21 2 3.2.1 Board representation . 21 3.2.2 Move representation . 24 3.2.3 Piece representation . 24 3.3 Analyser . 25 3.3.1 Time Control . 25 3.3.2 Alpha Beta Pruning . 25 3.4 Evaluator . 26 3.4.1 Material Evaluation . 27 3.4.2 Passed Pawns . 27 3.4.3 Crowded Files . 28 3.4.4 Pawn Quantity . 28 3.4.5 Crippled Pawns . 29 3.4.6 Isolated Pawns . 30 3.4.7 King Pawns . 30 3.4.8 Piece Freedom . 31 3.4.9 Center Control . 33 3.4.10 King Attack . 33 3.4.11 Center King . 34 3.4.12 Has Castled . 35 3.4.13 End Game Multiplier . 36 4 Implementation 37 4.1 Overview . 37 4.1.1 Language Choice . 37 4.1.2 Language Style . 37 4.1.3 Game Class . 37 4.1.4 Communication between objects . 37 4.1.5 Threads . 38 3 4.1.6 Chess Engine Communication Protocol versus Bespoke UI . 38 4.2 Board . 38 4.2.1 Board representation . 39 4.2.2 Move representation . 40 4.2.3 Piece representation . 42 4.2.4 Move legality . 48 4.2.5 Checks, checkmates and stalemates . 51 4.2.6 Castling . 52 4.2.7 Promotions . 54 4.2.8 En Passant . 56 4.2.9 Move committing and reversing . 58 4.2.10 Legal move generation . 59 4.2.11 Board hashing . 60 4.3 Analyser . 63 4.4 Evaluator . 65 4.4.1 Material Evaluation . 67 4.4.2 Passed Pawns . 68 4.4.3 Crowded Files . 69 4.4.4 Pawn Quantity . 70 4.4.5 Crippled Pawns . 71 4.4.6 Isolated Pawns . 71 4.4.7 King Pawns . 72 4.4.8 Piece Freedom . 73 4.4.9 Center Control . 74 4.4.10 King Attack . 75 4.4.11 Center King . 76 4.4.12 Has Castled . 76 4 4.4.13 End Game Multiplier . 77 5 Evaluation 78 5.1 Testing Rules . 78 5.1.1 Outline . 78 5.1.2 Piece Movement . 78 5.1.3 Captures . 84 5.1.4 End of Game Recognition . 85 5.2 Player vs Computer . 87 5.3 Computer vs Computer . 88 5.3.1 GNUChess vs Chess Mantis . 89 5.3.2 Crafty vs Chess Mantis . 90 5.3.3 Beowulf vs Chess Mantis . 92 6 Conclusion 93 Appendices 95 A Contributions 95 A.1 Paul Dailly . 95 A.2 Dominik Gotojuch . 95 A.3 Neil Henning . 96 A.4 Keir Lawson . 97 A.5 Alec Macdonald . 97 A.6 Tamerlan Tajaddinov . 98 B Status Report 99 B.1 Product . 99 B.2 Deficiencies . 99 B.2.1 XBoard Commands . ..
Recommended publications
  • Draft – Not for Circulation
    A Gross Miscarriage of Justice in Computer Chess by Dr. Søren Riis Introduction In June 2011 it was widely reported in the global media that the International Computer Games Association (ICGA) had found chess programmer International Master Vasik Rajlich in breach of the ICGA‟s annual World Computer Chess Championship (WCCC) tournament rule related to program originality. In the ICGA‟s accompanying report it was asserted that Rajlich‟s chess program Rybka contained “plagiarized” code from Fruit, a program authored by Fabien Letouzey of France. Some of the headlines reporting the charges and ruling in the media were “Computer Chess Champion Caught Injecting Performance-Enhancing Code”, “Computer Chess Reels from Biggest Sporting Scandal Since Ben Johnson” and “Czech Mate, Mr. Cheat”, accompanied by a photo of Rajlich and his wife at their wedding. In response, Rajlich claimed complete innocence and made it clear that he found the ICGA‟s investigatory process and conclusions to be biased and unprofessional, and the charges baseless and unworthy. He refused to be drawn into a protracted dispute with his accusers or mount a comprehensive defense. This article re-examines the case. With the support of an extensive technical report by Ed Schröder, author of chess program Rebel (World Computer Chess champion in 1991 and 1992) as well as support in the form of unpublished notes from chess programmer Sven Schüle, I argue that the ICGA‟s findings were misleading and its ruling lacked any sense of proportion. The purpose of this paper is to defend the reputation of Vasik Rajlich, whose innovative and influential program Rybka was in the vanguard of a mid-decade paradigm change within the computer chess community.
    [Show full text]
  • AI from a Game Player Perspective Eleonora Giunchiglia Why?
    AI from a game player perspective Eleonora Giunchiglia Why? David Churchill, professor at Memorial University of Newfoundland: ``From a scientific point of view, the properties of StarCraft are very much like the properties of real life. [. .] We’re making a test bed for technologies we can use in the real world.’’ This concept can be extended to every game and justifies the research of AI in games. Connections with MAS A multiagent system is one composed of multiple interacting software components known as agents, which are typically capable of cooperating to solve problems that are beyond the abilities of any individual member. This represents by far a more complex setting than the traditional 1vs1 games à only in recent years they were able to study games with multiple agents. In this project we traced the path that led from AI applied to 1vs1 games to many vs. many games. The very first attempts The very first attempts were done even before the concept of Artificial intelligence was born: 1890: Leonardo Torres y Quevedo developed an electro-mechanical device, El Ajedrecista, to checkmate a human opponent’s king using only its own king and rook. 1948: Alan Turing wrote the algorithm TurboChamp. He never managed to run it on a real computer. The very first attempts 1950: Claude Shannon proposes the Minimax algorithm. Shannon proposed two different ways of deciding the next move: 1. doing brute-force tree search on the complete tree, and take the optimal move, or 2. looking at a small subset of next moves at each layer during tree search, and take the “likely optimal” move.
    [Show full text]
  • Mémoire De Master
    République Algérienne Démocratique et Populaire Ministère de l'Enseignement Supérieur et de la Recherche Scientifique Université Mouloud Mammeri de Tizi-Ouzou Faculté de : Génie électrique et d'informatique Département : Informatique Mémoire de fin d’études En vue de l’obtention du diplôme de Master en Informatique Spécialité : Systèmes Informatiques Réalisé et présenté par : MEHALLI Nassim Sujet : Mise en œuvre de l’apprentissage automatique pour l’évaluation des positions échiquéennes Proposé et dirigé par : SADI Samy Soutenu le 11 juillet 2019 devant le jury composé de: Mr. RAMDANI Mohammed Président du Jury Mlle. YASLI Yasmine Membre du Jury Mr. SADI Samy Directeur de mémoire Dédicaces Je dédie ce travail à mes chers parents qui ne cessent de me donner l’amour nécessaire pour que je puisse arriver à ce que je suis aujourd’hui. Que dieux vous protège et que la réussite soit toujours à ma portée pour que je puisse vous combler de bonheur et d’argent le jour où je serai milliardaire. Je dédie aussi ce modèste travail À mes chers oncles Omar et Mahdi À mon frère et ma sœur À Mima ma meilleure À Sousou et mon meilleur ami Mamed À Racim et Milou À Ine Boula3rass À Smail Remerciements Je remercie Allah de m’avoir donné le courage et la force afin d’accomplir ce modeste projet. Je remercie mon encadreur, monsieur Sadi, pour tout ce qu’il m’a appris dans le monde de l’intelligence artificielle ainsi que toutes ses remarques pertinentes. Je remercie l'ensemble des membres du jury, qui m'ont fait l'honneur de bien vouloir étudier avec attention mon travail.
    [Show full text]
  • Move Similarity Analysis in Chess Programs
    Move similarity analysis in chess programs D. Dailey, A. Hair, M. Watkins Abstract In June 2011, the International Computer Games Association (ICGA) disqual- ified Vasik Rajlich and his Rybka chess program for plagiarism and breaking their rules on originality in their events from 2006-10. One primary basis for this came from a painstaking code comparison, using the source code of Fruit and the object code of Rybka, which found the selection of evaluation features in the programs to be almost the same, much more than expected by chance. In his brief defense, Rajlich indicated his opinion that move similarity testing was a superior method of detecting misappropriated entries. Later commentary by both Rajlich and his defenders reiterated the same, and indeed the ICGA Rules themselves specify move similarity as an example reason for why the tournament director would have warrant to request a source code examination. We report on data obtained from move-similarity testing. The principal dataset here consists of over 8000 positions and nearly 100 independent engines. We comment on such issues as: the robustness of the methods (upon modifying the experimental conditions), whether strong engines tend to play more similarly than weak ones, and the observed Fruit/Rybka move-similarity data. 1. History and background on derivative programs in computer chess Computer chess has seen a number of derivative programs over the years. One of the first was the incident in the 1989 World Microcomputer Chess Cham- pionship (WMCCC), in which Quickstep was disqualified due to the program being \a copy of the program Mephisto Almeria" in all important areas.
    [Show full text]
  • New Architectures in Computer Chess Ii New Architectures in Computer Chess
    New Architectures in Computer Chess ii New Architectures in Computer Chess PROEFSCHRIFT ter verkrijging van de graad van doctor aan de Universiteit van Tilburg, op gezag van de rector magnificus, prof. dr. Ph. Eijlander, in het openbaar te verdedigen ten overstaan van een door het college voor promoties aangewezen commissie in de aula van de Universiteit op woensdag 17 juni 2009 om 10.15 uur door Fritz Max Heinrich Reul geboren op 30 september 1977 te Hanau, Duitsland Promotor: Prof. dr. H.J.vandenHerik Copromotor: Dr. ir. J.W.H.M. Uiterwijk Promotiecommissie: Prof. dr. A.P.J. van den Bosch Prof. dr. A. de Bruin Prof. dr. H.C. Bunt Prof. dr. A.J. van Zanten Dr. U. Lorenz Dr. A. Plaat Dissertation Series No. 2009-16 The research reported in this thesis has been carried out under the auspices of SIKS, the Dutch Research School for Information and Knowledge Systems. ISBN 9789490122249 Printed by Gildeprint © 2009 Fritz M.H. Reul All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronically, mechanically, photocopying, recording or otherwise, without prior permission of the author. Preface About five years ago I completed my diploma project about computer chess at the University of Applied Sciences in Friedberg, Germany. Immediately after- wards I continued in 2004 with the R&D of my computer-chess engine Loop. In 2005 I started my Ph.D. project ”New Architectures in Computer Chess” at the Maastricht University. In the first year of my R&D I concentrated on the redesign of a computer-chess architecture for 32-bit computer environments.
    [Show full text]
  • Chess by Vincent Diepeveen
    Chess by Vincent Diepeveen Chess History Chess found its origin in India well over 1500 years ago th Most sources quote the 6 century A.D. and even before that.. From India it reaches Persia (Iran) The rules gradually change; the queen and bishop become more powerful and the pawn can move two squares The name Chess comes from the Persian word for king: Shah Chess Some centuries later, Muslim rulers who conquer Persia spread the game of chess to Europe th Around the 15 century the rules start to be similar to todays chess rules Where rules are pretty much the same since then, the way the pieces look like definitely isn't, not even today! th Most western tournaments the standard is Staunton, from 19 century UK Original Staunton 1849 Replica's are already around $2000 a set Russian Chess pieces (modern) Actually similar (cheaper) sets you can encounter in the east in tournaments; the below set is already a couple of hundreds of dollars in the stores – note shape similar to Staunton Renaissance Style Chess pieces Please note that there is no cross on the king It's possible Staunton gets that credit... Most chessplayers find this easier Blindfolded Chess Actually chess players don't need to see the chess pieces at all Nearly all titled chess players can play blindfolded Question for the audience: How strong do titled chess players play blindfolded? Blindfolded Strength Playing regularly blindfolded hardly loses strength to OTB (over the board) Own experience: The first few moves after opening are actually the hardest moves
    [Show full text]
  • Designing a Pervasive Chess Game
    Designing a pervasive chess game André Pereira, Carlos Martinho, Iolanda Leite, Rui Prada, Ana Paiva Instituto Superior Técnico – Technical University of Lisbon and INESC-ID, AV. Professor Cavaco Silva – Taguspark 2780-990 Porto Salvo, Portugal {Andre.Pereira, Carlos.Martinho, Iolanda.Leite, Rui Prada}@tagus.ist.utl.pt, [email protected] Abstract. Chess is an ancient and widely popular tabletop game. For more than 1500 years of history chess has survived every civilization it has touched. One of its heirs, computerized chess, was one of the first artificial intelligence research areas and was highly important for the development of A.I. throughout the twentieth-century. This change of paradigm between a tabletop and a computerized game has its ups and downs. Computation can be used, for example, to simulate opponents in a virtual scenario, but the real essence of chess in which two human opponents battle face-to-face in that familiar black and white chessboard is lost. Usually, computer chess research focuses on improving the effectiveness of chess algorithms. This research, on the other hand, focuses on trying to bring back the essence of real world chess to a computerized scenario. To achieve this goal, in this paper we describe a model inspired by the field of Pervasive Gaming, a field that profits by the mix of real, virtual and social game elements. Keywords: Chess, Pervasive Gaming, Tangible User Interfaces, Graphical User Interfaces, Design Model, Agents. 1 Introduction “Pervasive gaming brings computer entertainment back to the real world” [14] and by doing so overcomes some restrictions of conventional computer games.
    [Show full text]
  • Rybka Investigation and Summary of Findings for the ICGA Mark Lefler, Robert Hyatt, Harvey Williamson and ICGA Panel Members 12 May 2011
    Rybka Investigation and Summary of Findings for the ICGA Mark Lefler, Robert Hyatt, Harvey Williamson and ICGA panel members 12 May 2011 1. Background 1.1 Purpose: To investigate claims that the chess playing program Rybka is a derivative of the chess programs Fruit and Crafty and violated International Computer Games Association (ICGA) Tournament rules. Rybka is a program by Vasik Rajlich. Fruit was written by Fabien Letouzey. Crafty was written by Robert Hyatt. 1.2 Allegations. Allegations have surfaced that Rybka 1.0 beta and later versions are derivatives of Fruit 2.1. Fruit 2.1 source code was distributed with a specific license in the copying.txt file. Part of this license reads: "For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights." Allegations point out that by distributing Rybka, if it is based on Fruit, this GNU license was violated (http://icga.wikispaces.com/Open+letter+to+the+ICGA+about+the+Rybka- Fruit+issue). If versions of Rybka are derived from Fruit and participated in ICGA tournaments, then Rybka has also violated ICGA Tournament Rules. Specifically, the rules state: "Each program must be the original work of the entering developers. Programming teams whose code is derived from or including game-playing code written by others must name all other authors, or the source of such code, in the details of their submission form.
    [Show full text]
  • Beyond the 3000 Elo Barrier a Glance Behind the Scenes of the Rybka Chess Engine by HARALD FIETZ
    Beyond the 3000 Elo barrier A glance behind the scenes of the Rybka chess engine by HARALD FIETZ t the end of 2005, the worked in the computer field. My looked very promising and scary for world of chess computers mother is also a trained mathematician. the opponent when I played them, but suddenly changed when an I have two younger brothers. We moved in a post-mortem Rybka sometimes engine with the name back to Prague when I was three weeks revealed them as crazy blunders. I A of Rybka appeared from old and stayed in the Czech Republic believe that using Rybka can help to virtually nowhere. At the prestigious until I was 11 The whole family develop an intuition about which International Paderborn Computer moved back to the USA at that time. I sacrifices actually work. For sure using Chess Championship the new program studied computer science at MIT Rybka has some influence on my by the American developer Vaclav (Massachusetts Institute of Technology) openings – I think that my repertoire is Rajlich – whom everybody simply calls near Boston and worked as a software getting much stronger thanks to my Vasik or Vas as his first name – won developer at Texas Instruments (Dallas, work with the engine.” a clear point ahead of established USA), Triada, a company specialized in machines such as Zappa, Spike, data compression, (Ypsilanti, USA), A programmer’s everyday life Shredder, Fruit or Jonny. Out of the Ford (Detroit, USA), at the Environ- and visions blue, Rybka skyrocketed to the top of mental Research Institute of Michigan, the Swedish computer rating list, which was developing radar imaging However, the improvement of a which had been regarded for a long systems (Ann Arbor, USA), and Option, sophisticated program also requires a time as the equivalent of the FIDE a leading company in the field of lot of support from other sources: rating list in the chess computer sector wireless communication technology “There are tons of people who are (cp.http://web.telia.com/~u85924109/ss (Adelsried, Germany), over the last involved in the project in various ways.
    [Show full text]
  • Today LONDON NEWS, GLOBAL VIEWS
    KENSINGTON CHELSEA & WESTMINSTER, HAMMERSMITH & FULHAM kcwAND OTHER SELECT LONDON BOROUGHStoday LONDON NEWS, GLOBAL VIEWS ISSUE 0068 DECEMBER/JANUARY 2017/18 FREE NEWS POLITICS BUSINESS & FINANCE OPINION EDUCATION ARTS & CULTUREBENJAMIN EVENTS FRANKLIN LIFESTYLE DINING OUT POETRY LITERATURE MOTORING SPORT CROSSWORD BRIDGE CHESS 2 December 2017/January 2018 Kensington, Chelsea & Westminster Today www.KCWToday.co.uk Contents & Offices Kensington, Chelsea KENSINGTON CHELSEA & WESTMINSTER, HAMMERSMITH & FULHAM AND OTHER SELECT LONDON BOROUGHS & Westminster Today kcwtoday Contents LONDON NEWS, GLOBAL VIEWS ISSUE 0067 NOVEMBER 2017 FREE EDUCATION 80-100 Gwynne Road, London, BUSINESS & FINANCE EVENTS SW11 3UW SUPPLEMENTS NEWS Tel: 020 7738 2348 POLITICS OPINION LIFESTYLE DINING OUT ARTS & CULTURE POETRY E-mail: [email protected] LITERATURE MOTORING Website: SPORT News CROSSWORD 3 BRIDGE www.kcwtoday.co.uk CHESS Advertisement enquiries: [email protected] 11 Statue & Blue Plaque Subscriptions: [email protected] BENJAMIN FRANKLIN Publishers: THE TREE OF KNOWLEDGE Opinion & Comment Kensington & Chelsea Today Limited 12 14 Features 16 Business & Finance Editor-in-Chief: Kate Hawthorne Art Director & Director: Tim Epps 21 Astronomy Editors : Kate Hawthorne, Emma Trehane Head of Business Development: Emma Trehane Business Development: Caroline Daggett, 22 Education Antoinette Kovatchka, Architecture: Squinch Art & Culture Editors: Don Grant, Marian Maitland 26 Literature Astronomy: Scott Beadle FRAS Ballet/Dance: Andrew Ward Bridge:
    [Show full text]
  • Sustavi Otvorenog Koda Za Igranje Šaha
    Sustavi otvorenog koda za igranje šaha Kovač, Hrvoje Master's thesis / Diplomski rad 2018 Degree Grantor / Ustanova koja je dodijelila akademski / stručni stupanj: University of Zagreb, Faculty of Science / Sveučilište u Zagrebu, Prirodoslovno-matematički fakultet Permanent link / Trajna poveznica: https://urn.nsk.hr/urn:nbn:hr:217:000991 Rights / Prava: In copyright Download date / Datum preuzimanja: 2021-09-25 Repository / Repozitorij: Repository of Faculty of Science - University of Zagreb SVEUCILIˇ STEˇ U ZAGREBU PRIRODOSLOVNO–MATEMATICKIˇ FAKULTET MATEMATICKIˇ ODSJEK Hrvoje Kovacˇ SUSTAVI OTVORENOG KODA ZA IGRANJE SAHAˇ Diplomski rad Voditelj rada: prof.dr.sc. Luka Grubisiˇ c´ Zagreb, srpanj, 2018. Ovaj diplomski rad obranjen je dana pred ispitnim povjerenstvom u sastavu: 1. , predsjednik 2. , clanˇ 3. , clanˇ Povjerenstvo je rad ocijenilo ocjenom . Potpisi clanovaˇ povjerenstva: 1. 2. 3. Poˇstovani profesore Grubiˇsi´c,puno Vam hvala na pomo´cii pruˇzenojpotpori pri izradi ovog rada. Takoder, ˇzeliobih se zahvaliti svim prijateljima i kolegama, a posebno MNI-ovcima (ukljuˇcuju´cii profesore), uz koje su dvije godine diplomskog studija proletjele. Na kraju, najve´cehvala mojoj djevojci, roditeljima, bratu i ostatku obitelji na pruˇzenoj podrˇscii strpljenju. Sadrzajˇ Sadrzajˇ iv Uvod 1 1 Opcenito´ o racunalnomˇ sahuˇ 2 2 Osnovne komponente sahovskogˇ racunalaˇ 9 2.1 Reprezentacija ploceˇ i figura . 9 2.2 Generiranje poteza . 11 2.3 Evaluacijska funkcija . 12 2.4 Pretrazivanjeˇ . 14 2.5 Vlastiti program . 19 3 Automatizacija u modernim sustavima za igranje sahaˇ 24 3.1 Automatizirano podesavanjeˇ parametara evaluacijske funkcije . 24 3.2 Strojno ucenjeˇ i njegove primjene u racunalnomˇ sahuˇ . 27 Bibliografija 35 iv Uvod Konstrukcija programa koji ce´ igrati sahˇ na racionalan nacinˇ bila je izazov za pionire umjetne inteligencije pedesetih godina proslogˇ stoljeca.´ Napretkom tehnologije racunalniˇ programi za igranje sahaˇ postajali su sve jaciˇ i krajem proslogˇ stoljeca´ sahovskoˇ racunaloˇ Deep Blue pobijedilo je u mecuˇ svjetskog prvaka Garija Kasparova.
    [Show full text]
  • Exploring Modern Chess Engine Architectures
    Vrije Universiteit Amsterdam Bachelor Thesis Exploring modern chess engine architectures Author: Pieter Bijl (2647306) Author: Anh Phi Tiet (2638026) 1st supervisor: Prof. Dr. W.J. Fokkink 2nd reader: Prof. Dr. ir. H.E. Bal A thesis submitted in fulfillment of the requirements for the VU Bachelor of Science degree in Computer Science July 5, 2021 CONTENTS I Introduction 3 II Basics of chess engine architecture 3 II-A Board representation . .3 II-B Move generation . .6 II-C Search . .9 II-D Evaluation . 12 III Methodology 17 IV Results 18 IV-A Results . 18 IV-B Result analysis . 19 V Conclusion 20 VI Discussion 20 References 23 Appendix 23 2 Abstract—The game of chess is over 1000 years old and is move generator is often the limiting factor, and in a regular still not optimally played in the 21st century. This thesis aims to alpha beta style search. The first research question here is explore the technical history of chess computing over the last 40 as follows: Which approach to board representation is the years. Various techniques that have been employed throughout that time are implemented and tested to determine their perfor- fastest for move generation, which suits a full general purpose mance differences. Similarly, classical evaluation functions that chess engine, and in which subroutines of the engine is the attempt to score a position based on handcrafted, human-like choice of board representation most critical? We hypothesize chess features are broken down and their parameters tuned. that magic and PEXT bitboards will beat the others in both In conclusion, implementations of both array centric board scenarios, where PEXT bitboards perform slightly better.
    [Show full text]