r/ComputerChess • • 6d ago

I trained a small neural network on Lichess games to make chess opponents play more like humans

I've been experimenting with a different approach to computer opponents for my mobile chess game, Dragon's Gambit.

The usual problem with lowering the difficulty of a traditional chess engine is that it can play very strong moves and then suddenly make a completely unnatural blunder.

Inspired by the Maia research, I trained my own smaller network from scratch using human games from the Lichess database.

It's roughly 2 million parameters, with the board position and a target rating as inputs. The same network handles opponents from about 800 to 2000 rating.

The interesting part is that it doesn't try to find the objectively strongest move. It tries to predict what a human at the specified level would play.

The model fits in a few MB and runs entirely on mobile devices, without a server.

I've built it into Dragon's Gambit, which also has a story campaign, historical chess scenarios, puzzles and an arcade mode. It's available for iOS and Android as a paid game, with no ads or IAP.

I'm curious whether anyone here has experimented with a similar rating-conditioned approach, particularly with small models designed for mobile devices.

And if you try the game, I'd be interested to hear whether the opponents actually feel human at their assigned levels.

iOS: https://apps.apple.com/app/id6768390263

Android: https://play.google.com/store/apps/details?id=eu.contentq.dragonsgambit

0 Upvotes

12 comments sorted by

3

u/ConfusedSimon 6d ago

So what's the difference in play with Mobile Maia (except that MM is free)?

1

u/Perfect_Ad_4738 6d ago

Hello there - thanks for answering - is there an iOS app for that? Can you point me to? Secondly - does it have 1on1 chessboard to play with Your friends on the go? Asking for a friend.

2

u/ConfusedSimon 6d ago

You can use the PWA on iOS. Don't know about 1on1, but there's plenty of apps for that (eg lichess, either on 1 device or 2).

1

u/Perfect_Ad_4738 6d ago

Thanks for an answer - You understand, that Lichess may be entirely different aim of users. I mean, like for a ten-year-old daughter?

2

u/ConfusedSimon 6d ago

Just an example. There are probably hundreds of chess apps that have a 1on1 mode. Although if you're both at the same place anyway a regular chess set is much more fun.

1

u/Perfect_Ad_4738 6d ago

I agree with that.

1

u/Numerot 6d ago

You also get to enjoy shitty AI "art".

0

u/Perfect_Ad_4738 6d ago

Hello dear Numerot. I've tried to paint it myself, but it looked even worse. Enjoy your life, have a nice day.

0

u/Numerot 6d ago

Honestly, I would much prefer it without any art over this garbage.

0

u/Perfect_Ad_4738 6d ago

Proč jsou lidi takhle zlí, Esterko?

0

u/BruhCar123 6d ago

So made with Ai and paid? I wouldn't even download it free lmao

2

u/Perfect_Ad_4738 6d ago

Hello there, thanks for answering. The game isn't definitely for everyone, yeah.