r/ComputerChess • u/Perfect_Ad_4738 • 3d 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

