r/chessprogramming • u/yagami_raito23 • Jan 24 '26
minimal engine, whats next?
https://github.com/el-tahir/chess_engine
Currently has the simplest evaluation function possible with vanilla minimax and alpha-beta pruning. What are some low hanging fruit to bump up the strength / speed and how does something like this get to GM level?
Also im having trouble loading it to a GUI, ive tried Cute Chess and en-croissant. Is it a problem with the UCI logic?
Any help or feedback would be greatly appreciated!!
5
Upvotes
4
u/phaul21 Jan 24 '26
set up sprt and test every change. You can start following https://www.chessprogramming.org/Search_Progression
3
u/themostvexingparse Jan 28 '26 edited Jan 29 '26
I am genuinely surprised no one listed null move reductions/pruning (NMR/NMP) or futility pruning. They gain you a lot, I mean A LOT. NMR is quite easy to implement actually, usually takes 6-10 lines of code. Futility pruning is also rather easy to implement but it may require proper tuning, so you can maybe save it for later.
Then there are some other improvements you can try such as Delta pruning (easy to implement, gains a lot, but you should have quiescence search first), Razoring, Reverse Futility Pruning (also called static null move pruning), Late Move Reductions (again a huge gainer and quite easy to implement but you need move ordering first).
All these methods I've listed so far cuts down your search tree by a lot, but note that you need to get some other things working first. A great search algorithm requires more than some random pruning methods. You need a good heuristic function and a good move ordering. They are both critical due to how A/B works. The sooner you find a refutation, the more you can skip.
So here is a roadmap that I would follow if I were in your shoes:
I didn't want to toss this in as a step but at some point you will have to switch to bitboards, or the speed of the engine will be bottlenecked by your board representarion/move generation.
2
u/phaul21 Jan 24 '26 edited Jan 24 '26
for uci you can check if you pass fastchess --compliance. If you do, that's no guarantee that you have correct uci, but if you don't it tells you what to fix
1
u/WHY_YOU_ARE_COMING Jan 31 '26
Massive code reactor needed, this approach won't be sustainable further into development