Something new, something borrowed

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Something new, something borrowed

Post by zullil »

ibid wrote:
vittyvirus wrote:3. [d] 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
Here, Yaka performed 1.24x faster, and without movelists it performed only 1.97x faster.

Code: Select all

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

perft( 1)=           14 ( 0.000 sec)
perft( 2)=          191 ( 0.000 sec)
perft( 3)=         2812 ( 0.000 sec)
perft( 4)=        43238 ( 0.016 sec)
perft( 5)=       674624 ( 0.000 sec)
perft( 6)=     11030083 ( 0.172 sec)
perft( 7)=    178633661 ( 2.078 sec)
perft( 8)=   3009794393 (40.283 sec)

Yaka 0.0 x64 by Syed Fahad
position fen 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
perft 8
b4b1: 334237659
...truncated...
g2g4: 229481475
Took 32560 ms for 3007928693 nodes, 92381 knps

Yaka (no movelists) 0.0 x64 by Syed Fahad
position fen 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
perft 8
b4b1: 334237659
...truncated...
g2g4: 229481475
Took 20476 ms for 3007928693 nodes, 146900 knps

Did you notice you are getting the wrong answer here? I downloaded the no movelists version of yaka and it appears to get perft 5+ wrong.

A comparison of the no movelists yaka with the development version of gperft on my machine with these 5 positions (in ms)

Code: Select all

              yaka   gperft
1. perft 7   12285     3726
2. perft 6   24505    12746
3. perft 8   21975*   10047
4. perft 7   82845    53074
5. perft 6    8073     3204

Code: Select all

ProcyonLeo-2: ~/Documents/Chess/Kirby] ./perft
FEN string = 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 
Depth = 8
Leaf nodes = 3009794393
Time taken = 116212 ms
Looks like mine is correct, but takes 10 times longer than gperft. Ouch!

Is that 10047 with one thread? Without hash? CPU speed?
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: Something new, something borrowed

Post by vittyvirus »

zullil wrote:
vittyvirus wrote:[Can you tell me a position where there are more than three moves by pinned pawns?
[D]4k3/4r3/8/8/8/2q3b1/3PPP2/4K3 w - - 0 1

:D
But Yaka already took care of that:

Code: Select all

// Line 162
add_pinned_pawn_move<false, 16 * One, GenFor>&#40;shift_bb<8 * One>&#40;b1 & &#40;Rank3Mask << &#40;GenFor * 3 * 8&#41;))
                                                & FreeSquares & Target&#41;;
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: Something new, something borrowed

Post by vittyvirus »

Hi,
The bugs have been fixed. You can get latest version of Yaka from here:
https://sites.google.com/site/sydfhd/projects/yaka/
Also, the perft test suite of Steven has been included.