ResearchBib Share Your Research, Maximize Your Social Impacts
Sign for Notice Everyday Sign up >> Login

PREDICTING THE OUTCOME OF THE CHESS GAME REPRESENTED AS A COMPLEX NETWORK WITH RANDOM FOREST CLASSIFIER

Journal: Zbornik Veleučilišta u Rijeci - Journal of the Polytechnic of Rijeka (Vol.7, No. 1)

Publication Date:

Authors : ; ;

Page : 31-52

Keywords : evaluation function in chess; complex networks; network features; random forest; predicting outcome of chess game;

Source : Downloadexternal Find it from : Google Scholarexternal

Abstract

This work addresses the problem of constructing a static chess position evaluation model which utilizes only information extracted from complex networks' features of positions of chess pieces on the board. The mutual relations of chess figures, the complex relations of figures and the positions on the chess board, as well as the information on which fields they are attacked, describing tactical and strategic elements of the chess game, all these are modeled by a complex network formalism. The goal of this work is to demonstrate that it is possible to train a classifier which would have better prediction results of the game outcome, utilizing only selected measurements of the complex network's features rather than the corresponding Shannon's evaluation function. Shannon's evaluation function quantifies the material state of both players on the board, the mobility of the figures, king safety and pawn structure quality. The input to the classification model consists of feature vectors defined by four types of networks (support, mobility, position, tracking) constructed from static game positions. The game information is obtained from the available chess games database in a Portable Game Notation format. Features vector contains different complex network's measures that quantify the structural properties of the network. The machine-learning algorithm of random forest is used for the training of the classification model and for selecting the most important features which have the highest impact on the prediction results. Experimentally, with the custom Python script and employing the chess engine Stockfish for analysis, a baseline fixed-depth evaluation of the static positions in chess games are extracted for determining the target classification classes – labels - win for white, win for black or draw. Next, the selected network measurements and the corresponding class labels form the input features vectors. The features vectors are used to train the Random Forest classifier: the results of the trained classification model (75% correctly predicted outcomes are compared to the baseline obtained by the standard Shannon's evaluation function (52% correctly classified outcomes)). PGN database (Portable Game Notation) reading and parsing of games from the games database, the representation of static positions from the games, and the generation of networks/graphs are done with the suitable Python tools, namely the chess library chess-py and NetworkX Python module.

Last modified: 2020-08-05 04:44:31