Hash internal nodes of perft tree

Code, algorithms, languages, construction...
Octopus

Re: Hash internal nodes of perft tree

Post by Octopus » Wed Feb 25, 2015 2:06 am

Any success with cached perft?

rgoomes
Posts: 17
Joined: Sat Feb 21, 2015 9:41 pm
Real Name: Ricardo Gomes

Re: Hash internal nodes of perft tree

Post by rgoomes » Wed Feb 25, 2015 9:05 pm

Octopus wrote:Any success with cached perft?
Actually yes :D
Thank you very much!

I wasn't hashing in the correct way.. My store code was right before the move generation, and the right away to do it is hashing after my for loop..

My results with no hashing for starting position:
==================
time: 20,63 s
nodes: 3195901860
nps: 154907908

..and now with hashing:
==================
time: 9,87 s
nodes: 3195901860
nps: 323558636

Still you're perft was alot faster. What's your cpu?
For my next speedup I will try parallel perft.. maybe you achieved that speed with a parallel perft?

Octopus

Re: Hash internal nodes of perft tree

Post by Octopus » Wed Feb 25, 2015 11:24 pm

My cpu is i7-4790S @ 2.95 GHz. The speed of a perft is not that important as its correct results are. If I would avoid to separate there into move types and moreover especially to count check threats, perft would be twice as fast. Still I only use one cpu thread for the engine, multithreading is not at all yet on my agenda.

I think just your unhashed results are quite fast, there nothing seems to be wrong now with your generator. I hope, there are a lot of additional position tests of equal quality in result. There usually are quite often problems with e.p. and castling, especially at FRC/Chess960. My program moreover has to be able to handle also 10x8 chess positions ... But it (my second approach) will need still a lot of additional time.

Post Reply