New UnseenSource for Reborn Engine.

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: New UnseenSource for Reborn Engine.

Post by zullil »

Pablo Vazquez wrote:
hgm wrote:
zullil wrote:Perhaps you are right. Maybe if I only consider non-bitboard engines then my move generator might be just slow, instead of very slow. Haven't checked any perft times for non-bitboard engines, so I have no sense of what's "normal" for them.
Bitboard is usually a lot slower for perft. Especially with the perft flavor that makes/unmakes the final ply, rather than just counting generated moves.
Last time I checked, frc-perft was the fastest perft around.
Thanks. Just compiled. Extremely fast:

Code: Select all

perft 7     3195901860      16.86s    189.6 mnps   11.9 ticks/move
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: New UnseenSource for Reborn Engine.

Post by zullil »

Even faster with different build parameters:

Code: Select all

perft 7     3195901860      14.77s    216.4 mnps   10.4 ticks/move
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New UnseenSource for Reborn Engine.

Post by hgm »

Indeed, that is the one I meant when pointing ut how bitboards could be made competitive. The way it works is that it does skip generating the moves in the horizon nodes. With bitboards you can do that, because move generation is a two-step process: first you generate bitboards with to-squares (from which you can easily select sub-groups of moves, like captures or checks), and then you extract the moves to make a move list.

Frcperft has compiler switches to chose between PEFT_BULK mode (which is what qperft does, generating the move list and then taking its size) and PERFT_FAST mode. The latter (which seems default) skips generating the move list, and applies POPCNT directly to the bitboards. There is nothing analogous in mailbox. But by using tis trick it ceases to be a measurement for the speed of move generation.

On my machine it is still slower than qperft, of course.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: New UnseenSource for Reborn Engine.

Post by zullil »

hgm wrote:Indeed, that is the one I meant when pointing ut how bitboards could be made competitive. The way it works is that it does skip generating the moves in the horizon nodes. With bitboards you can do that, because move generation is a two-step process: first you generate bitboards with to-squares (from which you can easily select sub-groups of moves, like captures or checks), and then you extract the moves to make a move list.

Frcperft has compiler switches to chose between PEFT_BULK mode (which is what qperft does, generating the move list and then taking its size) and PERFT_FAST mode. The latter (which seems default) skips generating the move list, and applies POPCNT directly to the bitboards. There is nothing analogous in mailbox. But by using tis trick it ceases to be a measurement for the speed of move generation.

On my machine it is still slower than qperft, of course.
OK, thanks again. I'll recompile with mode=BULK just to see the difference in speed.
Pablo Vazquez
Posts: 155
Joined: Thu May 31, 2007 9:05 pm
Location: Madrid, Spain

Re: New UnseenSource for Reborn Engine.

Post by Pablo Vazquez »

hgm wrote:Indeed, that is the one I meant when pointing ut how bitboards could be made competitive. The way it works is that it does skip generating the moves in the horizon nodes. With bitboards you can do that, because move generation is a two-step process: first you generate bitboards with to-squares (from which you can easily select sub-groups of moves, like captures or checks), and then you extract the moves to make a move list.

Frcperft has compiler switches to chose between PEFT_BULK mode (which is what qperft does, generating the move list and then taking its size) and PERFT_FAST mode. The latter (which seems default) skips generating the move list, and applies POPCNT directly to the bitboards. There is nothing analogous in mailbox. But by using tis trick it ceases to be a measurement for the speed of move generation.

On my machine it is still slower than qperft, of course.
Even counting all moves at the last ply without popcnt seems faster than qperft on my computer:

Code: Select all

 - - - - - - - - - - - -
 - - - - - - - - - - - -
 - - r n b q k b n r - -
 - - p p p p p p p p - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - P P P P P P P P - -
 - - R N B Q K B N R - -
 - - - - - - - - - - - -
 - - - - - - - - - - - -

Quick Perft by H.G. Muller
Perft mode: No hashing, bulk counting in horizon nodes

perft( 1)=           20 ( 0.000 sec)
perft( 2)=          400 ( 0.000 sec)
perft( 3)=         8902 ( 0.000 sec)
perft( 4)=       197281 ( 0.000 sec)
perft( 5)=      4865609 ( 0.040 sec)
perft( 6)=    119060324 ( 0.800 sec)
perft( 7)=   3195901860 (21.320 sec)

Code: Select all

frcperft 1.0, (C) 2008-2011 AJ Siemelink
single threaded, no hashing, mode=FAST, extract=BUILTIN, count=LOOP

   +---+---+---+---+---+---+---+---+
 8 |*r*|*n*|*b*|*q*|*k*|*b*|*n*|*r*|
   +---+---+---+---+---+---+---+---+
 7 |*p*|*p*|*p*|*p*|*p*|*p*|*p*|*p*|
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 3 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |(P)|(P)|(P)|(P)|(P)|(P)|(P)|(P)|
   +---+---+---+---+---+---+---+---+
 1 |(R)|(N)|(B)|(Q)|(K)|(B)|(N)|(R)|
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
perft 1             20       0.00s      inf mnps  540.9 ticks/move
perft 2            400       0.00s      inf mnps   33.8 ticks/move
perft 3           8902       0.00s      inf mnps   13.5 ticks/move
perft 4         197281       0.00s      inf mnps   11.5 ticks/move
perft 5        4865609       0.02s    243.3 mnps   11.3 ticks/move
perft 6      119060324       0.53s    224.6 mnps   10.6 ticks/move
perft 7     3195901860      13.42s    238.1 mnps   10.0 ticks/move

Code: Select all

frcperft 1.0, (C) 2008-2011 AJ Siemelink
single threaded, no hashing, mode=BULK, extract=BUILTIN, count=LOOP

   +---+---+---+---+---+---+---+---+
 8 |*r*|*n*|*b*|*q*|*k*|*b*|*n*|*r*|
   +---+---+---+---+---+---+---+---+
 7 |*p*|*p*|*p*|*p*|*p*|*p*|*p*|*p*|
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 3 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |(P)|(P)|(P)|(P)|(P)|(P)|(P)|(P)|
   +---+---+---+---+---+---+---+---+
 1 |(R)|(N)|(B)|(Q)|(K)|(B)|(N)|(R)|
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
perft 1             20       0.00s      inf mnps  292.2 ticks/move
perft 2            400       0.00s      inf mnps   32.5 ticks/move
perft 3           8902       0.00s      inf mnps   15.5 ticks/move
perft 4         197281       0.00s      inf mnps   13.3 ticks/move
perft 5        4865609       0.03s    162.2 mnps   14.5 ticks/move
perft 6      119060324       0.63s    189.0 mnps   12.8 ticks/move
perft 7     3195901860      16.62s    192.3 mnps   12.5 ticks/move
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New UnseenSource for Reborn Engine.

Post by hgm »

That is indeed faster than I would have expected. (i.e. extraction of the moves takes surprisingly little time.) Perhaps this is due to the BUILTIN extraction mode, which does do something I don't quite understand (calling some library function). The standard method would be what is called DEBRUIN here.

Perhaps I should try the incrementally updated mobility method one of these days. Problem is that this is much more suitable for pseudo-legal move generation, as you would do in engines, then for fully legal move generation, as needed in perft.
markchessman

Re: New UnseenSource for Reborn Engine.

Post by markchessman »

I had an error with my browser, and cant get Leo site, so Ive temp put the engine here

http://www.filedropper.com/reborn141

Ive created a DevCpp compatable version. I was keen to allow anybody to compile it before I worked on the code for svens advice.

devC is freely available online
markchessman

Re: New UnseenSource for Reborn Engine.

Post by markchessman »

can someone try to compiler on a g++ system, Id like to know if its compatable? My system is too busy with other apps to install a new cpp system

the filedropper ftp is no much cop, but you can get the file there,or try leo site, but it may not be online yet,sorry
kinderchocolate
Posts: 454
Joined: Mon Nov 01, 2010 6:55 am
Full name: Ted Wong

Re: New UnseenSource for Reborn Engine.

Post by kinderchocolate »

Why don't you use source control? It's open source anyway.
markchessman

Re: New UnseenSource for Reborn Engine.

Post by markchessman »

I will have a look at it, but DevCpp is pretty good