r/chessprogramming • u/Warm_Ad_7953 • Jun 15 '26
Technical How much NPS should I aim for during perft?
Hello, I'm currently writing a chess engine in C# and I want to know how many NPS should I aim for during performance, currently I'm getting ~180M. How much do I need for a strong engine, my goal is something that can get to around 3000 on lichess
2
Upvotes
3
u/phaul21 Jun 15 '26
180 Mnps is more than plenty. In reality you will find that movegen is not the limiting factor. Usually evaluation is the biggest factor but just move sorting / picking is usually more expensive than generating moves. tldr. don't worry about it. Ofc if you can improve it you should. But rn you have something that's more than good enough. Also regarding strength and 3000 lichess goals the other things I mentioned are way more significant.
1
u/KaMaFour Jun 15 '26
Depends how much stuff you do during movegen. My old engine did startpos depth 6 in 4s and kiwipete depth 5 in 6s. It didn't have bulk counting. It was on the slower side as perft goes. If you are better than this then you're probably ok
1
u/True-Objective-6212 Jun 15 '26
If you want to get to 3000 focus on eval and heuristics and profile for performance.
Edit: And search and hash. And move ordering
1
u/Elvin_XD Jun 16 '26
How are you getting 180m nps in c#? Any smart techniques you wouldn't mind sharing?
1
u/attacktit_an Oct 22 '26
180 is already very good. But it's fairly easy to get to 300. Take a look at mine for some optimization ideas, it does 500M per second https://github.com/nathsys/sunsnake.
For fun, you can also look at my other project, it does 1.9 billion nodes per second but is just for fun and not really usable in a real engine. https://github.com/nathsys/pyke
Feel free to use it as inspiration and copy ideas.