Chess Bot Challenge

This project was developed over the course of a few weeks and is a submission to the "Tiny Chess Bots" challenge issued by programming Youtuber "Sebastian Lague". Where you must create a chess bot within a given C# API and "Bot Brain Capacity" which limits how many evaluations and variables can be used.

Screenshot of the chess bot.
A code excerpt from the chess bot.

The bot

The bot uses a min-max search to locate the best move, using recursion to evaluate moves up to 6 levels deep to find the optimal strategy. Evaluating things such as the pieces taken by the move, the value of the piece being moved, and if the move puts the opposition in check or checkmate.

Effort has also been put into optimisation to make sure that the bot operates quickly and does not run out of time on the clock, as well as enabling the recursion to run even deeper.

Recursive checking

The bot employs recursive checking to evaluate moves deeper than one level, to make sure that it would definitely benefit it. Achieving certain parameters such as putting the opposition in check or taking a queen will raise the "Interest" level of the move, making it check even deeper. This is the most important part of the bot which elevated it to a more advanced way of playing.

A code excerpt from the chess bot.
The scores from the chess bot.

Conclussion

The final bot developed was able to defeat me in nearly every match. As someone who is not experienced in chess it was entertaining to create something significantly better than me. The bot I developed was highly competitive with those made by my peers, and although the results of the challenge are not yet released, it was entertaining and enlightening to develop something like this.

I felt it had challenged me in ways that games programming had not. I found that tweaking small numbers could make all the difference and gave me a new perspective in developing artificial intelligences and balancing systems for games.