Knowledge base: Warsaw University of Technology

Settings and your account

Back

Artificial intelligence of the chess playing robot

Abstract

The aim of the thesis is to create an artificial intelligence based software, that could be implemented into a real chess playing robot. The program consists of computer vision system, that reads the image from the camera in real time, detects figures on board and assigns them into appropriate fields. Then it analyse the virtual representation of the chessboard to compute the best move possible in current game state. The thesis includes theoretical introduction into machine learning, with particular emphasis on artificial neural networks and reinforcement learning. This chapter describes basic concepts related to used methods. In order to choose the technology to use in the project, the certain amount of research needed to be done. Chapter 3 contains the introduction to methods applied in logic games, that in majority rely on graph structures. Basic methods such as mini-max and alpha-beta algorithms were described in detail. In addition, examples of convolutional neural networks architectures dedicated to object detection problems were also described in chapter 3. Experimental work was divided into two parts, i.e. computer vision system and chess engine. Chapter 4 contains the process of training the Single Shot Detector model with custom made dataset. Image set consists of a thousand chessboard images with unique figures compositions. Each photo is annotated in VOC standard with figures positions and classes. The result of this part is a model that recognizes chess pieces with 94% accuracy. The research on the chess engine includes implementation of the general purpose algorithm based on reinforcement learning - AlphaZero. Both neural network model used to evaluate game state and binary representation of the chessboard were based on official report of the algorithms’ authors. The thesis describes the process of training the model and presents its evaluation compared to players from lichess.org platform based on Elo points rating. As the summary of the project, the proposal of a final program was made. It combines the implemented methods into a whole. Algorithm reads the camera image, computes the positions of figures, then creates the chessboard representation and finds the best possible move. The project, with minor changes, can be used as the basis for the software of a real chess playing robot.
Record ID
WUTc6b03b3c6e6a49b68087d5e67eb03a89
Diploma type
Master of Science
Title in Polish
Projekt sztucznej inteligencji robota do gry w szachy
Supervisor
Andrzej Kordecki (FPAE/IAAM) Andrzej Kordecki,, The Institute of Aeronautics and Applied Mechanics (FPAE/IAAM)Faculty of Power and Aeronautical Engineering (FPAE)
Certifying unit
Faculty of Power and Aeronautical Engineering (FPAE)
Affiliation unit
The Institute of Aeronautics and Applied Mechanics (FPAE/IAAM)
Study subject / specialization
Automatyka i Robotyka (Automation and Robotics)
Language
pol (pl) Polish
Status
Finished
Defense Date
20-01-2022
Issue date (year)
2022
Reviewers
Andrzej Kordecki (FPAE/IAAM) Andrzej Kordecki,, The Institute of Aeronautics and Applied Mechanics (FPAE/IAAM)Faculty of Power and Aeronautical Engineering (FPAE) Cezary Rzymkowski (FPAE/IAAM) Cezary Rzymkowski,, The Institute of Aeronautics and Applied Mechanics (FPAE/IAAM)Faculty of Power and Aeronautical Engineering (FPAE)
Keywords in Polish
szachy, robot, sztuczna inteligencja, uczenie maszynowe, sieci neuronowe, wizja komputerowa, detekcja obiektów, konwolucyjne sieci neuronowe, single shot detector, ssd, alphazero, deepmind, stockfish, uczenie ze wzmocnieniem, gry,
Keywords in English
chess, robot, computer chess, artificial intelligence, AI, machine learning, neural networks, computer vision, object detection, convolutional neural networks, single shot detector, ssd, alphazero, deepmind, stockfish, reinforcement learning, games
Abstract in Polish
Praca ma na celu zaprojektowanie sztucznej inteligencji służącej jako podstawa działania robota grającego w szachy. Zakres oprogramowania obejmuje odczyt obrazu z kamery w czasie rzeczywistym, detekcję figur na obrazie oraz analizę zidentyfikowanego stanu gry w celu znalezienia optymalnego ruchu. Pierwsze rozdziały pracy zawierają wprowadzenie teoretyczne do uczenia maszynowego ze szczególnym uwzględnieniem sztucznych sieci neuronowych oraz uczenia ze wzmocnieniem. Opisane zostały wybrane pojęcia niezbędne do przedstawienia wykonanego projektu wraz z przykładami stosowanych metod. Praca zawiera również przegląd istniejących metod z zakresu sztucznej inteligencji w grze w szachy oraz wybranych architektur sieci do detekcji obiektów na obrazach. Algorytmy stosowane w grach logicznych opierają się o struktury grafowe, których podstawowe przykłady zostały szczegółowo opisane w pracy. Cześć badawcza pracy dzieli się na dwie części: system wizyjny oraz silnik szachowy. W części związanej z wizją komputerową opisany jest proces uczenia modelu sieci Single Shot Detector. Zbiorem danych jest samodzielnie stworzona baza obrazów zawierająca 1000 zdjęć szachownicy wraz z oznaczonymi i sklasyfikowanymi figurami. W efekcie otrzymano model detekcji o wartości mAP równym 94%, co świadczy o wysokiej jakości rozpoznawania figur. Badania dotyczące silnika szachowego zawierają własną implementację metody ogólnego przeznaczenia opartej na uczeniu ze wzmocnieniem – AlphaZero. Wzorem do stworzenia reprezentacji szachownicy w przestrzeni binarnej, a także modelu sieci neuronowej do ewaluacji stanu gry jest raport autorów algorytmu. W pracy opisany jest proces treningu modelu oraz jego ewaluację w odniesieniu do graczy z serwisu lichess.org na podstawie punktów rankingu Elo. Zwieńczeniem pracy jest propozycja programu, który łączy implementowane metody w całość. Realizuje odczyt z kamery w czasie rzeczywistym, tworzy obraz szachownicy a następnie znajduje najlepszy możliwy ruch. Projekt przy niewielkich zmianach może służyć jako podstawa oprogramowania rzeczywistego robota do gry w szachy.
File
  • File: 1
    praca_mgr_MJ.pdf
    Report request to generate download link
Request a WCAG compliant version
Local fields
Identyfikator pracy APD: 51551

Uniform Resource Identifier
https://repo.pw.edu.pl/info/master/WUTc6b03b3c6e6a49b68087d5e67eb03a89/
URN
urn:pw-repo:WUTc6b03b3c6e6a49b68087d5e67eb03a89

Confirmation
Are you sure?
Report incorrect data on this page
clipboard