/Chess-Engine

Primary LanguageC++MIT LicenseMIT

Chess Engine

This project represents the implementation for Chess AI, based on Alpha-Beta Prunning algorithm.

Table of contents

General info

Being a game played in turns, where the opponents goals are mirrored, chess is a zero-sum game. It is exciting and challenging to build an engine that is able to "understand" the game using only search heuristics, evaluation functions(based on pieces values and positional advantages) and an opening database.
Regarding the algorithm used, the classical Minimax provided a decent waiting time for moves generated by analyising the position with depth <= 3.
After upgrading to Alpha–beta pruning algorithm, the waiting time significantly dropped, now making depth = 5 reachable, taking only a few seconds.

Setup

The engine is exclusively configured to be compatible with xboard, so a stable version is required.

Run

After installing xboard the engine is started with command:

xboard -fcp "./main"

Features

  • Chess game rules fully implemented
  • AlphaBeta algorithm to increase engine efficiency
  • Xboard compatibility to facilitate testing against another engine

In progress

  • Transposition Tables - taking into account that a certaing position is reachable following more than one move sequence, it is a good ideea to store already analysed positions in order to increase the speed of the engine

Acknowledgements

The evaluation function used by the engine comes from chessprogramming.org.