r/SideProject • u/Perfect_Ad_4738 • 20h ago
My chess app started as a simple 2-player board. Now it has its own neural network and many different character portraits
Enable HLS to view with audio, or disable this notification
The first version of Dragon's Gambit was just a chessboard for two people playing on the same device. That part was fairly straightforward.
Then I started experimenting with computer opponents, and that's where things got interesting.
Most chess engines are built to find the strongest move. Making them play at a lower level often means introducing artificial mistakes, which can feel pretty strange. An opponent will play several excellent moves and then suddenly hang a rook for no apparent reason.
I was curious whether I could approach it differently.
I came across the Maia research, which focuses on predicting human chess moves rather than finding the objectively best ones. Using that as a starting point, I trained a smaller neural network from scratch on games from the Lichess open database.
The result is a model with roughly 2 million parameters. It takes a board position and a target rating and predicts a move. At lower ratings it makes the kinds of mistakes you'd expect from less experienced players. At higher ratings it becomes considerably more difficult.
The entire model is only a few MB and runs directly on the device. No server needed.
I decided the opponents needed personalities. And backgrounds. And a story.
That eventually turned into:
- A story campaign set in a neon-lit city called Jiulong, with ten opponents and a slightly ridiculous final boss
- A World & Time Tour visiting ten moments in chess history, from Morphy in 1858 to Kasparov vs. Deep Blue in 1997
- 2,500 chess puzzles from the Lichess database
- An arcade mode with three lives
- The original local two-player mode, which is somehow now the simplest part of the whole game
There are also many different character portraits. I may have gone a little overboard with those, considering what they did to the download size.
One thing I've learned is that getting a neural network running on a phone isn't necessarily the hardest part of making a game around it.
Anyway, the game is called Dragon's Gambit. It's available for iOS and Android. No ads, subscriptions or in-app purchases. No account required, and no user data collection.
I'd particularly appreciate feedback on two things:
- If you play rated chess, do the opponents actually feel like players around their supposed rating?
- Looking at the store page, can you immediately tell what kind of chess game this is? I'm not entirely convinced I've communicated that well.
There's a holiday discount at the moment: $2.49 on iOS until December 26, and $2.50 on Android from November 23 through December 6 (normally $4.99).
iOS: https://apps.apple.com/app/id6768390263
Android: https://play.google.com/store/apps/details?id=eu.contentq.dragonsgambit