hgm wrote:Optimizing what? If the purpose is to get a fast perft, then optimizing on perft seems the prudent thing to do...
How fast is Diep's move generator for perft? E.g. how long does a (non-hashed) perft(7) from the opening position take, and is this with or without actually making and unmaking the last ply?
As i said it is not interesting to measure, because you don't measure the move generator at all. perft is about legality, not about generating moves.
Generating moves is relevant for my evaluation function for specific counts and scans. It is irrelevant for perft.
In diep i've got an incremental attacktables in makemove/unmakemove.
I know from experience that if i strip diep's eval and reduce it to a material only evaluation, that this speeds up diep quite some, yet in such case the incremental attacktables eat nearly all system time.
It achieves 1.5 million nps then at a k7, repetitions not counted (which do count in perft as it requires 3 times repetition there rather than 2 times); Note that this is with hashtables, perft i would want to make without. Also k8 is faster than k7 for this.
The semi-legal move generation itself goes really fast. That's not the speed. Even at old crap hardware it was generating at 60+ million moves per second. We're dozens of times faster now practical with todays quadcores, yet of course in perft semi legal move generation is total irrelevant in contradiction to Diep.
So if i use, without stripping it too much (as it is doing all sorts of things for my evaluation function which are total unnecessary for perft), diep's makemove and unmakemove, use its existing move generator, and just make a special perft search function (which is rather tricky as it has to exploit the incremental attacktables), no hashtables at all of course, then that would achieve i guess roughly 20-40 million per second for perft.
20 million nps is on the safe side, 40 million is what i guess is possible to achieve at a k8-2.4Ghz single core with some effort. I'm not sure whether that would run faster or slower at an intel. Maybe faster at core2 using intel c++ 11.0 compiler. I'm not sure. Maybe it's double the speed, who knows.
I'm always careful in estimation of things in such case.
I estimate it would be 1 day work for the rough framework. As you know sometimes software development goes a tad slower than that. Yet if you'd offer compensation for that 1 day estimate (me running the risk of not achieving the 20M+ target and the risk of the additional work needed to bugfix promotions, en passant and you know all what that you need to fix for 'clever' AI) then all bugfixing i'd give for free. In case of reasonable compensation i will consider writing that search function that counts the legals in a clever manner.
Otherwise the discussion is closed from my viewpoint seen as perft is not serious, statements like: "there is no way that bla bla", i'm not so interested in a one-eyed in the land of the blind patzers competition without payment.
You get what you pay for and otherwise i did do the work for free in such case.
And yes a hashtable would seriously speedup perft i guess when you do some effort, but as it's not needed to get to the 20M+ target and i'm not offering it here, i don't want to make it at all as that would seriously impact the full day work.
Vincent