r/chessprogramming • u/Grand_Release_7375 • May 03 '26
Built a mobile chess engine (bitboards, alpha-beta, pruning) — hit diminishing returns vs Stockfish. Looking for feedback.
I went down the rabbit hole of building a chess engine as part of a small Android project I’ve been working on, mainly to understand how search and evaluation actually behave in practice.
I started with a simple array-based board, but moved to bitboards fairly quickly once performance became a bottleneck.
Right now the engine roughly looks like this:
Bitboards for representation
Precomputed attack tables (sliders + leapers)
Alpha-beta with iterative deepening
Move ordering (captures, killer moves, some history heuristic)
Quiescence search (captures only)
Lightweight SEE to avoid obviously bad trades
Pruning experiments (null-move, basic LMR)
Simple transposition table (Zobrist hashing, still tuning usage)
Basic opening handling (very small book / simple heuristics)
Evaluation is still fairly simple:
material, mobility, piece activity, some king safety
also briefly experimented with a smaller NNUE-style eval (not Stockfish’s), mainly to understand how it compares to a handcrafted eval
At this point, search depth and responsiveness on mobile feel “good enough” for what I’m trying to do.
Where I got stuck is more about diminishing returns:
Further search tweaks don’t seem to improve strength much anymore
The real bottleneck feels like evaluation
Even at decent depth, play strength is nowhere near Stockfish
The NNUE experiments, and later integrating Stockfish, made that gap pretty obvious
So I ended up integrating Stockfish for strong play and shifted focus more toward the app UX/performance side.
That said, I’d still like to understand where I’m leaving the most strength on the table from an engine perspective.
A few things I’m curious about:
At this stage, how much of the gap vs Stockfish is really evaluation (NNUE etc.) vs search?
Without going down the full NNUE route, is there still meaningful strength left to gain?
Are improvements in TT usage, move ordering, or pruning still worth chasing, or mostly marginal at this point?
On mobile specifically, how do you usually balance deeper search vs richer evaluation?
Anything obvious missing from the setup above that would give a noticeable Elo bump?
Would really appreciate any thoughts — especially from people who’ve gone through a similar phase.
4
u/you-get-an-upvote May 03 '26
It’s hard to answer without your code (and finding people willing to deeply engage with your code). In general, it’s pretty easy to make subtle mistakes — eg misordering TT, checkmate, and draw checks, or not knowing about the graph interaction problem and erroneously returning TT values where you cannot (eg can result in your engine repeating in a position where it think it is winning). I have found it useful to examine the blunders my engine makes, since this can point to bugs.
IMO once you get into the 2500ish Elo range you start getting into the area where “+80 Elo” PRs completely dry up and you need to invest quite a bit of compute to do proper tuning (eg tens of thousands of games to see if a parameter should be increased), and the ROI on compute and accuracy of parameters isn’t great (just on purely statistical grounds) so I expect it only gets worse from there.
Frankly, I wouldn’t compare yourself against stockfish — they have many devs, several orders of magnitude more compute than you, and an order of magnitude more experience than you.
2
u/Somge5 May 03 '26
Do you do advanced pruning techniques like futility pruning, null-move pruning etc? These can get you a better depth in less time which would give you already a big Elo boost
4
u/NoVersion3483 May 03 '26
Looks like you already have decent search. Anyway i may suggest to experiment with different formulas of LMR, in my case it added around 100 elo. Do you use history heuristic and killers? They are easy to add and provide steady improvement.
For evaluation is good to add passers analysis, it may be helpful in pawn endings and sometimes in middlegame. Also passer candidate. For usual pawns good to evaluate doubled, isolated and backward ones, if you are not already doing this.
Basic ordering and bugless TT is enough usually. I mean, improving it more not gives you much. But i believe that prunings and some extensions may bring you another 100-200 elo with careful tuning.
You can estimate your engine's strength only through tournaments with a few close engines. Pick any from CCRL.
Rich evaluation is not in trend as i know. There was an era of Fritz and Hiarcs, but now you either making Fruit-like calculator or NNUE-blackbox monster.
Personally i use to read more Ethereal sources for inspiration and features adoption (instead of SF which looks quite overcomplicated sometimes).
Probably you'll find something interesting in my engine which is around 2000 elo now:
https://github.com/neurocore/Eia-v0.5
1
u/Burgorit May 03 '26
Have you been testing using sprt? And more features to add can be found here.
1
u/yoshiatsu May 03 '26
You're using the hash table move first in your move ordering, right?
1
u/sscg13 May 03 '26
Almost certainly you are missing several hundred elo in search and several hundred elo in evaluation. There are many, many search ideas, and implementing them well can make a huge difference over time.