Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> Endgame Test Suite
(Message started by: jdb on Nov 27th, 2011, 3:43pm)

Title: Endgame Test Suite
Post by jdb on Nov 27th, 2011, 3:43pm
I put together a test suite of 100 endgame test positions from the tablebases. The positions start out easy and get more difficult later. In all of the positions there is only one winning move. All other moves lose.

At 1 second per position clueless finds the correct move 49 times and sees the win in 17 positions.


Code:
# Created by jdb
# Nov 27 2011
#
# All of these positions have only one winning move
# All other moves lose the game
# The side to move is the colour of the first piece in the piece list
#
# Faster wins may be possible using repetition
#

# Won in 1

Position.001 = ra4 Ca1 Rc7
BestMove.001 = ra4s ra3e rb3s rb2s

Position.002 = Ca1 Rb1 re2
BestMove.002 = Ca1n Ca2e Cb2e Cc2e

Position.003 = ca1 rb3 Cb1 Rd7
BestMove.003 = rb3s ca1n rb2e rc2s

Position.004 = ca1 ra2 Cb1 Rd6
BestMove.004 = ra2e ca1n rb2e rc2s

Position.005 = cb1 rh5 Da1 Rb4
BestMove.005 = rh5s rh4s rh3s rh2s

# Won in 2

Position.006 = cd1 ra5 Da1 Rd6
BestMove.006 = cd1n cd2n cd3n cd4n

Position.007 = Da1 Rc4 cb1 rg5
BestMove.007 = Rc4e Rd4e Re4e Rf4e

Position.008 = Ca1 Rb1 ra2 rb5
BestMove.008 = Rb1n Rb2n Rb3n pass

Position.009 = ra5 rg6 Ca1 Rd4
BestMove.009 = ra5e rb5e rc5e rg6s

Position.010 = rc5 rd6 Ca1 Rd4
BestMove.010 = rc5e rd5e re5s re4e

# Won in 3

Position.011 = ra6 rc7 Ca1 Rc4
BestMove.011 = rc7e rd7s rd6s rd5s

Position.012 = Ca1 Rd2 rb3 re5
BestMove.012 = Rd2e Re2n Re3n Ca1n

Position.013 = Ca1 Rc4 re2 rd6
BestMove.013 = Ca1e Cb1e Cc1e Cd1n

Position.014 = ca1 rb6 Ce1 Ra6
BestMove.014 = ca1n ca2n ca3n ca4n

Position.015 = rc8 Ra2 Ca8
BestMove.015 = rc8s rc7e rd7s rd6s

# Won in 4

Position.016 = ca1 rb4 Cb2 Ra4
BestMove.016 = ca1n ca2n ca3e Ra4s

Position.017 = Da1 Rc1 cf2 rd5
BestMove.017 = Da1e Db1n Db2e Dc2e

Position.018 = cd4 rh8 Da1 Ra5
BestMove.018 = cd4w cc4w cb4n cb5n

Position.019 = ra6 rf7 ra8 Ca1 Rd4
BestMove.019 = ra6s ra5e rb5e rc5e

Position.020 = Ca1 Rd1 ra3 rb5 ra6
BestMove.020 = Rd1n Rd2n Rd3n Ca1n

# Won in 5

Position.021 = Ca1 Rb2 ra4 rb4 ra7
BestMove.021 = Ca1n Ca2n ra4n Ca3n

Position.022 = rc6 rc7 rc8 Cc1 Ra4
BestMove.022 = rc6s rc5w rb5w rc8w

Position.023 = cd2 rc8 Da1 Rb1
BestMove.023 = rc8s rc7e rd7s rd6s

Position.024 = Da1 Rc2 cg3 re5
BestMove.024 = Da1e Db1e Dc1e Dd1n

Position.025 = Da1 Ra3 cc1 rc4 ra6
BestMove.025 = Da1e Db1n Db2n Db3n

# Won in 6

Position.026 = Da1 Rb4 cg1 rd4 rb5
BestMove.026 = Da1e Db1e Dc1e Dd1n

Position.027 = cb2 ra7 rb8 Da1 Rd4
BestMove.027 = cb2n cb3n cb4e cc4n

Position.028 = rh7 rb8 rh8 Ce1 Ra4
BestMove.028 = rb8s rb7s rb6s rb5w

Position.029 = cf8 rh8 Db1 Rc5
BestMove.029 = cf8s cf7w ce7w cd7w

Position.030 = Da1 Rb1 cd4 rg7
BestMove.030 = Da1n Da2e Db2e Dc2e

# Won in 7

Position.031 = Dc1 Rd1 cc4 rh5
BestMove.031 = Rd1e Re1e Rf1e Rg1e

Position.032 = ce6 rg8 Da2 Rb5
BestMove.032 = ce6w cd6n cd7w cc7w

Position.033 = rd6 re7 rf8 Cd2 Ra3
BestMove.033 = rd6s rd5w rc5w rb5w

Position.034 = Cc1 Ra4 rg5 ra8 rh8
BestMove.034 = Cc1e Cd1e Ce1e Cf1n

Position.035 = cd3 rc7 rb8 Da1 Ra5
BestMove.035 = cd3n cd4w cc4w cb4n

# Won in 8

Position.036 = cg2 rc8 Ra1 Dh5
BestMove.036 = cg2w cf2w ce2w cd2w

Position.037 = cf1 rc8 Rb1 Df7
BestMove.037 = rc8w cf1w ce1w cd1w

Position.038 = cb1 rg6 ra7 Da1 Rd4
BestMove.038 = rg6s ra7e rb7e rc7e

Position.039 = Ce1 Rb3 ra2 ra7 rb8
BestMove.039 = Ce1w Cd1w Cc1w Cb1n

Position.040 = cd2 rc7 re8 Da1 Ra4
BestMove.040 = rc7w rb7w cd2n cd3n


# Won in 9

Position.041 = ca1 rc8 Rc4 Ce5
BestMove.041 = ca1e cb1n cb2n cb3n

Position.042 = Rc1 Cg1 Ra3 ca1 rb4
BestMove.042 = Rc1n Rc2w Rb2n Ra3n

Position.043 = ca1 rb8 Rc1 Ch1 Ra5
BestMove.043 = rb8w ca1n ca2n ca3n

Position.044 = ca2 ca4 rb7 Da1 Rd1
BestMove.044 = ca4e cb4e cc4e cd4s

Position.045 = ch1 cd3 rb7 Da1 Rb1
BestMove.045 = rb7e rc7e rd7e cd3n

# Won in 10

Position.046 = cb2 cg4 ra8 Da1 Rb1
BestMove.046 = ra8e rb8e cb2n cb3n

Position.047 = Da1 Rd1 cb1 cd3 rb8
BestMove.047 = Da1n Da2e Db2e Dc2e

Position.048 = Da1 Rc2 ca3 re7 rh8
BestMove.048 = Rc2e Rd2n Rd3n Da1n

Position.049 = Rc1 Ca5 ca3 re8
BestMove.049 = Rc1e Rd1e Re1e Rf1e

Position.050 = ca1 re7 Rb2 Cd2 Ra3
BestMove.050 = re7e rf7e rg7e ca1n

# Won in 11

Position.051 = ca5 rh8 Rc1 Ch6
BestMove.051 = rh8w rg8w rf8w ca5e

Position.052 = cb1 rf8 Rc1 Rd1 Ce3
BestMove.052 = cb1n cb2e cc2e Rc1n

Position.053 = Ra1 Rb1 Cf1 cd1 rb4
BestMove.053 = Ra1n Rb1n Rb2n Cf1w

Position.054 = Ra1 Db1 re2 re7 cb8
BestMove.054 = Db1e Dc1e Dd1n pass

Position.055 = re7 rc8 ch8 Db1 Rd5
BestMove.055 = ch8w cg8w cf8w ce8w

# Won in 12

Position.056 = cg5 rc7 Rb2 Ce4
BestMove.056 = rc7w cg5w cf5w ce5w

Position.057 = ch5 rb7 Ca2 Rb2
BestMove.057 = ch5w cg5w cf5w ce5w

Position.058 = cg2 ca3 ra6 Da1 Ra5
BestMove.058 = ca3n ca4e Ra5s ra6s

Position.059 = Db1 Rc2 cb3 rg6 ra7
BestMove.059 = Rc2e Rd2n Rd3n Db1n

Position.060 = ra7 ra8 ch8 Da2 Rd2
BestMove.060 = ch8w cg8w cf8w ce8w

# Won in 13

Position.061 = rd5 rd7 cb8 Ra3 Dd6
BestMove.061 = cb8s cb7s pass

Position.062 = De1 Ra5 rd4 ca8 rb8
BestMove.062 = Ra5e Rb5e Rc5e De1n

Position.063 = Rd2 Ch4 cc4 re7
BestMove.063 = Ch4w Cg4w Cf4w Ce4w

Position.064 = Rc1 Ch2 Rd4 cd3 rb7
BestMove.064 = Rc1n Ch2w Cg2w Cf2w

Position.065 = ca3 re7 Rd2 Cd3
BestMove.065 = re7e ca3e cb3n cb4e

# Won in 14

Position.066 = ca6 rg7 Rc2 Ch4
BestMove.066 = rg7w rf7w ca6s ca5e

Position.067 = ca2 ch4 rb8 Da1 Rc1
BestMove.067 = rb8s rb7e rc7e rd7e

Position.068 = Dc2 Rd5 rd4 cd8 re8
BestMove.068 = Rd5e Re5e Rf5e Dc2e

Position.069 = Da1 Rd1 cb4 cf4 rc7
BestMove.069 = Da1e Db1e Dc1n pass

Position.070 = Rb1 Cc1 Dg1 da1 ra6
BestMove.070 = Cc1n Dg1w Df1w De1w

# Won in 15

Position.071 = Ra2 Ch2 Dh4 da1 rc8
BestMove.071 = Dh4w Dg4w Df4w De4w

Position.072 = db1 re8 Rd1 Cf2 Db4
BestMove.072 = re8w rd8w rc8w db1e

Position.073 = db1 rd8 Rd1 Cf2 Db4
BestMove.073 = rd8w rc8w db1e pass

Position.074 = cd3 cg5 rc7 Ra1 Dc1
BestMove.074 = rc7e cd3n cd4w cc4w

Position.075 = Da1 Rc1 ca2 cf4 rf8
BestMove.075 = Rc1e Rd1e Da1e Db1n

# Won in 16

Position.076 = Da1 Rb1 ch4 ce6 rh8
BestMove.076 = Da1n Da2e Db2e Dc2e

Position.077 = dc7 ra8 Ca1 Rd1 Dh7
BestMove.077 = ra8e dc7e dd7s dd6s

Position.078 = db6 rg8 Rd1 Ch2 Da7
BestMove.078 = db6s db5s db4s db3s

Position.079 = Rc2 Cc3 Dh3 dc1 ra8
BestMove.079 = Cc3n Dh3w Dg3n Dg4w

Position.080 = Ra1 De1 cg4 ca5 rh7
BestMove.080 = Ra1e Rb1e De1e Df1n

# Won in 17

Position.081 = Ra1 Df1 cc1 ce4 rc7
BestMove.081 = Df1w De1w Dd1n cc1e

Position.082 = cg5 cb7 rf8 Dd1 Rc2
BestMove.082 = rf8s rf7e rg7s cb7s

Position.083 = Rd1 Cb3 Dh6 de1 ra8
BestMove.083 = Dh6s Dh5s Dh4s Dh3w

Position.084 = Rd1 Cb2 Dg5 de1 ra8
BestMove.084 = Cb2n Dg5s Dg4s pass

Position.085 = Rc1 Cb2 Da7 dd1 re8
BestMove.085 = Cb2e Rc1w Rb1w Da7e

# Won in 18

Position.086 = Rd1 Ce1 Dh8 rg5 dh5
BestMove.086 = Ce1e Cf1e Cg1n Dh8s

Position.087 = ch5 rb7 cc8 Da2 Rb2
BestMove.087 = rb7e rc7e rd7e re7e

Position.088 = cg5 ch5 rh8 Dd1 Ra2
BestMove.088 = cg5w cf5w ch5w cg5w

Position.089 = Ra1 Db3 cg5 cb6 rg8
BestMove.089 = Ra1e Rb1e Db3n Db4e

Position.090 = Ra1 Dh1 ca4 rb7 ch7
BestMove.090 = Ra1e Dh1w Dg1w Df1w


# Won in 19

Position.091 = Rd1 Ce4 Dc8 rb5 db7
BestMove.091 = Ce4w Cd4w Cc4w Cb4s

Position.092 = Ra3 Dh3 cb2 ch6 ra7
BestMove.092 = Ra3n Dh3w Dg3n Dg4w

Position.093 = Rc1 Dh3 cd3 ch6 re7
BestMove.093 = Rc1w Rb1w Dh3w Dg3n

Position.094 = Ra1 Dh8 cb6 ce7 rb8
BestMove.094 = Dh8w Dg8w Df8w De8w

Position.095 = Rc1 Df8 cc5 cd6 ra8
BestMove.095 = Df8s Df7w De7s De6s

# Won in 20

Position.096 = Db1 Rd2 Cg7 da1 cc4 ra5
BestMove.096 = Rd2e Re2e Rf2e Db1n

# Won in 25

Position.097 = Db1 Ra2 Ce4 da1 ra7 cb7
BestMove.097 = Db1n Ra2n Ra3n Db2n

# Won in 30

Position.098 = Dd1 Ra2 Cb3 da1 cf5 ra8
BestMove.098 = Dd1w Dc1w Db1n Ra2n

# Won in 35

Position.099 = Ch1 Dd2 Rb3 da1 ce7 rd8
BestMove.099 = Rb3n Dd2w Dc2w Db2w

# Won in 40

Position.100 = Rc2 Cd4 Df4 dc1 cf1 rc7
BestMove.100 = Cd4s Df4w De4w pass

Title: Re: Endgame Test Suite
Post by rbarreira on Nov 27th, 2011, 4:05pm
Nice! I will definitely try those.


Quote:
At 1 second per position clueless finds the correct move 49 times and sees the win in 17 positions.  


What do you mean by seeing the win without finding the correct move?

edit - does it mean it finds a win which isn't the shortest?

Title: Re: Endgame Test Suite
Post by clyring on Nov 27th, 2011, 4:37pm
I think he means something more to the effect of 'knows that the winning move leaves no defense.'



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.