Testing Hash Table with perft

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Testing Hash Table with perft: Solved

Post by diep »

hgm wrote:Unfortunately, the government is payed by me... :cry:
Well if you grow a beard like Santa Claus expect to get treated like one :)

Note that foreigners working in The Netherlands only pay 30% tax first 7 years they're here. You sure that Santa Claus with that big beard isn't a foreigner?

Vincent
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Testing Hash Table with perft: Solved

Post by diep »

hgm wrote:Optimizing what? If the purpose is to get a fast perft, then optimizing on perft seems the prudent thing to do... :lol:

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
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Testing Hash Table with perft: Solved

Post by diep »

For example HGM,

Suppose you say: "i offer 200 euro in case you manage to achieve > 20M/s at a single core 2.4Ghz k8 and i want an exe to verify it at my core2 box".

You motivate me even more if you say: "and additoinal if you achieve a speed above 20M/s then for each million nps more you get 10 euro", maybe i show up with something real fast, as i have a very bad cash record at my bank right now.

Oh i see now that crafty when i type in perft 6 achieves 10M/s at my k8 2.4Ghz, but i guess there is not many takers on outperforming crafty a factor 2.

That's too easy.

Heh i don't even know other peoples speed as i don't really follow perft threads of course and won't.

Enough has been said. I know how difficult it is to collect money from people who walk on jeruzalem-slippers.

Vincent
User avatar
hgm
Posts: 27824
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Testing Hash Table with perft: Solved

Post by hgm »

diep wrote:Note that foreigners working in The Netherlands only pay 30% tax first 7 years they're here.
Formally I do pay 30% (the rate on the forfetary 4% box-3 income).
User avatar
hgm
Posts: 27824
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Testing Hash Table with perft: Solved

Post by hgm »

diep wrote:Even at old crap hardware it was generating at 60+ million moves per second.
My question was how you measure that, if not in perft.