Play russian draughts against the computer!


MeikopVint.ee创建者 2023-05-10T11:31:11+03:00

I'm happy to announce that you can play russian draughts against the computer in! Just enter the gameroom an press "Play with computer" button.


For 15 years users could play chess and draughts only against each other, not against a computer. And that was something we wanted to improve - to provide a functionality to play chess and (russian) draughts against a computer.

With chess, the implementation was really easy - there is Stockfish, which you need to install on linux server, learn the API and start to use it.

With russian draughts things were not so easy. Seems draughts related software is 10+ years behind compared to chess. There is a spreadsheet provided by FMJD but there is nothing usable on linux server. So we needed to invent the solution ourselves.

The implementation of russian draughts AI

Fortunately, we have a database with 1 million+ draughts games and 100 million+ draughts moves.

We created a script that replayed those games, took a snapshot of the board states and moves taken from that state and added a score to each move (depending on wether the game was eventually won or lost).

This script created around 30 million different states and 35 million moves. "The computer", while figuring out the move, picks the best move from specific state from the database and when the state is not found, makes a "random move". There are some sanity checks around the random move (like not to loose pieces with the move) but that's it.
And in the end of each game, the script updates the database with the moves played in the game. 
This is the state today and the computer plays pretty decently (defenetly a fit opponent for kids still learning the game).

What's next?

We are not done yet:
  1. We have ideas how to improve the "random move".
  2. We need to introduce different difficulty levels. With easy level, the computer would not pick the best move but a move "from the lower end".
  3. We need to make the computer to "improvise". If the best move in database has already a negative score (it's probably already a lost game), the computer should maybe pick a random move instead.
  4. To make it a proper AI, we need to train the model better - we need to put two computers to play with each other and fill the database with moves and states.
That's it. This is our journey to learn what AI and Machine Learning is about. And if we are successful with it, we can apply it to other games (Entropy, Othello).

Any feedback is welcome!

Marten Meikop team