Chess Player by Co-Evolutionary Algorithm

Reading time: 5 minute
...

📝 Abstract

A co-evolutionary algorithm (CA) based chess player is presented. Implementation details of the algorithms, namely coding, population, variation operators are described. The alpha-beta or mini-max like behaviour of the player is achieved through two competitive or cooperative populations. Special attention is given to the fitness function evaluation (the heart of the solution). Test results on algorithms vs. algorithms or human player is provided.

💡 Analysis

A co-evolutionary algorithm (CA) based chess player is presented. Implementation details of the algorithms, namely coding, population, variation operators are described. The alpha-beta or mini-max like behaviour of the player is achieved through two competitive or cooperative populations. Special attention is given to the fitness function evaluation (the heart of the solution). Test results on algorithms vs. algorithms or human player is provided.

📄 Content

Chess Player by Co-Evolutionary Algorithm

Agostinho Rosa Laseeb-ISR-IST, Av Rovisco Pais 1 1049-001 Lisboa, Portugal acrosa@laseeb.org Nuno Ramos Laseeb-ISR-IST, Av Rovisco Pais 1 1049-001 Lisboa, Portugal nramos@laseeb.org Sérgio Salgado Laseeb-ISR-IST, Av Rovisco Pais 1 1049-001 Lisboa, Portugal ssalgado@laseeb.org

Abstract – A co-evolutionary algorithm (CA) based chess player is presented. Implementation details of the algorithms, namely coding, population, variation operators are described. The alpha-beta or mini-max like behaviour of the player is achieved through two competitive or cooperative populations. Special attention is given to the fitness function evaluation. Preliminary test results showed the prove of principle and the program is able to defeat consistently beginner level players and rival experienced one, but it is still not a contender for other computer based implementations

  1. Introduction Chess has been since the early steps of electronic computing the most salient mind challenging problem no only for humans but specially for computer scientist and programmers. Artificial Intelligence community and game theory researchers have tried to model the game in order to create strategies and rules for a better understanding of the game quintessence with the final objective of surpassing human players. These developments resulted in the well known defeat of Garry Kasparov (the Word Chess Champion) by IBM’s purpose built chess computer “Deep Blue”, in 1977 [1].
    Very few attempts have been made to address two players’ games by evolutionary algorithms. For the Go- moku game a genetic algorithm (GA) based program is described in [2]. For the checkers game an evolutionary based search program [3]. For the Chess game there is only a few experiments have been described [4]. Co- evolutionary strategies have been applied to Backgammon [5] and iterated prisoner dilemma [6].
    Since chess is a well-known game and there are many references describing the rules of the game and also different type of machine intelligence solutions [7]. In this paper we restrict to the presentation of the implementation aspects of the co-evolutionary algorithm based chess machine player.

  2. Game Chess game is a 2 player strategic game played in an 8x8 “chess” board (alternating black and white squares). Each player has the same set of pieces (8 Pawns, 2 Knights, 2 Bishops, 2 Rooks, 1 Queen, and 1 King); the different pieces have different movement patterns. The objective is to take the opponent king (check mate). Each player makes their moves alternatively [7]. The search space in a game of chess problem is NxM, where N is number of possible choices and M the depth level (number of look ahead moves) is in average (N=35 and M=4) will ends up to 1500625 choices.

  3. Methodology The chess player could be implemented as a usual in evolutionary algorithms (EA), where the population represents candidate sequences of alternated (white and black) moves. Another possibility is to use two different populations, where each element of the population is a list of moves of only one of the opponents, black or white. The situation is usually known as co-evolution, where more than one population evolves together with specific form of interaction. The first option is simpler to implement but needs a very large population in order to cover a representative number of play sequences. The advantage of the second is a more compact representation of the moves and also provides a finer control on the number of play sequences to analyse. If K is the size of each of the two equal size populations, then we can obtain KxK possible combinations of alternated play sequences. Different strategies can be used to reduce the number of evaluations, like for example the most promising ones.

3.1 The co-evolutionary algorithm The CA is an EA with two distinct populations, one for black and one for white. The EA used for each population is the standard binary coded GA with fitness proportional selection with elitism, crossover and variation operators. The variation operators, crossover and mutation, are applied to these two populations independently, obtaining two offspring populations. The fitness of each individual is calculated in each generation, takes into account not only the quality of individual moves in his own population but also the quality of the possible moves of the other population. For example, a move that takes a knight but loses the queen in the next move is not a god trade-off.

3.2 Population and coding The two populations have the same number K of individuals; there is no specific reason to make them different. The size of the population depends on the depth level of the moves analysed in order to maintain a suitable percentage of coverage of the search space. Each individual is coded by a binary chromosome of variable

This content is AI-processed based on ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut