JVMerlino wrote: ↑Sun Jun 13, 2021 1:48 am
Kind of surprised anybody (other than ratings list folk) bother to download my engine at all.
I download and test other people's engines if I think they are interesting at some way, but I don't want to have to go and hunt for the code and/or the binaries. Put some links in your sig, that'll help.
===
To OP: Also take into account that incrementally keeping data, when the pieces move, slows down perft.
At first, I added all the PST-values from scratch in the evaluation function, but that is slow. I moved to calculating the initial values at startup, and then keep them incrementally as the pieces move. (Same for the Zobrist keys by the way.) Perft doesn't need either the incremental evals, or the zobrist keys.
The next version of my engine is going to have a tapered evaluation, so I'm going to keep a second set of PST's, also incrementally The first set took about 4 million nodes/sec off my perft speed (40 Mnps -> 36 Mnps). I expect that the next set will also take 4 miillion nodes off (32 Mnps), and I'll lose some speed due to also keeping the game phase (maybe drop down to 31 or 30 Mnps).
I could take those out (or write seperate functions for perft) to raise perft speed... but it doens't do anything for the chess engine. The important thing is that keeping the values incrementally lightens the evaluation function tremendously; this is important, because it's the most called function in the engine in the end. (It's called for all the leaf nodes for each depth.)
I also don't take them out because I can run my engine in debug mode, and then check if the incremental values that are kept during the movement of the pieces, are the same as values created from scratch. That way, I can assure I have no bugs in my incremental updates. (For Zobrist, MG PST tables, EG PST tables, and the game phase.)
Before you proceed with the rest of the engine, get perft correct. Then get the naked speed (keeping nothing incrementally) as high as possible to optimize your move generator and make/unmake functions. Then, let it be... expect perft speed to drop as soon as you start keeping things incrementally during piece movement. "Naked" perft speed is important, because it tests the efficiency of your move generator, make/unmake functions, and, even more importantly, their correctness. Beyond that, perft becomes either a debugging tool, or a tool to ensure that your engine is working correctly. (Eric Madsen goes to the extreme end by having perft actually use his search function. That will cause a very slow perft, but a very high confidence of search correctness.)