Back to projects

Chess game

Chess game I created from scratch

Featured image for the chess game

About the project

See the code
  • Creation date: 2020
  • Technologies: C# + Xamarin Forms

After watching a famous TV show about chess, The Queen's Gambit, I felt inspired to create a little chess game from scratch. I am absolutely terrible at chess, so I thought that it would be fun to create a game that could play on my behalf.

I implemented it using a very simple kind of artificial intelligence powered by the minimax algorithm, and in the end, I actually managed to create an application that knows all the rules of the game and can play it decently – I wouldn't know myself, as I am terrible at chess, but I have been told that my AI is decent by friends who can actually play.

Interestingly, this wasn't just a chess game, but an engine for adversarial games (the actual name I gave it was "Two-Player, Zero-Sum Game Engine", which is more accurate). In fact, I first tried it with tic-tac-toe and with connect-four (I built them as console apps), and only later I eventually implemented chess on top of the same engine.

The project wasn't without challenges, and the code is extremely questionable in many regards, but it was a ton of fun!