tcusr wrote: ↑Wed Sep 08, 2021 12:52 am
algerbrex wrote: ↑Wed Sep 08, 2021 12:31 am
tcusr wrote: ↑Tue Sep 07, 2021 11:13 pm
The only odd thing I can see in the code you posted above is that you have a beta cutoff in the root (how could a root move ever be too good?) and I think you could safely remove it. I have the hunch that it is responsible for your random moves. If it helps I can explain to you why exactly... but let's try that first.
tbf i copied it from algerbrex code (it seemed off to me too, i just kept it because i was desperate), i removed it now and it still finds mate if depth > 1 as before, thank you for that.
but still, if i remove "+ ply" it gives me random moves, only check extensions solve this
I was just surprised that you added check extensions (which I still don't have in my engine) before quiescence search.
i don't understand, why? check extensions is literally one statement. to add quiescence i have to first implement MVV/LVA ordering otherwise i will get a "quiescence explosion" which slows down search massively.
You can do whatever you want. But most engines only call the static evaluation on quiet positions where no captures are possible anymore
so you check for checkmate in the quiescence search?
Yeah, Lithander’s right. I added that code months ago, and never removed it, even after I realized it didn’t really make sense, mostly bc it didn’t have any negative consequences afaik could tell. So ignore that.
i removed it, i've only added the extra parameter for the ply and now it works perfectly and i also know why now (thanks mergi)
now it's time to move on.
btw i looked at your evaluation function and it seems pretty simple, is blunder really 2000 elo? that's impressive
what features should i add to get to that point?
in the following days i intend to add MVV/LVA ordering, quiescence search, PSQT tables, after that i don't really know
Thank you!
From personal testing and testing on the CCRL, Blunder is around 2000 Elo, maybe slightly above. Officially, it's listed at ~2038 Elo (+/- 39 Elo).
And yes, the evaluation function is pretty simple code-wise, and currently only uses piece-square tables for the middle and endgame, interpolated together using tapered evaluation. The piece-square tables are from Lithander, who has done a lot of great work with texel tuning and creating strong piece-square tables, and I hope in the next several versions of Blunder, I can create my own custom piece-square tables with automated tuning.
But piece-square tables and tapered evaluation can be quite powerful, combined with a good search. Ronald Friederich's PeSTO engine is a testament to this, which only has piece-square tables and tapered evaluation, but plays at a +3000 Elo level.
If you go and look at the README page for Blunder, all of the features I'm currently using should be listed there.
Here are several ideas I think you should look into after you've finished the above:
- Killer moves (50-70 Elo)
- Null-Move pruning (50-100 Elo)
The above are pretty simple and have very nice gains. After that, look into implementing:
These features should get you around ~1900-2100 Elo, depending on the overall speed of your engine. You'll probably need to do a bit of work debugging the later features, but the Elo gains they give you are well worth the trouble.
After the above, there are a lot of different directions you can take. Some ideas I'm currently considering are:
- Late move reductions
- Static null move pruning
- Futility pruning, in main search and quiesence search
- Pawn structure evaluation.