Thoughts on Move Generation
Posted: 16 Oct 2004, 06:56
Hi chess programmers,
to get a little bit distanced from Perft and basic move generating efficiency it would be good to talk on the way, legal moves would be generated in a more realistic environment than in Perft.
That would mean, e.g. to investigate how the move generating would look like, when been supported by move preevaluation and sorting. Under such circumstances Smirf is showing a wide range of efficiency, depending whether working within a check threat or not and whether depending check threats would be relevant or not.
So I will show here a bandwidth of Smirf's results at some examples (8x8 and 10x8, FRC/CRC):
Regards, Reinhard.
to get a little bit distanced from Perft and basic move generating efficiency it would be good to talk on the way, legal moves would be generated in a more realistic environment than in Perft.
That would mean, e.g. to investigate how the move generating would look like, when been supported by move preevaluation and sorting. Under such circumstances Smirf is showing a wide range of efficiency, depending whether working within a check threat or not and whether depending check threats would be relevant or not.
So I will show here a bandwidth of Smirf's results at some examples (8x8 and 10x8, FRC/CRC):
- Code: Select all
FEN: 6R1/B7/8/7N/2P2P2/3k4/KPQ5/8 b - - 0 1
=>+-a--b--c--d--e--f--g--h-+ MS Vis. Studio C++ Vers. 13.10
8 | ::: ::: :::<R>:::|
7 |<B> ::: ::: ::: | Testscenario (sorted):
6 | ::: ::: ::: :::| Move generation (check threat: 0xf0)
5 |::: ::: ::: :::<N>|
4 | :::<P>::: <P> :::| Test #: 05
3 |::: :::[k]::: ::: |
2 |<K><P><Q>::: ::: :::| Move Count: 1*750000
1 |::: ::: ::: ::: | per Second: 6000000
+-a--b--c--d--e--f--g--h-+ Time: 0.125 sec
8.258 Kd3xc2
FEN: 3q2R1/2P5/1k1B4/4np2/1NPK1Pr1/1R6/PP1N1Q2/3q2b1 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Vis. Studio C++ Vers. 13.10
8 | ::: [q] :::<R>:::|
7 |::: <P> ::: ::: | Testscenario (sorted):
6 | [k] <B> ::: :::| Move generation
5 |::: ::: [n][p]::: |
4 | <N><P><K> <P>[r]:::| Test #: 00
3 |:::<R>::: ::: ::: |
2 |<P><P> <N> <Q> :::| Move Count: 37*750000
1 |::: :::[q]::: [b] | per Second: 9155394
=>+-a--b--c--d--e--f--g--h-+ Time: 3.031 sec
15.58 c7xd8Q+ 11.92 c7xd8R 10.90 c7xd8B+ 10.04 c7xd8N 8.321 Rg8xd8
7.292 c7-c8Q 4.688 Rg8xg4 3.917 c7-c8R 3.232 Kd4xe5+ 2.709 Qf2xg1
2.417 c7-c8N+ 2.292 c7-c8B 0.809 Nb4-d5+ 0.601 Nb4-a6+ 0.601 Nb4-c6+
0.583 c4-c5+ 0.560 Kd4-d5+ 0.466 Kd4-c3+ 0.338 Nb4-d3+ 0.286 Nb4-c2+
0.191 a2-a4 0.180 Rg8-e8 0.143 Qf2-e3 0.097 a2-a3 0.092 Rg8-f8
0.039 Rg8-g6 0.029 Rg8-g7 0.029 Rg8-g5 -0.016 Rb3-a3 -0.016 Rb3-c3
-0.061 Rb3-d3 -0.095 Rg8-h8 -0.126 Rb3-e3 -0.143 Kd4-e3 -0.202 Rb3-f3
-0.286 Rb3-g3 -0.375 Rb3-h3
FEN: 8/8/8/4B2b/6nN/8/5P2/2R1K2k w Q - 0 1
+-a--b--c--d--e--f--g--h-+ MS Vis. Studio C++ Vers. 13.10
8 | ::: ::: ::: :::|
7 |::: ::: ::: ::: | Testscenario (sorted):
6 | ::: ::: ::: :::| Move generation
5 |::: ::: <B> :::[b]|
4 | ::: ::: :::[n]<N>| Test #: 16
3 |::: ::: ::: ::: |
2 | ::: ::: <P> :::| Move Count: 34*750000
1 |::: <R> <K> :::[k]| per Second: 13949671
=>+-a--b--*--d--*--f--g--h-+ Time: 1.828 sec
88.40 O-O-O# 87.98 Ke1-e2# 87.89 Ke1-d2# 0.404 Be5-h2 0.279 Be5-g3
0.160 Nh4-g2 0.141 Be5-f4 0.101 Ke1-f1 0.101 Rc1-d1 0.017 Nh4-f3
0.000 Be5-d4 -0.010 Rc1-c2 -0.039 Be5-c3 -0.039 Rc1-c3 -0.039 Be5-f6
-0.060 f2-f3 -0.084 Rc1-c4 -0.101 Rc1-b1 -0.101 Ke1-d1 -0.109 Be5-b2
-0.109 Be5-g7 -0.138 f2-f4 -0.142 Be5-d6 -0.142 Rc1-c5 -0.149 Nh4-f5
-0.202 Be5-a1 -0.202 Rc1-a1 -0.202 Be5-h8 -0.209 Rc1-c6 -0.212 Nh4-g6
-0.284 Be5-c7 -0.284 Rc1-c7 -0.364 Rc1-c8 -0.426 Be5-b8
FEN: 3k4/8/8/2N4b/6n1/8/5P2/R3K2R w KQ - 0 1
+-a--b--c--d--e--f--g--h-+ MS Vis. Studio C++ Vers. 13.10
8 | ::: [k] ::: :::|
7 |::: ::: ::: ::: | Testscenario (sorted):
6 | ::: ::: ::: :::| Move generation
5 |::: <N> ::: :::[b]|
4 | ::: ::: :::[n]:::| Test #: 02
3 |::: ::: ::: ::: |
2 | ::: ::: <P> :::| Move Count: 32*750000
1 |<R> ::: <K> :::<R>| per Second: 14492753
=>+-*--b--c--d--*--f--g--*-+ Time: 1.656 sec
3.372 Rh1xh5 1.007 O-O-O+ 0.966 Ra1-a8+ 0.594 Nc5-b7+ 0.594 Nc5-e6+
0.562 Ra1-d1+ 0.479 O-O 0.450 Ra1-a7 0.405 Ra1-a6 0.341 Ra1-a5
0.264 Ra1-a4 0.243 Rh1-h4 0.218 Nc5-d7 0.187 f2-f4 0.180 Ra1-a3
0.168 Rh1-h3 0.108 Ke1-d2 0.100 Ke1-e2 0.095 f2-f3 0.092 Ra1-a2
0.086 Rh1-h2 0.079 Rh1-f1 0.055 Ra1-c1 0.045 Rh1-g1 0.034 Ra1-b1
0.007 Ke1-d1 -0.021 Ke1-f1 -0.045 Nc5-a6 -0.097 Nc5-e4 -0.186 Nc5-a4
-0.186 Nc5-d3 -0.224 Nc5-b3
FEN: rcbbkarnqn/pppppppppp/0/0/0/0/PPPPPPPPPP/RCBBKARNQN w KQkq - 0 1
+-*--b--c--d--*--f--*--h--i--j-+ MS Vis. Studio C++ Vers. 13.10
8 |[r][c][b][b][k][a][r][n][q][n]|
7 |[p][p][p][p][p][p][p][p][p][p]| Testscenario (sorted):
6 | ::: ::: ::: ::: :::| Move generation
5 |::: ::: ::: ::: ::: |
4 | ::: ::: ::: ::: :::| Test #: 19
3 |::: ::: ::: ::: ::: |
2 |<P><P><P><P><P><P><P><P><P><P>| Move Count: 27*750000
1 |<R><C><B><B><K><A><R><N><Q><N>| per Second: 19067796
=>+-*--b--c--d--*--f--*--h--i--j-+ Time: 1.062 sec
0.225 Nh1-g3 0.225 Cb1-c3 0.222 Nj1-i3 0.209 Af1-e3 0.202 e2-e4
0.198 f2-f4 0.198 d2-d4 0.187 g2-g4 0.187 c2-c4 0.173 b2-b4
0.173 h2-h4 0.170 Af1-g3 0.157 a2-a4 0.157 i2-i4 0.142 j2-j4
0.122 Cb1-a3 0.122 Nh1-i3 0.101 e2-e3 0.099 d2-d3 0.099 f2-f3
0.095 c2-c3 0.095 g2-g3 0.089 b2-b3 0.089 h2-h3 0.082 a2-a3
0.082 i2-i3 0.075 j2-j3
FEN: 8/p7/8/1P6/4B3/P6p/5K1k/8 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Vis. Studio C++ Vers. 13.10
8 | ::: ::: ::: :::|
7 |[p] ::: ::: ::: | Testscenario (sorted):
6 | ::: ::: ::: :::| Move generation
5 |:::<P>::: ::: ::: |
4 | ::: :::<B>::: :::| Test #: 04
3 |<P> ::: ::: :::[p]|
2 | ::: ::: <K> [k]| Move Count: 20*750000
1 |::: ::: ::: ::: | per Second: 24630541
=>+-a--b--c--d--e--f--g--h-+ Time: 0.609 sec
0.263 Be4-g2 0.263 Be4-h1 0.138 Be4-f3 -0.000 Be4-f5 -0.021 a3-a4
-0.024 Kf2-f3 -0.024 Kf2-f1 -0.051 b5-b6 -0.052 Be4-d3 -0.052 Be4-g6
-0.101 Kf2-e2 -0.117 Kf2-e3 -0.117 Kf2-e1 -0.141 Be4-c2 -0.141 Be4-d5
-0.141 Be4-h7 -0.250 Be4-b1 -0.283 Be4-c6 -0.425 Be4-b7 -0.567 Be4-a8
Regards, Reinhard.