Page 2 of 4

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 9:01 pm
by hgm
Ratosh wrote: Mon Dec 10, 2018 8:58 pm HGM's move generation on qperft is a good reference for speed. If you want to change your board representation there is no doubt that bitboard representation is the fastest.
Actually I doubt that.

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 9:20 pm
by Dann Corbit
hgm wrote: Mon Dec 10, 2018 9:01 pm
Ratosh wrote: Mon Dec 10, 2018 8:58 pm HGM's move generation on qperft is a good reference for speed. If you want to change your board representation there is no doubt that bitboard representation is the fastest.
Actually I doubt that.
The fastest is using GPUs.
Ankan's GPU perft is absurdly faster than anything else.

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 10:50 pm
by Ratosh
Oh, i assumed it since most top engines use bitboard. What would be the reason why they would chose it over other options?

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:09 pm
by Michael Sherwin
For people that have no idea how to program a GPU, like me, I did some CPU perft examples about 15 years ago.

On my computer, an i7-3930k, running at 3.2 GHz single threaded I get the following results.

Stockfish 10 bench 6 1,697,099 nodes/sec

My Examples: Every move made and unmade and no move counts cashed.

Carnivor: GNU 4 style move generator - enhanced
36,649,859 nodes/sec

Halfwit: Classic Chess 4.5 style bitboards - enhanced
25,930,980 nodes/sec

Conundrum: Move generation as a state machine (I think or maybe just incremental) 100% original
38,679,036 nodes/sec

Godzilla: A purely jump table driven move generator in x86 32 bit assembly 100% original with a top level C main() module
66,799,849 nodes/sec

NOTE: These examples are just for speed and not accuracy as they just count pseudo legal moves.

My processor i7-3930k CPU MARK 1935 an i9-9900k CPU MARK 2898

Source code for the examples is available on request.

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:16 pm
by gbtami
It would be very kind if you can put these sources to a github repo.

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:22 pm
by Michael Sherwin
gbtami wrote: Mon Dec 10, 2018 11:16 pm It would be very kind if you can put these sources to a github repo.
I'll see if I can figure out how to do that. But, I'm an old dog and it's not easy for me to learn new tricks, wuf wuf. :?

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:34 pm
by tttony
This is Skiull 0.3 perft 6

Code: Select all

 depth                 nodes    elapsed ms
     1                    20          0
     2                   400          0
     3                 8,902          0
     4               197,281         16
     5             4,865,609        203
     6           119,060,324       5226

depth       : 6
nodes       : 124,132,536
nps         : 22,734,896
time        : 5460ms
Bitboard with magic moves from Pradyumna Kannan

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:39 pm
by Michael Sherwin
Once in a while I'll overclock my CPU from 3.2 GHz to 4.6 GHz. I never did that for my move generator examples so I thought it might be interesting.

Carnivor: 36,649,859 nodes/sec => 45,176,777
Halfwit: 25,930,980 nodes/sec => 32,259,852
Conundrum: 38,679,036 nodes/sec => 47,856,608
Godzilla: 66,799,849 nodes/sec => 82,814,118 :P
:D

Re: fast(er) movegen

Posted: Mon Dec 10, 2018 11:54 pm
by Michael Sherwin
Michael Sherwin wrote: Mon Dec 10, 2018 11:22 pm
gbtami wrote: Mon Dec 10, 2018 11:16 pm It would be very kind if you can put these sources to a github repo.
I'll see if I can figure out how to do that. But, I'm an old dog and it's not easy for me to learn new tricks, wuf wuf. :?
That cost $7 dollars a month. Does not seem worth it to me!

Re: fast(er) movegen

Posted: Tue Dec 11, 2018 12:02 am
by Ratosh
From GitHub pricing page: "GitHub is free to use for public and open source projects."