Discussion of chess software programming and technical issues.
Moderators: hgm , Rebel , chrisw
SMIRF
Posts: 91 Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany
Post
by SMIRF » Mon Feb 02, 2015 4:11 pm
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 |::: <N> ::: :::[b]|
4 | ::: ::: :::[n]:::|
3 |::: ::: ::: ::: |
2 | ::: ::: <P> :::|
1 |<R> ::: <K> :::<R>|
(w)+-*--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: 2q7/10/2kP1a1c2/1pP4N1R/pB2K1p3/P2r1PN3/1b2P5/3B3C2 w - b6 0 1
(move count: 3)
+-a--b--c--d--e--f--g--h--i--j-+
8 | :::[q]::: ::: ::: :::|
7 |::: ::: ::: ::: ::: |
6 | :*:[k]<P> [a] [c] :::|
5 |:::[p]<P> ::: :::<N>:::<R>|
(+)|[p]<B> :::<K>:::[p]::: :::|
3 |<P> :::[r]:::<P><N> ::: |
2 | [b] :::<P>::: ::: :::|
1 |::: :::<B>::: :::<C>::: |
(w)+-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.
SMIRF
Posts: 91 Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany
Post
by SMIRF » Sun Feb 08, 2015 9:25 pm
Now there are some first perft results of the developing achromatic engine:
Code: Select all
XFEN 00: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
+-*--b--c--d--*--f--g--*-+
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>|
(w)+-*--b--c--d--*--f--g--*-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 20 0 0 0 0 0 0 0.00
2: 400 0 0 0 0 0 0 0.00
3: 8902 34 0 12 0 0 0 0.00
4: 197281 1576 0 469 0 0 0 0.00
5: 4865609 82719 258 27351 0 0 0 0.07
6: 119060324 2812008 5248 809099 46 0 0 1.76
7: 3195901860 108329926 319617 33103848 1628 0 883453 47.78
XFEN 01: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25
+-*--b--c--d--*--f--g--*-+
8 |[r]::: :::[k]::: [r]|
7 |[p] [p][p][q][p][b] |
6 |[b][n] :::[p][n][p]:::|
5 |::: :::<P><N> ::: |
4 | [p] :::<P>::: :::|
3 |::: <N> :::<Q>:::[p]|
2 |<P><P><P><B><B><P><P><P>|
1 |<R> ::: <K> :::<R>|
(w)+-*--b--c--d--*--f--g--*-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 48 8 0 0 0 0 2 0.00
2: 2039 351 1 3 0 0 91 0.00
3: 97862 17102 45 993 0 0 3162 0.00
4: 4085603 757163 1929 25523 6 15172 128013 0.06
5: 193690690 35043416 73365 3309887 2645 8392 4993637 2.83
6: 8031647685 1558445089 3577504 92238050 55014 56627920 184513607 123.88
XFEN 02: 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
+-a--b--c--d--e--f--g--h-+
8 | ::: ::: ::: :::|
7 |<P><P><P> ::: :::[k]|
6 | ::: ::: ::: :::|
5 |::: ::: ::: ::: |
4 | ::: ::: ::: :::|
3 |::: ::: ::: ::: |
2 | ::: :::<K>[p][p][p]|
1 |::: ::: ::: ::: |
(w)+-a--b--c--d--e--f--g--h-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 18 1 0 0 0 12 0 0.00
2: 290 0 0 52 0 212 0 0.00
3: 5044 144 0 310 0 2232 0 0.00
4: 89363 194 0 15360 106 42120 0 0.00
5: 1745545 46745 0 161249 246 544556 0 0.04
6: 34336777 406616 0 6021556 58370 10977688 0 0.61
7: 749660761 22632801 0 87618216 114543 165649936 0 14.68
8: 16303466487 337063298 0 2990354989 29875834 3731200972 0 290.84
SMIRF
Posts: 91 Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany
Post
by SMIRF » Sun Feb 08, 2015 9:45 pm
Of course there also are some 10x8 chess board perft results:
Code: Select all
XFEN 07: rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
+-*--b--c--d--e--*--g--h--i--*-+
8 |[r][n][b][q][c][k][a][b][n][r]|
7 |[p][p][p][p][p][p][p][p][p][p]|
6 | ::: ::: ::: ::: :::|
5 |::: ::: ::: ::: ::: |
4 | ::: ::: ::: ::: :::|
3 |::: ::: ::: ::: ::: |
2 |<P><P><P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><C><K><A><B><N><R>|
(w)+-*--b--c--d--e--*--g--h--i--*-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 28 0 0 0 0 0 0 0.00
2: 784 0 0 0 0 0 0 0.00
3: 25283 387 0 120 0 0 0 0.00
4: 808984 14812 0 4019 0 0 0 0.01
5: 28946187 907953 468 304360 0 0 0 0.39
6: 1025229212 36740962 14017 11052055 118 0 0 14.04
7: 39532257395 1838308392 1216940 621202264 34167 0 120 540.52
XFEN 08: r1b1c2rk1/p4a1ppp/1ppq2pn2/3p1p4/3A1Pn3/1PN3PN2/P1PQP1BPPP/3RC2RK1 w - - 0 15
+-a--b--c--d--e--f--g--h--i--j-+
8 |[r]:::[b]:::[c]::: [r][k]:::|
7 |[p] ::: :::[a]:::[p][p][p]|
6 | [p][p][q] :::[p][n] :::|
5 |::: :::[p]:::[p]::: ::: |
4 | ::: <A> <P>[n]::: :::|
3 |:::<P><N> ::: <P><N>::: |
2 |<P>:::<P><Q><P>:::<B><P><P><P>|
1 |::: :::<R><C> :::<R><K> |
(w)+-a--b--c--d--e--f--g--h--i--j-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 50 6 0 1 0 0 0 0.00
2: 2801 191 0 2 0 0 0 0.00
3: 143032 18799 0 2215 0 0 0 0.00
4: 7917813 680548 12 45116 0 0 0 0.09
5: 412224167 56838308 161 5549854 8 0 0 5.06
6: 22846373778 2289332857 90607 218647805 9531 0 0 264.81
XFEN 09: r1b2k2nr/p1ppq1ppbp/n1Pcpa2p1/5p4/5P4/1p1PBCPN2/PP1QP1BPPP/RN3KA2R w KQkq - 6 12
+-*--b--c--d--e--*--g--h--i--*-+
8 |[r]:::[b]::: [k] :::[n][r]|
7 |[p] [p][p][q] [p][p][b][p]|
6 |[n]:::<P>[c][p][a] :::[p]:::|
5 |::: ::: :::[p]::: ::: |
4 | ::: ::: <P> ::: :::|
3 |:::[p]:::<P><B><C><P><N>::: |
2 |<P><P> <Q><P>:::<B><P><P><P>|
1 |<R><N>::: :::<K><A> :::<R>|
(w)+-*--b--c--d--e--*--g--h--i--*-+
Ply Moves [x] [ep] [+] [++] Prom Cstl Sec
1: 41 3 0 0 0 0 0 0.00
2: 2107 292 0 5 0 0 0 0.00
3: 93962 9434 0 1258 0 642 146 0.00
4: 4869569 732934 0 71559 0 9456 5375 0.07
5: 228645312 27763729 311 5362814 1 2629164 538292 3.38
6: 11962047524 1912281008 7217 278541908 3393 41484258 21162954 179.55
SMIRF
Posts: 91 Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany
Post
by SMIRF » Sun Feb 15, 2015 10:29 pm
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: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
+-*--b--c--d--*--f--g--*-+
8 |[r][n][b][q][k][b][n][r]| Compiled on Feb 15 2015
7 |[p][p][p][p][p][p][p][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | ::: ::: ::: :::|
5 |::: ::: ::: ::: | (run without any caching)
4 | ::: ::: ::: :::|
3 |::: ::: ::: ::: |
2 |<P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><K><B><N><R>|
(w)+-*--b--c--d--*--f--g--*-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 20 0 0 0 0 0 0 0.00
2: 400 0 0 0 0 0 0 0.00
3: 8902 34 0 12 0 0 0 0.00
4: 197281 1576 0 469 0 0 0 0.00
5: 4865609 82719 258 27351 0 0 0 0.06
6: 119060324 2812008 5248 809099 46 0 0 1.59
7: 3195901860 108329926 319617 33103848 1628 0 883453 42.66
XFEN 01: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25
+-*--b--c--d--*--f--g--*-+
8 |[r]::: :::[k]::: [r]| Compiled on Feb 15 2015
7 |[p] [p][p][q][p][b] | MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 |[b][n] :::[p][n][p]:::|
5 |::: :::<P><N> ::: | (run without any caching)
4 | [p] :::<P>::: :::|
3 |::: <N> :::<Q>:::[p]|
2 |<P><P><P><B><B><P><P><P>|
1 |<R> ::: <K> :::<R>|
(w)+-*--b--c--d--*--f--g--*-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 48 8 0 0 0 0 2 0.00
2: 2039 351 1 3 0 0 91 0.00
3: 97862 17102 45 993 0 0 3162 0.00
4: 4085603 757163 1929 25523 6 15172 128013 0.06
5: 193690690 35043416 73365 3309887 2645 8392 4993637 2.50
6: 8031647685 1558445089 3577504 92238050 55014 56627920 184513607 108.62
XFEN 02: 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
+-a--b--c--d--e--f--g--h-+
8 | ::: ::: ::: :::| Compiled on Feb 15 2015
7 |<P><P><P> ::: :::[k]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | ::: ::: ::: :::|
5 |::: ::: ::: ::: | (run without any caching)
4 | ::: ::: ::: :::|
3 |::: ::: ::: ::: |
2 | ::: :::<K>[p][p][p]|
1 |::: ::: ::: ::: |
(w)+-a--b--c--d--e--f--g--h-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 18 1 0 0 0 12 0 0.00
2: 290 0 0 52 0 212 0 0.00
3: 5044 144 0 310 0 2232 0 0.00
4: 89363 194 0 15360 106 42120 0 0.00
5: 1745545 46745 0 161249 246 544556 0 0.03
6: 34336777 406616 0 6021556 58370 10977688 0 0.57
7: 749660761 22632801 0 87618216 114543 165649936 0 12.68
-----
XFEN 07: rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
+-*--b--c--d--e--*--g--h--i--*-+
8 |[r][n][b][q][c][k][a][b][n][r]| Compiled on Feb 15 2015
7 |[p][p][p][p][p][p][p][p][p][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | ::: ::: ::: ::: :::|
5 |::: ::: ::: ::: ::: | (run without any caching)
4 | ::: ::: ::: ::: :::|
3 |::: ::: ::: ::: ::: |
2 |<P><P><P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><C><K><A><B><N><R>|
(w)+-*--b--c--d--e--*--g--h--i--*-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 28 0 0 0 0 0 0 0.00
2: 784 0 0 0 0 0 0 0.00
3: 25283 387 0 120 0 0 0 0.00
4: 808984 14812 0 4019 0 0 0 0.01
5: 28946187 907953 468 304360 0 0 0 0.34
6: 1025229212 36740962 14017 11052055 118 0 0 12.26
XFEN 08: r1b1c2rk1/p4a1ppp/1ppq2pn2/3p1p4/3A1Pn3/1PN3PN2/P1PQP1BPPP/3RC2RK1 w - - 0 15
+-a--b--c--d--e--f--g--h--i--j-+
8 |[r]:::[b]:::[c]::: [r][k]:::| Compiled on Feb 15 2015
7 |[p] ::: :::[a]:::[p][p][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | [p][p][q] :::[p][n] :::|
5 |::: :::[p]:::[p]::: ::: | (run without any caching)
4 | ::: <A> <P>[n]::: :::|
3 |:::<P><N> ::: <P><N>::: |
2 |<P>:::<P><Q><P>:::<B><P><P><P>|
1 |::: :::<R><C> :::<R><K> |
(w)+-a--b--c--d--e--f--g--h--i--j-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 50 6 0 1 0 0 0 0.00
2: 2801 191 0 2 0 0 0 0.00
3: 143032 18799 0 2215 0 0 0 0.00
4: 7917813 680548 12 45116 0 0 0 0.08
5: 412224167 56838308 161 5549854 8 0 0 4.26
6: 22846373778 2289332857 90607 218647805 9531 0 0 238.01
XFEN 09: r1b2k2nr/p1ppq1ppbp/n1Pcpa2p1/5p4/5P4/1p1PBCPN2/PP1QP1BPPP/RN3KA2R w KQkq - 6 12
+-*--b--c--d--e--*--g--h--i--*-+
8 |[r]:::[b]::: [k] :::[n][r]| Compiled on Feb 15 2015
7 |[p] [p][p][q] [p][p][b][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 |[n]:::<P>[c][p][a] :::[p]:::|
5 |::: ::: :::[p]::: ::: | (run without any caching)
4 | ::: ::: <P> ::: :::|
3 |:::[p]:::<P><B><C><P><N>::: |
2 |<P><P> <Q><P>:::<B><P><P><P>|
1 |<R><N>::: :::<K><A> :::<R>|
(w)+-*--b--c--d--e--*--g--h--i--*-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 41 3 0 0 0 0 0 0.00
2: 2107 292 0 5 0 0 0 0.00
3: 93962 9434 0 1258 0 642 146 0.00
4: 4869569 732934 0 71559 0 9456 5375 0.06
5: 228645312 27763729 311 5362814 1 2629164 538292 2.84
6: 11962047524 1912281008 7217 278541908 3393 41484258 21162954 148.56
SMIRF
Posts: 91 Joined: Wed Mar 26, 2014 4:29 pm
Location: Buettelborn/Hessen/Germany
Post
by SMIRF » Thu Feb 19, 2015 9:52 am
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: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
+-*--b--c--d--*--f--g--*-+
8 |[r][n][b][q][k][b][n][r]| Compiled on Feb 19 2015
7 |[p][p][p][p][p][p][p][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | ::: ::: ::: :::|
5 |::: ::: ::: ::: | Break, when time >= 120.0 sec
4 | ::: ::: ::: :::|
3 |::: ::: ::: ::: | (run with 4-fold TT hashing)
2 |<P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><K><B><N><R>|
w)+-*--b--c--d--*--f--g--*-+
ly Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 20 0 0 0 0 0 0 0.00
2: 400 0 0 0 0 0 0 0.00
3: 8902 34 0 12 0 0 0 0.00
4: 197281 1576 0 469 0 0 0 0.01
5: 4865609 82719 258 27351 0 0 0 0.07
6: 119060324 2812008 5248 809099 46 0 0 0.53
7: 3195901860 108329926 319617 33103848 1628 0 883453 6.36
8: 84998978956 3523740106 7187977 968981593 147215 0 23605205 90.45
9: 2439530234167 125208536153 319496827 36095901903 6315946 17334376 1784356000 1595.94
XFEN 07: rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq - 0 1
+-*--b--c--d--e--*--g--h--i--*-+
8 |[r][n][b][q][c][k][a][b][n][r]| Compiled on Feb 19 2015
7 |[p][p][p][p][p][p][p][p][p][p]| MS Vis.Studio C/C++ 64-Bit Vers. 18.0
6 | ::: ::: ::: ::: :::|
5 |::: ::: ::: ::: ::: | Break, when time >= 120.0 sec
4 | ::: ::: ::: ::: :::|
3 |::: ::: ::: ::: ::: | (run with 4-fold TT hashing)
2 |<P><P><P><P><P><P><P><P><P><P>|
1 |<R><N><B><Q><C><K><A><B><N><R>|
(w)+-*--b--c--d--e--*--g--h--i--*-+
Ply Moves all [x] [ep] all [+] [++] Prom Cstl Sec
1: 28 0 0 0 0 0 0 0.00
2: 784 0 0 0 0 0 0 0.00
3: 25283 387 0 120 0 0 0 0.00
4: 808984 14812 0 4019 0 0 0 0.01
5: 28946187 907953 468 304360 0 0 0 0.18
6: 1025229212 36740962 14017 11052055 118 0 0 3.28
7: 39532257395 1838308392 1216940 621202264 34167 0 120 57.17
8: 1509030960338 77751323944 40690636 24192949031 2244996 0 28882 1454.29