Please comment on my Perft speeds
Posted: Fri Jul 10, 2015 12:18 am
Hi, only posted on here a couple of times before.
I am currently re-writing my engine (She's called Eva after the Bond actress) to use Bitboards and multi-threading. It is my first foray into writing multi-threaded anything, if I'm honest, let alone chess programs.
I am a bit disappointed with the speeds of my Perft function, although my impression is that there is a lot of misinformation regarding perft speeds in regard to different programmers using different metrics, and also some truly outlandish figures that I simply don't believe (like ~10 seconds for depth 7??!!!) So I'm hoping to get some perspective from experts.
Here are my results from the starting position to depth 7:
Perft(1) = 20 in 0.001312 sec
Perft(2) = 400 in 0.001263 sec
Perft(3) = 8902 in 0.004491 sec
Perft(4) = 197281 in 0.023202 sec
Perft(5) = 4865609 in 0.419626 sec
Perft(6) = 119060324 in 10.080624 sec
Perft(7) = 3195901860 in 277.148570 sec
(I have just run these off now, but I set Perft 8 running whilst I went to the pub the other evening and it was done by the time I got back, but Perft 9 had not completed after 24hrs.)
This is just my move generator without updating hashkeys or anything else, and my move generator calculates pseudo-legal moves; it is on a machine with AMD FX-8350 8 core 4MHz processor. As I say, this is my first attempt to write multi-threaded code, and for the Perft function all I did was create a new thread for each child of the root node. I don't know if this was the best approach (in particular, will creating more threads than there are cores for this application slow stuff down?), but it was really just to check that my move generator and position class were thread safe, and obviously to remove bugs, which *I think* I have now done having tested a number of positions.
Thanks in advance!
I am currently re-writing my engine (She's called Eva after the Bond actress) to use Bitboards and multi-threading. It is my first foray into writing multi-threaded anything, if I'm honest, let alone chess programs.
I am a bit disappointed with the speeds of my Perft function, although my impression is that there is a lot of misinformation regarding perft speeds in regard to different programmers using different metrics, and also some truly outlandish figures that I simply don't believe (like ~10 seconds for depth 7??!!!) So I'm hoping to get some perspective from experts.
Here are my results from the starting position to depth 7:
Perft(1) = 20 in 0.001312 sec
Perft(2) = 400 in 0.001263 sec
Perft(3) = 8902 in 0.004491 sec
Perft(4) = 197281 in 0.023202 sec
Perft(5) = 4865609 in 0.419626 sec
Perft(6) = 119060324 in 10.080624 sec
Perft(7) = 3195901860 in 277.148570 sec
(I have just run these off now, but I set Perft 8 running whilst I went to the pub the other evening and it was done by the time I got back, but Perft 9 had not completed after 24hrs.)
This is just my move generator without updating hashkeys or anything else, and my move generator calculates pseudo-legal moves; it is on a machine with AMD FX-8350 8 core 4MHz processor. As I say, this is my first attempt to write multi-threaded code, and for the Perft function all I did was create a new thread for each child of the root node. I don't know if this was the best approach (in particular, will creating more threads than there are cores for this application slow stuff down?), but it was really just to check that my move generator and position class were thread safe, and obviously to remove bugs, which *I think* I have now done having tested a number of positions.
Thanks in advance!