Black/White symmetry in move generation

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany

Re: color symmetric behaviour

Post by SMIRF »

Move move generation within a check threat could be markably improved.
The results from current examples are now:

Code: Select all

  XFEN  2: 3k4/8/8/2N4b/6n1/8/5P2/R3K2R w KQ - 0 1
  (move count: 32)
   +-a--b--c--d--e--f--g--h-+
 8 |   :::   [k]   :::   :::|
 7 |:::   :::   :::   :::   |
 6 |   :::   :::   :::   :::|
 5 |&#58;&#58;&#58;   <N>   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;b&#93;|
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;n&#93;&#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |   &#58;&#58;&#58;   &#58;&#58;&#58;   <P>   &#58;&#58;&#58;|
 1 |<R>   &#58;&#58;&#58;   <K>   &#58;&#58;&#58;<R>|
&#40;w&#41;+-*--b--c--d--*--f--g--*-+

Generats 320 M moves in 1.63 sec, rate 196.32 M moves/sec

 Ke1-e2   Ke1-d1   Ke1-d2   Ke1-f1   f2-f3    f2-f4    Nc5-d7
 Nc5-b7+  Nc5-e6+  Nc5-a6   Nc5-e4   Nc5-a4   Nc5-d3   Nc5-b3
 Ra1-a2   Ra1-a3   Ra1-a4   Ra1-a5   Ra1-a6   Ra1-a7   Ra1-a8+
 Ra1-b1   Ra1-c1   Ra1-d1+  O-O-O+   Rh1-h2   Rh1-h3   Rh1-h4
 Rh1xh5   Rh1-g1   Rh1-f1   O-O

 e1e2     e1d1     e1d2     e1f1     f2f3     f2f4     c5d7
 c5b7     c5e6     c5a6     c5e4     c5a4     c5d3     c5b3
 a1a2     a1a3     a1a4     a1a5     a1a6     a1a7     a1a8
 a1b1     a1c1     a1d1     e1c1     h1h2     h1h3     h1h4
 h1h5     h1g1     h1f1     e1g1

 Ke2      Kd1      Kd2      Kf1      f3       f4       Nd7
 Nb7+     Ne6+     Na6      Ne4      Na4      Nd3      Nb3
 Ra2      Ra3      Ra4      Ra5      Ra6      Ra7      Ra8+
 Rb1      Rc1      Rd1+     O-O-O+   Rh2      Rh3      Rh4
 Rxh5     Rg1      Rf1      O-O


  XFEN 22&#58; 2q7/10/2kP1a1c2/1pP4N1R/pB2K1p3/P2r1PN3/1b2P5/3B3C2 w - b6 0 1
  &#40;move count&#58; 3&#41;
   +-a--b--c--d--e--f--g--h--i--j-+
 8 |   &#58;&#58;&#58;&#91;q&#93;&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 7 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 6 |   &#58;*&#58;&#91;k&#93;<P>   &#91;a&#93;   &#91;c&#93;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;&#91;p&#93;<P>   &#58;&#58;&#58;   &#58;&#58;&#58;<N>&#58;&#58;&#58;<R>|
(+)|&#91;p&#93;<B>   &#58;&#58;&#58;<K>&#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |<P>   &#58;&#58;&#58;&#91;r&#93;&#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   |
 2 |   &#91;b&#93;   &#58;&#58;&#58;<P>&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 1 |&#58;&#58;&#58;   &#58;&#58;&#58;<B>&#58;&#58;&#58;   &#58;&#58;&#58;<C>&#58;&#58;&#58;   |
&#40;w&#41;+-a--b--c--d--e--f--g--h--i--j-+

Generats 60 M moves in 3.45 sec, rate  17.39 M moves/sec

 Ke4-f4   Ke4xd3   Nh5xf6

 e4f4     e4d3     h5f6

 Kf4      Kxd3     Nxf6
It would be interesting to know, whether a bitboard approach would do better.
User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany

Re: color symmetric behaviour

Post by SMIRF »

Now there are some first perft results of the developing achromatic engine:

Code: Select all

XFEN 00&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
   +-*--b--c--d--*--f--g--*-+
 8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;k&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|
 7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |<P><P><P><P><P><P><P><P>|
 1 |<R><N><B><Q><K><B><N><R>|
&#40;w&#41;+-*--b--c--d--*--f--g--*-+

Ply      Moves       &#91;x&#93;   &#91;ep&#93;      &#91;+&#93; &#91;++&#93; Prom   Cstl   Sec
 1&#58;         20         0      0        0    0    0      0  0.00
 2&#58;        400         0      0        0    0    0      0  0.00
 3&#58;       8902        34      0       12    0    0      0  0.00
 4&#58;     197281      1576      0      469    0    0      0  0.00
 5&#58;    4865609     82719    258    27351    0    0      0  0.07
 6&#58;  119060324   2812008   5248   809099   46    0      0  1.76
 7&#58; 3195901860 108329926 319617 33103848 1628    0 883453 47.78


XFEN 01&#58; r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25
   +-*--b--c--d--*--f--g--*-+
 8 |&#91;r&#93;&#58;&#58;&#58;   &#58;&#58;&#58;&#91;k&#93;&#58;&#58;&#58;   &#91;r&#93;|
 7 |&#91;p&#93;   &#91;p&#93;&#91;p&#93;&#91;q&#93;&#91;p&#93;&#91;b&#93;   |
 6 |&#91;b&#93;&#91;n&#93;   &#58;&#58;&#58;&#91;p&#93;&#91;n&#93;&#91;p&#93;&#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   |
 4 |   &#91;p&#93;   &#58;&#58;&#58;<P>&#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   <N>   &#58;&#58;&#58;<Q>&#58;&#58;&#58;&#91;p&#93;|
 2 |<P><P><P><B><B><P><P><P>|
 1 |<R>   &#58;&#58;&#58;   <K>   &#58;&#58;&#58;<R>|
&#40;w&#41;+-*--b--c--d--*--f--g--*-+

Ply      Moves        &#91;x&#93;    &#91;ep&#93;      &#91;+&#93;  &#91;++&#93;     Prom      Cstl    Sec
 1&#58;         48          8       0        0     0        0         2   0.00
 2&#58;       2039        351       1        3     0        0        91   0.00
 3&#58;      97862      17102      45      993     0        0      3162   0.00
 4&#58;    4085603     757163    1929    25523     6    15172    128013   0.06
 5&#58;  193690690   35043416   73365  3309887  2645     8392   4993637   2.83
 6&#58; 8031647685 1558445089 3577504 92238050 55014 56627920 184513607 123.88


XFEN 02&#58; 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
   +-a--b--c--d--e--f--g--h-+
 8 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 7 |<P><P><P>   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;k&#93;|
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |   &#58;&#58;&#58;   &#58;&#58;&#58;<K>&#91;p&#93;&#91;p&#93;&#91;p&#93;|
 1 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
&#40;w&#41;+-a--b--c--d--e--f--g--h-+

Ply       Moves       &#91;x&#93; &#91;ep&#93;        &#91;+&#93;     &#91;++&#93;       Prom Cstl    Sec
 1&#58;          18         1    0          0        0         12    0   0.00
 2&#58;         290         0    0         52        0        212    0   0.00
 3&#58;        5044       144    0        310        0       2232    0   0.00
 4&#58;       89363       194    0      15360      106      42120    0   0.00
 5&#58;     1745545     46745    0     161249      246     544556    0   0.04
 6&#58;    34336777    406616    0    6021556    58370   10977688    0   0.61
 7&#58;   749660761  22632801    0   87618216   114543  165649936    0  14.68
 8&#58; 16303466487 337063298    0 2990354989 29875834 3731200972    0 290.84
User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany

Re: color symmetric behaviour

Post by SMIRF »

Of course there also are some 10x8 chess board perft results:

Code: Select all

XFEN 07&#58; rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
   +-*--b--c--d--e--*--g--h--i--*-+
 8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;c&#93;&#91;k&#93;&#91;a&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|
 7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |<P><P><P><P><P><P><P><P><P><P>|
 1 |<R><N><B><Q><C><K><A><B><N><R>|
&#40;w&#41;+-*--b--c--d--e--*--g--h--i--*-+

Ply       Moves        &#91;x&#93;    &#91;ep&#93;       &#91;+&#93;  &#91;++&#93; Prom Cstl    Sec
 1&#58;          28          0       0         0     0    0    0   0.00
 2&#58;         784          0       0         0     0    0    0   0.00
 3&#58;       25283        387       0       120     0    0    0   0.00
 4&#58;      808984      14812       0      4019     0    0    0   0.01
 5&#58;    28946187     907953     468    304360     0    0    0   0.39
 6&#58;  1025229212   36740962   14017  11052055   118    0    0  14.04
 7&#58; 39532257395 1838308392 1216940 621202264 34167    0  120 540.52


XFEN 08&#58; r1b1c2rk1/p4a1ppp/1ppq2pn2/3p1p4/3A1Pn3/1PN3PN2/P1PQP1BPPP/3RC2RK1 w - - 0 15
   +-a--b--c--d--e--f--g--h--i--j-+
 8 |&#91;r&#93;&#58;&#58;&#58;&#91;b&#93;&#58;&#58;&#58;&#91;c&#93;&#58;&#58;&#58;   &#91;r&#93;&#91;k&#93;&#58;&#58;&#58;|
 7 |&#91;p&#93;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;a&#93;&#58;&#58;&#58;&#91;p&#93;&#91;p&#93;&#91;p&#93;|
 6 |   &#91;p&#93;&#91;p&#93;&#91;q&#93;   &#58;&#58;&#58;&#91;p&#93;&#91;n&#93;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;   &#58;&#58;&#58;   |
 4 |   &#58;&#58;&#58;   <A>   <P>&#91;n&#93;&#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   <P><N>&#58;&#58;&#58;   |
 2 |<P>&#58;&#58;&#58;<P><Q><P>&#58;&#58;&#58;<B><P><P><P>|
 1 |&#58;&#58;&#58;   &#58;&#58;&#58;<R><C>   &#58;&#58;&#58;<R><K>   |
&#40;w&#41;+-a--b--c--d--e--f--g--h--i--j-+

Ply       Moves        &#91;x&#93;  &#91;ep&#93;       &#91;+&#93; &#91;++&#93; Prom Cstl    Sec
 1&#58;          50          6     0         1    0    0    0   0.00
 2&#58;        2801        191     0         2    0    0    0   0.00
 3&#58;      143032      18799     0      2215    0    0    0   0.00
 4&#58;     7917813     680548    12     45116    0    0    0   0.09
 5&#58;   412224167   56838308   161   5549854    8    0    0   5.06
 6&#58; 22846373778 2289332857 90607 218647805 9531    0    0 264.81


XFEN 09&#58; r1b2k2nr/p1ppq1ppbp/n1Pcpa2p1/5p4/5P4/1p1PBCPN2/PP1QP1BPPP/RN3KA2R w KQkq - 6 12
   +-*--b--c--d--e--*--g--h--i--*-+
 8 |&#91;r&#93;&#58;&#58;&#58;&#91;b&#93;&#58;&#58;&#58;   &#91;k&#93;   &#58;&#58;&#58;&#91;n&#93;&#91;r&#93;|
 7 |&#91;p&#93;   &#91;p&#93;&#91;p&#93;&#91;q&#93;   &#91;p&#93;&#91;p&#93;&#91;b&#93;&#91;p&#93;|
 6 |&#91;n&#93;&#58;&#58;&#58;<P>&#91;c&#93;&#91;p&#93;&#91;a&#93;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;   &#58;&#58;&#58;   |
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   <P>   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;<P><B><C><P><N>&#58;&#58;&#58;   |
 2 |<P><P>   <Q><P>&#58;&#58;&#58;<B><P><P><P>|
 1 |<R><N>&#58;&#58;&#58;   &#58;&#58;&#58;<K><A>   &#58;&#58;&#58;<R>|
&#40;w&#41;+-*--b--c--d--e--*--g--h--i--*-+

Ply       Moves        &#91;x&#93; &#91;ep&#93;       &#91;+&#93; &#91;++&#93;     Prom     Cstl    Sec
 1&#58;          41          3    0         0    0        0        0   0.00
 2&#58;        2107        292    0         5    0        0        0   0.00
 3&#58;       93962       9434    0      1258    0      642      146   0.00
 4&#58;     4869569     732934    0     71559    0     9456     5375   0.07
 5&#58;   228645312   27763729  311   5362814    1  2629164   538292   3.38
 6&#58; 11962047524 1912281008 7217 278541908 3393 41484258 21162954 179.55
User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany

Re: color symmetric behaviour

Post by SMIRF »

Well, after an initial review of my new move generator it seems to be sufficient fast to continue with other parts of the appearing new engine. The current results now are of usable speed:

Code: Select all

XFEN 00&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
   +-*--b--c--d--*--f--g--*-+
 8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;k&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|  Compiled on Feb 15 2015
 7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |<P><P><P><P><P><P><P><P>|
 1 |<R><N><B><Q><K><B><N><R>|
&#40;w&#41;+-*--b--c--d--*--f--g--*-+

Ply      Moves   all &#91;x&#93;   &#91;ep&#93;  all &#91;+&#93; &#91;++&#93; Prom   Cstl   Sec
 1&#58;         20         0      0        0    0    0      0  0.00
 2&#58;        400         0      0        0    0    0      0  0.00
 3&#58;       8902        34      0       12    0    0      0  0.00
 4&#58;     197281      1576      0      469    0    0      0  0.00
 5&#58;    4865609     82719    258    27351    0    0      0  0.06
 6&#58;  119060324   2812008   5248   809099   46    0      0  1.59
 7&#58; 3195901860 108329926 319617 33103848 1628    0 883453 42.66


XFEN 01&#58; r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25
   +-*--b--c--d--*--f--g--*-+
 8 |&#91;r&#93;&#58;&#58;&#58;   &#58;&#58;&#58;&#91;k&#93;&#58;&#58;&#58;   &#91;r&#93;|  Compiled on Feb 15 2015
 7 |&#91;p&#93;   &#91;p&#93;&#91;p&#93;&#91;q&#93;&#91;p&#93;&#91;b&#93;   |  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |&#91;b&#93;&#91;n&#93;   &#58;&#58;&#58;&#91;p&#93;&#91;n&#93;&#91;p&#93;&#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#91;p&#93;   &#58;&#58;&#58;<P>&#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   <N>   &#58;&#58;&#58;<Q>&#58;&#58;&#58;&#91;p&#93;|
 2 |<P><P><P><B><B><P><P><P>|
 1 |<R>   &#58;&#58;&#58;   <K>   &#58;&#58;&#58;<R>|
&#40;w&#41;+-*--b--c--d--*--f--g--*-+

Ply      Moves    all &#91;x&#93;    &#91;ep&#93;  all &#91;+&#93;  &#91;++&#93;     Prom      Cstl    Sec
 1&#58;         48          8       0        0     0        0         2   0.00
 2&#58;       2039        351       1        3     0        0        91   0.00
 3&#58;      97862      17102      45      993     0        0      3162   0.00
 4&#58;    4085603     757163    1929    25523     6    15172    128013   0.06
 5&#58;  193690690   35043416   73365  3309887  2645     8392   4993637   2.50
 6&#58; 8031647685 1558445089 3577504 92238050 55014 56627920 184513607 108.62


XFEN 02&#58; 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
   +-a--b--c--d--e--f--g--h-+
 8 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|  Compiled on Feb 15 2015
 7 |<P><P><P>   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;k&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |   &#58;&#58;&#58;   &#58;&#58;&#58;<K>&#91;p&#93;&#91;p&#93;&#91;p&#93;|
 1 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
&#40;w&#41;+-a--b--c--d--e--f--g--h-+

Ply     Moves  all &#91;x&#93; &#91;ep&#93;  all &#91;+&#93;   &#91;++&#93;      Prom Cstl   Sec
 1&#58;        18        1    0        0      0        12    0  0.00
 2&#58;       290        0    0       52      0       212    0  0.00
 3&#58;      5044      144    0      310      0      2232    0  0.00
 4&#58;     89363      194    0    15360    106     42120    0  0.00
 5&#58;   1745545    46745    0   161249    246    544556    0  0.03
 6&#58;  34336777   406616    0  6021556  58370  10977688    0  0.57
 7&#58; 749660761 22632801    0 87618216 114543 165649936    0 12.68

-----

XFEN 07&#58; rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
   +-*--b--c--d--e--*--g--h--i--*-+
 8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;c&#93;&#91;k&#93;&#91;a&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|  Compiled on Feb 15 2015
 7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
 2 |<P><P><P><P><P><P><P><P><P><P>|
 1 |<R><N><B><Q><C><K><A><B><N><R>|
&#40;w&#41;+-*--b--c--d--e--*--g--h--i--*-+

Ply      Moves  all &#91;x&#93;  &#91;ep&#93;  all &#91;+&#93; &#91;++&#93; Prom Cstl   Sec
 1&#58;         28        0     0        0    0    0    0  0.00
 2&#58;        784        0     0        0    0    0    0  0.00
 3&#58;      25283      387     0      120    0    0    0  0.00
 4&#58;     808984    14812     0     4019    0    0    0  0.01
 5&#58;   28946187   907953   468   304360    0    0    0  0.34
 6&#58; 1025229212 36740962 14017 11052055  118    0    0 12.26


XFEN 08&#58; r1b1c2rk1/p4a1ppp/1ppq2pn2/3p1p4/3A1Pn3/1PN3PN2/P1PQP1BPPP/3RC2RK1 w - - 0 15
   +-a--b--c--d--e--f--g--h--i--j-+
 8 |&#91;r&#93;&#58;&#58;&#58;&#91;b&#93;&#58;&#58;&#58;&#91;c&#93;&#58;&#58;&#58;   &#91;r&#93;&#91;k&#93;&#58;&#58;&#58;|  Compiled on Feb 15 2015
 7 |&#91;p&#93;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;a&#93;&#58;&#58;&#58;&#91;p&#93;&#91;p&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |   &#91;p&#93;&#91;p&#93;&#91;q&#93;   &#58;&#58;&#58;&#91;p&#93;&#91;n&#93;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#58;&#58;&#58;   <A>   <P>&#91;n&#93;&#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   <P><N>&#58;&#58;&#58;   |
 2 |<P>&#58;&#58;&#58;<P><Q><P>&#58;&#58;&#58;<B><P><P><P>|
 1 |&#58;&#58;&#58;   &#58;&#58;&#58;<R><C>   &#58;&#58;&#58;<R><K>   |
&#40;w&#41;+-a--b--c--d--e--f--g--h--i--j-+

Ply       Moves    all &#91;x&#93;  &#91;ep&#93;   all &#91;+&#93; &#91;++&#93; Prom Cstl    Sec
 1&#58;          50          6     0         1    0    0    0   0.00
 2&#58;        2801        191     0         2    0    0    0   0.00
 3&#58;      143032      18799     0      2215    0    0    0   0.00
 4&#58;     7917813     680548    12     45116    0    0    0   0.08
 5&#58;   412224167   56838308   161   5549854    8    0    0   4.26
 6&#58; 22846373778 2289332857 90607 218647805 9531    0    0 238.01


XFEN 09&#58; r1b2k2nr/p1ppq1ppbp/n1Pcpa2p1/5p4/5P4/1p1PBCPN2/PP1QP1BPPP/RN3KA2R w KQkq - 6 12
   +-*--b--c--d--e--*--g--h--i--*-+
 8 |&#91;r&#93;&#58;&#58;&#58;&#91;b&#93;&#58;&#58;&#58;   &#91;k&#93;   &#58;&#58;&#58;&#91;n&#93;&#91;r&#93;|  Compiled on Feb 15 2015
 7 |&#91;p&#93;   &#91;p&#93;&#91;p&#93;&#91;q&#93;   &#91;p&#93;&#91;p&#93;&#91;b&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |&#91;n&#93;&#58;&#58;&#58;<P>&#91;c&#93;&#91;p&#93;&#91;a&#93;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run without any caching&#41;
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   <P>   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;&#91;p&#93;&#58;&#58;&#58;<P><B><C><P><N>&#58;&#58;&#58;   |
 2 |<P><P>   <Q><P>&#58;&#58;&#58;<B><P><P><P>|
 1 |<R><N>&#58;&#58;&#58;   &#58;&#58;&#58;<K><A>   &#58;&#58;&#58;<R>|
&#40;w&#41;+-*--b--c--d--e--*--g--h--i--*-+

Ply       Moves    all &#91;x&#93; &#91;ep&#93;   all &#91;+&#93; &#91;++&#93;     Prom     Cstl    Sec
 1&#58;          41          3    0         0    0        0        0   0.00
 2&#58;        2107        292    0         5    0        0        0   0.00
 3&#58;       93962       9434    0      1258    0      642      146   0.00
 4&#58;     4869569     732934    0     71559    0     9456     5375   0.06
 5&#58;   228645312   27763729  311   5362814    1  2629164   538292   2.84
 6&#58; 11962047524 1912281008 7217 278541908 3393 41484258 21162954 148.56
User avatar
SMIRF
Posts: 91
Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany

Re: color symmetric behaviour

Post by SMIRF »

Now a colorless symmetric hash code for positions has been established within my slowly growing new 8x8 and 10x8 chess program. For the purpose of verification of the digital fingerprints prepresenting each single position there a modified perft has been run, which seperates interesting move types. The received results seem to match known move statistic data.

Code: Select all

FEN 00&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
  +-*--b--c--d--*--f--g--*-+
8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;k&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|  Compiled on Feb 19 2015
7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  Break, when time >= 120.0 sec
4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run with 4-fold TT hashing&#41;
2 |<P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><K><B><N><R>|
w&#41;+-*--b--c--d--*--f--g--*-+

ly         Moves      all &#91;x&#93;      &#91;ep&#93;     all &#91;+&#93;    &#91;++&#93;     Prom       Cstl     Sec
1&#58;            20            0         0           0       0        0          0    0.00
2&#58;           400            0         0           0       0        0          0    0.00
3&#58;          8902           34         0          12       0        0          0    0.00
4&#58;        197281         1576         0         469       0        0          0    0.01
5&#58;       4865609        82719       258       27351       0        0          0    0.07
6&#58;     119060324      2812008      5248      809099      46        0          0    0.53
7&#58;    3195901860    108329926    319617    33103848    1628        0     883453    6.36
8&#58;   84998978956   3523740106   7187977   968981593  147215        0   23605205   90.45
9&#58; 2439530234167 125208536153 319496827 36095901903 6315946 17334376 1784356000 1595.94


XFEN 07&#58; rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
   +-*--b--c--d--e--*--g--h--i--*-+
 8 |&#91;r&#93;&#91;n&#93;&#91;b&#93;&#91;q&#93;&#91;c&#93;&#91;k&#93;&#91;a&#93;&#91;b&#93;&#91;n&#93;&#91;r&#93;|  Compiled on Feb 19 2015
 7 |&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;&#91;p&#93;|  MS Vis.Studio C/C++ 64-Bit Vers. 18.0
 6 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 5 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  Break, when time >= 120.0 sec
 4 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;|
 3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |  &#40;run with 4-fold TT hashing&#41;
 2 |<P><P><P><P><P><P><P><P><P><P>|
 1 |<R><N><B><Q><C><K><A><B><N><R>|
&#40;w&#41;+-*--b--c--d--e--*--g--h--i--*-+

Ply         Moves     all &#91;x&#93;     &#91;ep&#93;     all &#91;+&#93;    &#91;++&#93; Prom  Cstl     Sec
 1&#58;            28           0        0           0       0    0     0    0.00
 2&#58;           784           0        0           0       0    0     0    0.00
 3&#58;         25283         387        0         120       0    0     0    0.00
 4&#58;        808984       14812        0        4019       0    0     0    0.01
 5&#58;      28946187      907953      468      304360       0    0     0    0.18
 6&#58;    1025229212    36740962    14017    11052055     118    0     0    3.28
 7&#58;   39532257395  1838308392  1216940   621202264   34167    0   120   57.17
 8&#58; 1509030960338 77751323944 40690636 24192949031 2244996    0 28882 1454.29