Introducing Omniperft

Discussion of chess software programming and technical issues.

Moderator: Ras

Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Introducing Omniperft

Post by Dann Corbit »

With PGO optimization:

Code: Select all

OmniPerft 1.0 by Ilari Pihlajisto

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
FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
perft 4
Perft with 4 thread(s)
197281
Elapsed time: 0 second(s)
perft 5
Perft with 4 thread(s)
4865609
Elapsed time: 1 second(s)
perft 6
Perft with 4 thread(s)
119060324
Elapsed time: 7 second(s)
perft 7
Perft with 4 thread(s)
3195901860
Elapsed time: 90 second(s)
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Introducing Omniperft

Post by Denis P. Mendoza »

pedrox wrote:AMD64 X2 4600+ (2 threads) + windows xp 32 bits

- ICC compile of Denis.

Perft 7 --> 278 s

- MSVC 2005 (no pgo)

Perft 7 --> 310 s

- MSVC 2008 (pgo)

Perft 7 --> 288 s

Denis, your compilation is PGO?

Pedro
No Pedro. I just compiled using the normal optimization switches without PGO. I just tried a quick build pal! Thanks.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Introducing Omniperft

Post by Denis P. Mendoza »

Ilari,

May I know what version of GCC/MingW are you using?

I'm still using GCC 4.1.2/ MingW 3.11 and i'm surprised that ICC and MSVC were beaten by my GCC and MingW (non-PGO) builds too. I'll have a look too.

BTW. It's nice that Sloppy is not 'pthreads' dependent anymore. It improved a bit in speed and search. Congrats.

Denis
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Introducing Omniperft

Post by pedrox »

Denis P. Mendoza wrote:
pedrox wrote:AMD64 X2 4600+ (2 threads) + windows xp 32 bits

- ICC compile of Denis.

Perft 7 --> 278 s

- MSVC 2005 (no pgo)

Perft 7 --> 310 s

- MSVC 2008 (pgo)

Perft 7 --> 288 s

Denis, your compilation is PGO?

Pedro
No Pedro. I just compiled using the normal optimization switches without PGO. I just tried a quick build pal! Thanks.
Thanks Denis,

I've tried to do a compilation with icl + PGO, the result for perft 7 was 291 s, higher than the 278 s of yours without PGO.

I must be doing something wrong or maybe is a bit complicated thing to have an AMD rather than Intel and use a virtual machine?.

Pedro
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: Introducing Omniperft

Post by ilari »

Denis P. Mendoza wrote:Ilari,

May I know what version of GCC/MingW are you using?

I'm still using GCC 4.1.2/ MingW 3.11 and i'm surprised that ICC and MSVC were beaten by my GCC and MingW (non-PGO) builds too. I'll have a look too.
I think it's GCC 4.4.2. It was in the Qt bundle, so it may have optimizations which I'm unaware of. Link: http://trolltech.com/downloads/opensour ... indows-cpp
BTW. It's nice that Sloppy is not 'pthreads' dependent anymore. It improved a bit in speed and search. Congrats.

Denis
Thanks.
Currently it affects only perft, but it had to be done. Pthreads for Windows isn't exactly bug-free. I'm going to miss condition variables when I start writing a parallel search though.
Richard Allbert
Posts: 794
Joined: Wed Jul 19, 2006 9:58 am

Re: Introducing Omniperft

Post by Richard Allbert »

Hi,

Thanks a lot for Omniperft.

I've been using it today to debug implementing FRC in Jabba.

When I put the following FEN into Omniperft, it crashes:

qrk1b1rn/pppp1ppp/4pbn1/8/8/4PBN1/PPPP1PPP/Q1KRB1RN b gb -

I also tried replacing the gb with kq, but same result.

Have you seen this before? The crash says "assertion failed type > 0 file src\zorbist.cpp"

Thanks

Richard
Richard Allbert
Posts: 794
Joined: Wed Jul 19, 2006 9:58 am

Re: Introducing Omniperft

Post by Richard Allbert »

Sorry to be a pain.... but

Code: Select all

setboard 1rk3r1/8/8/8/8/8/8/1RK1R3 w EBgb -
. r k . . . r .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. R K . R . . .
FEN: 1rk3r1/8/8/8/8/8/8/1RK1R3 w KQkq - 0 1
divide 2
Perft with 2 thread(s)
b1b2: 23
b1b3: 22
b1b4: 21
b1b5: 20
b1b6: 19
b1b7: 18
b1b8: 1
b1a1: 24
c1c2: 24
c1d1: 24
O-O-O: 24
e1e2: 24
e1e3: 24
e1e4: 24
e1e5: 24
e1e6: 24
e1e7: 24
e1e8: 4
e1d1: 24
e1f1: 24
e1g1: 24
e1h1: 25
c1d2: 24
489
Elapsed time: 0 second(s)
1rk3r1/8/8/8/8/8/8/1RK1R3 w EBgb -
I think it's incorrect... there are 3 legal moves after b1b8. Also, e1d1 has 21 moves not 24.

I don't mean to be a pain! You did ask for feedback :)

Regards

Richard

PS Thanks also for Cutechess...
User avatar
Roman Hartmann
Posts: 295
Joined: Wed Mar 08, 2006 8:29 pm

Re: Introducing Omniperft

Post by Roman Hartmann »

Below is the output of roce.

Roman

Code: Select all

roce: chess960

FRC/Chess960 enabled

roce: setboard 1rk3r1/8/8/8/8/8/8/1RK1R3 w EBgb - 

roce: divide 2
c1b1 22
c1d1 23
c1c2 23
c1d2 23
b1a1 24
b1b2 22
b1b3 21
b1b4 20
b1b5 19
b1b6 18
b1b7 16
b1b8 3
e1f1 23
e1g1 23
e1h1 24
e1d1 21
e1e2 23
e1e3 23
e1e4 23
e1e5 23
e1e6 23
e1e7 21
e1e8 3
Moves: 23
Nodes: 464

roce: 
Richard Allbert
Posts: 794
Joined: Wed Jul 19, 2006 9:58 am

Re: Introducing Omniperft

Post by Richard Allbert »

Hi Roman,

Thanks, mine was the same also.

I've played a few games with debug on, and all seems ok :)

Richard
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Introducing Omniperft

Post by Sven »

Richard Allbert wrote:Also, e1d1 has 21 moves not 24.
I see these 20 non-castling moves for black after Re1-d1:
Rb8 has 1 horizontal move
Rb8 has 7 vertical moves
Rg8 has 4 horizontal moves
Rg8 has 7 vertical moves
Kc8 has 1 legal move (Kc8-c7)
so my question is which of the black castles is possible? Is black allowed to castle on queen side by moving Rb8 to d8 and leaving Kc8 where it is? That would explain the number of 21. King side castling is prevented by Rd1.

Sven