Stress test for hashtable, checkmates, node counting.

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Stress test for hashtable, checkmates, node counting.

Post by michiguel »

Searching for posts in move ordering last week, I saw someone used the following position in a completely unrelated thread:

[D]8/8/8/8/3k4/8/8/4K2R w - - 0 1

White should see a checkmate in a reasonable time and find shorter mates as search progresses.

I thought that it would be a good idea to confirm that my hashtable will take a beating, as well as my checkmate score system (in fact, I always used since I started in 2000 a system that resembles very much to what it was discussed in that thread by HG Muller). I do not have a link to it right now (I will try to post find it again).

Without a working hashtable, I do not think this is solvable. See that mate in 19 is found a ply 18! The reason I wanted to test this deserves another thread, my hashtable apparently was fine but I found a problem that the hashtable amplified it.

I did this test on my engine Gaviota on a Pentium 1.86 Ggz with 256 Mb of hash memory, and of course no endgame tablebases. I am glad to see that the checkmates are progressing nicely from mate in 19 to mate in 13, which is the correct solution. In less than 3 minutes it finds mate in 19, and it takes 6 hours (21884.8 seconds) to see mate in 13. Since I let it go over the weekend, at 35 hours reached ply 25 and stopped, because no mate under 13 can be found (which is correct). What I see though, is that the counter for nodes is overflowed and 32 bits are not enough anymore. Not a catastrophe, but I do not like it and I should change it.

How does your favorite engine do here?

Code: Select all

setboard 8/8/8/8/3k4/8/8/4K2R w - - 0 1
d
+-----------------+
| . . . . . . . . |
| . . . . . . . . |
| . . . . . . . . |
| . . . . . . . . |    Castling:
| . . . k . . . . |    ep: -
| . . . . . . . . |
| . . . . . . . . |
| . . . . K . . R | [White]
+-----------------+

analyze

[deleted short iterations]

    444797  11       1.0    +3.56  Ke1-d2   Kd4-e4   Rh1-h4   Ke4-d5
                                   Kd2-e3   Kd5-c5   Rh4-h5   Kc5-d6
                                   Ke3-d4   Kd6-e6   Rh5-d5   Ke6-f6
                                   Rd5-c5
    643039  11       1.4    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-b4   Ke3-d4   Kb4-b3
    657896  11:      1.4    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-b4   Ke3-d4   Kb4-b3
    756463  12       1.6    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-c4   Ke3-e4   Kc4-b3
                                   Rd5-c5
   1013563  12:      2.1    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-c4   Ke3-e4   Kc4-b3
                                   Rd5-c5
   1189765  13       2.5    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-c4   Ke3-e4   Kc4-b3
                                   Ke4-d4   Kb3-a3
   1771051  13:      3.6    +3.56  Ke1-e2   Kd4-e4   Rh1-h5   Ke4-d4
                                   Ke2-f3   Kd4-d3   Rh5-d5   Kd3-c3
                                   Kf3-e3   Kc3-c4   Ke3-e4   Kc4-b3
                                   Ke4-d4   Kb3-a3
   2266965  14       4.6    +3.57  Ke1-e2   Kd4-e4   Rh1-h4   Ke4-d5
                                   Ke2-d3   Kd5-e6   Rh4-h5   Ke6-f6
                                   Kd3-e4   Kf6-f7   Ke4-e5   Kf7-g7
                                   Rh5-h4   Kg7-g6   Rh4-g4   Kg6-h5
   3172445  14:      6.4    +3.57  Ke1-e2   Kd4-e4   Rh1-h4   Ke4-d5
                                   Ke2-d3   Kd5-e6   Rh4-h5   Ke6-f6
                                   Kd3-e4   Kf6-f7   Ke4-e5   Kf7-g7
                                   Rh5-h4   Kg7-g6   Rh4-g4   Kg6-h5
   3855150  15       7.7    +3.57  Ke1-e2   Kd4-e4   Rh1-h4   Ke4-d5
                                   Ke2-d3   Kd5-e6   Rh4-h5   Ke6-f6
                                   Kd3-e4   Kf6-e6   Rh5-h6   Ke6-f7
                                   Rh6-d6   Kf7-e7   Rd6-d5   Ke7-e8
                                   Ke4-d4
   5636330  15      11.2    +3.57  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f6   Kf2-f3   Kf6-f5
                                   Re1-e3   Kf5-f6   Kf3-g4   Kf6-f7
                                   Kg4-g5   Kf7-g7   Re3-e7   Kg7-f8
   5807032  15:     11.5    +3.57  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f6   Kf2-f3   Kf6-f5
                                   Re1-e3   Kf5-f6   Kf3-g4   Kf6-f7
                                   Kg4-g5   Kf7-g7   Re3-e7   Kg7-f8
   8374991  16      16.9    +3.58  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f6   Kf2-f3   Kf6-f5
                                   Re1-e2   Kf5-g5   Re2-e5   Kg5-f6
                                   <-transp
  10568671  16&#58;     21.1    +3.58  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f6   Kf2-f3   Kf6-f5
                                   Re1-e2   Kf5-g5   Re2-e5   Kg5-f6
                                   <-transp
  13461671  17      26.8    +3.59  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Kf2-f3   Kf5-e5   Rd1-d2   Ke5-e6
                                   Kf3-f4   Ke6-f7   Rd2-e2   Kf7-g6
                                   Re2-e6   Kg6-g7   Kf4-g5   Kg7-f7
                                   Re6-e3   Kf7-g7
  18256299  17&#58;     35.9    +3.59  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Kf2-f3   Kf5-e5   Rd1-d2   Ke5-e6
                                   Kf3-f4   Ke6-f7   Rd2-e2   Kf7-g6
                                   Re2-e6   Kg6-g7   Kf4-g5   Kg7-f7
                                   Re6-e3   Kf7-g7
  19150870  18      37.7      &#58;-)  Ke1-f2
  71700881  18     158.1  +Mat_19  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f4   Re1-e3   Kf4-g4
                                   Re3-f3   Kg4-g5   Kf2-g3   Kg5-g6
                                   Kg3-g4   Kg6-h7   Rf3-f7   Kh7-g6
                                   Rf7-e7   Kg6-f6   Re7-e2   Kf6-g6
                                   <-transp
 356106348  18&#58;    844.5  +Mat_19  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Rd1-e1   Kf5-f4   Re1-e3   Kf4-g4
                                   Re3-f3   Kg4-g5   Kf2-g3   Kg5-g6
                                   Kg3-g4   Kg6-h7   Rf3-f7   Kh7-g6
                                   Rf7-e7   Kg6-f6   Re7-e2   Kf6-g6
                                   <-transp
 884211079  19    2275.8  +Mat_19  Ke1-f2   Kd4-c5   Rh1-h5   Kc5-c6
                                   Kf2-f3   Kc6-b6   Kf3-e4   Kb6-c6
                                   Ke4-d4   Kc6-d6   Rh5-d5   Kd6-e6
                                   Kd4-e4   Ke6-f6   Ke4-f4   Kf6-e6
                                   Rd5-d1   Ke6-f6   <-transp
1042648584  19    2699.1  +Mat_18  Ke1-d2   Kd4-e4   Rh1-h4   Ke4-e5
                                   Kd2-d3   Ke5-d6   Rh4-d4   Kd6-e5
                                   Kd3-e3   Ke5-f5   Rd4-e4   Kf5-g5
                                   Re4-e5   Kg5-g6   Ke3-f4   Kg6-f6
                                   Re5-e4   Kf6-g6   Re4-e6   Kg6-g7
                                   Kf4-g5   Kg7-h7   Kg5-f6   Kh7-h8
                                   <-transp
1132573694  19&#58;   2940.4  +Mat_18  Ke1-d2   Kd4-e4   Rh1-h4   Ke4-e5
                                   Kd2-d3   Ke5-d6   Rh4-d4   Kd6-e5
                                   Kd3-e3   Ke5-f5   Rd4-e4   Kf5-g5
                                   Re4-e5   Kg5-g6   Ke3-f4   Kg6-f6
                                   Re5-e4   Kf6-g6   Re4-e6   Kg6-g7
                                   Kf4-g5   Kg7-h7   Kg5-f6   Kh7-h8
                                   <-transp
1372306279  20    3618.8  +Mat_18  Ke1-d2   Kd4-e4   Rh1-h4   Ke4-e5
                                   Kd2-d3   Ke5-d6   Rh4-d4   Kd6-e5
                                   Kd3-e3   Ke5-f5   Rd4-e4   Kf5-g5
                                   Re4-e5   Kg5-g6   Ke3-f4   Kg6-f6
                                   Re5-e4   Kf6-g6   Re4-e6   Kg6-g7
                                   Kf4-g5   Kg7-h7   Kg5-f6   Kh7-h8
                                   <-transp
1595375852  20    4243.8  +Mat_17  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Kf2-e3   Kf5-e5   Ke3-f3   Ke5-f5
                                   Rd1-e1   Kf5-g5   Kf3-e4   Kg5-g6
                                   Ke4-f4   Kg6-f6   Kf4-g4   Kf6-g6
                                   Re1-e6   Kg6-g7   Kg4-g5   Kg7-h7
                                   Kg5-f6   Kh7-h8   <-transp
1721458120  20&#58;   4569.3  +Mat_17  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Kf2-e3   Kf5-e5   Ke3-f3   Ke5-f5
                                   Rd1-e1   Kf5-g5   Kf3-e4   Kg5-g6
                                   Ke4-f4   Kg6-f6   Kf4-g4   Kf6-g6
                                   Re1-e6   Kg6-g7   Kg4-g5   Kg7-h7
                                   Kg5-f6   Kh7-h8   <-transp
2120725316  21    5716.7  +Mat_17  Ke1-f2   Kd4-e4   Rh1-d1   Ke4-f5
                                   Kf2-e3   Kf5-e5   Ke3-f3   Ke5-f5
                                   Rd1-e1   Kf5-g5   Kf3-e4   Kg5-g6
                                   Ke4-f4   Kg6-f6   Kf4-g4   Kf6-g6
                                   Re1-e6   Kg6-g7   Kg4-g5   Kg7-h7
                                   Kg5-f6   Kh7-h8   <-transp
2739744196  21    7398.9  +Mat_16  Ke1-e2   Kd4-e5   Ke2-e3   Ke5-d5
                                   Rh1-d1   <-transp
2790699227  21&#58;   7526.4  +Mat_16  Ke1-e2   Kd4-e5   Ke2-e3   Ke5-d5
                                   Rh1-d1   <-transp
3006507371  22    8100.5  +Mat_15  Ke1-e2   Kd4-e5   Ke2-d3   Ke5-d5
                                   Rh1-e1   Kd5-c5   Re1-e5   Kc5-c6
                                   Kd3-c4   Kc6-d6   Re5-e4   Kd6-c6
                                   Re4-d4   Kc6-b6   Rd4-d6   Kb6-b7
                                   Kc4-d5   Kb7-c7   Kd5-c5   Kc7-b7
                                   Rd6-d7   Kb7-c8   Kc5-c6   Kc8-b8
                                   Rd7-d8   Kb8-a7   <-transp
4290869237  22&#58;  11650.7  +Mat_15  Ke1-e2   Kd4-e5   Ke2-d3   Ke5-d5
                                   Rh1-e1   Kd5-c5   Re1-e5   Kc5-c6
                                   Kd3-c4   Kc6-d6   Re5-e4   Kd6-c6
                                   Re4-d4   Kc6-b6   Rd4-d6   Kb6-b7
                                   Kc4-d5   Kb7-c7   Kd5-c5   Kc7-b7
                                   Rd6-d7   Kb7-c8   Kc5-c6   Kc8-b8
                                   Rd7-d8   Kb8-a7   <-transp
 532231690  23   13122.3  +Mat_15  Ke1-e2   Kd4-e5   Ke2-d3   Ke5-d5
                                   Rh1-e1   Kd5-c5   Re1-e5   Kc5-c6
                                   Kd3-c4   Kc6-d6   Re5-e4   Kd6-c6
                                   Re4-d4   Kc6-b6   Rd4-d6   Kb6-b7
                                   Kc4-d5   Kb7-c7   Kd5-c5   Kc7-b7
                                   Rd6-d7   Kb7-c8   Kc5-c6   Kc8-b8
                                   Rd7-d8   Kb8-a7   <-transp
3300095387  23   20804.8  +Mat_14  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e4   Kg2-g3
                                   Ke4-e3   Kg3-g2   Rf4-g4   Kg2-h3
                                   Ke3-f3   Kh3-h2   Rg4-h4   Kh2-g1
                                   Rh4-h5   Kg1-f1   Rh5-h1
3365723746  23&#58;  20952.0  +Mat_14  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e4   Kg2-g3
                                   Ke4-e3   Kg3-g2   Rf4-g4   Kg2-h3
                                   Ke3-f3   Kh3-h2   Rg4-h4   Kh2-g1
                                   Rh4-h5   Kg1-f1   Rh5-h1
3771857860  24   21884.8  +Mat_13  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e2   Kg2-g3
                                   Rf4-d4   Kg3-g2   Rd4-d3   Kg2-h1
                                   Ke2-f2   Kh1-h2   Rd3-e3   Kh2-h1
                                   Re3-h3
3678476938  24&#58;  45674.7  +Mat_13  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e2   Kg2-g3
                                   Rf4-d4   Kg3-g2   Rd4-d3   Kg2-h1
                                   Ke2-f2   Kh1-h2   Rd3-e3   Kh2-h1
                                   Re3-h3
 493342729  25   48272.8  +Mat_13  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e2   Kg2-g3
                                   Rf4-d4   Kg3-g2   Rd4-d3   Kg2-h1
                                   Ke2-f2   Kh1-h2   Rd3-e3   Kh2-h1
                                   Re3-h3
2513377439  25&#58; 126951.3  +Mat_13  Rh1-h5   Kd4-e4   Ke1-e2   Ke4-f4
                                   Ke2-d3   Kf4-g4   Rh5-b5   Kg4-f4
                                   Rb5-a5   Kf4-f3   Ra5-a4   Kf3-f2
                                   Ra4-f4   Kf2-g2   Kd3-e2   Kg2-g3
                                   Rf4-d4   Kg3-g2   Rd4-d3   Kg2-h1
                                   Ke2-f2   Kh1-h2   Rd3-e3   Kh2-h1
                                   Re3-h3

Ply&#58; 25
Rh1-h5  Kd4-e4  Ke1-e2  Ke4-f4  Ke2-d3  Kf4-g4  Rh5-b5  Kg4-f4
Rb5-a5  Kf4-f3  Ra5-a4  Kf3-f2  Ra4-f4  Kf2-g2  Kd3-e2  Kg2-g3
Rf4-d4  Kg3-g2  Rd4-d3  Kg2-h1  Ke2-f2  Kh1-h2  Rd3-e3  Kh2-h1
Re3-h3
Score&#58; 125.29 &#40;32075&#41;  Evals&#58; -317153458   Time&#58; 126951.3s   nps&#58; 19798  Q/all&#58;
0.00
Martin

Re: Stress test for hashtable, checkmates, node counting.

Post by Martin »

It turns out that this is a good test for winboard too, because it reveals a bug in winboard that I never noticed before.
Anatoli considered short castling at lower depths so I thought it had a bug, because there is no 'K' in the fen. But in the logfile I found that winboard had added it to the fen before passing it on to Anatoli: setboard 8/8/8/8/3k4/8/8/4K2R w K - 0 1 :shock:
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Stress test for hashtable, checkmates, node counting.

Post by michiguel »

Martin wrote:It turns out that this is a good test for winboard too, because it reveals a bug in winboard that I never noticed before.
Anatoli considered short castling at lower depths so I thought it had a bug, because there is no 'K' in the fen. But in the logfile I found that winboard had added it to the fen before passing it on to Anatoli: setboard 8/8/8/8/3k4/8/8/4K2R w K - 0 1 :shock:
Ouch! Amazing that nobody saw that before...
I did not see that because I did it on the terminal.

BTW, I took the position from this thread, in one of the last posts (page 4, from Karlo Bala).
http://www.talkchess.com/forum/viewtopi ... 84&start=0

Miguel
Martin

Re: Stress test for hashtable, checkmates, node counting.

Post by Martin »

Anatoli finds mate in 13 in approx 25 seconds on my machine (AMD 64 X2 4000+, 1 core) at depth 25.
That it immediately finds a shortest mate is luck, though. Usually if will find a longer mate first and then it will stop (unless it is pondering). It's a lazy engine and mate is mate and it doesn't bother to look for a shorter mate. :)

The hashtable seems OK in this test, although it doesn't have exact scores (maybe I will try to add them in the future, but I expect that it doesn't go well with the search tricks I use).
It also doesn't use different matescores. All mate scores are set to same value (much lower than mate in 1 but so high that other scores can't reach it) before they are stored in the HT.
Lazy! But it's simple and it works fine, that's enough for me for now. :)
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Stress test for hashtable, checkmates, node counting.

Post by michiguel »

Martin wrote:Anatoli finds mate in 13 in approx 25 seconds on my machine (AMD 64 X2 4000+, 1 core) at depth 25.
That it immediately finds a shortest mate is luck, though. Usually if will find a longer mate first and then it will stop (unless it is pondering). It's a lazy engine and mate is mate and it doesn't bother to look for a shorter mate. :)

The hashtable seems OK in this test, although it doesn't have exact scores (maybe I will try to add them in the future, but I expect that it doesn't go well with the search tricks I use).
It also doesn't use different matescores. All mate scores are set to same value (much lower than mate in 1 but so high that other scores can't reach it) before they are stored in the HT.
Lazy! But it's simple and it works fine, that's enough for me for now. :)
Impressive! Not just finding the mate, but reaching high depth so quick. I do not believe is luck because at depth 25 you are suppose to find mate in 13.

Storing mates as you do in the hashtable, is what Bruce Moreland suggested long time ago. It is a simple and very practical method.

Miguel
Martin

Re: Stress test for hashtable, checkmates, node counting.

Post by Martin »

michiguel wrote: Impressive! Not just finding the mate, but reaching high depth so quick. I do not believe is luck because at depth 25 you are suppose to find mate in 13.
Yes, it will always find it at depth 25 (or earlier), at least Anatoli will because it doesn't prune anything in such simple positions.
But it could have found a longer mate too at this depth with a few unnecessary checks in it, if both the checks and the moves out of check triggered extensions. So it was indeed luck, I think. :)
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stress test for hashtable, checkmates, node counting.

Post by hgm »

Code: Select all

tellics say     Joker 1.1.14 &#40;f&#41;
tellics say     Winboard version
tellics say     by H.G. Muller
tellics say     Hash size = 256MB

post
new
setboard 8/8/8/8/3k4/8/8/4K2R w - - 0 1
level 40 40 0
time 5000000
go
tell       - - - - - - - - - - - -
tell       - - - - - - - - - - - -
tell       - - . . . . . . . . - -
tell       - - . . . . . . . . - -
tell       - - . . . . . . . . - -
tell       - - . . . . . . . . - -
tell       - - . . . k . . . . - -
tell       - - . . . . . . . . - -
tell       - - . . . . . . . . - -
tell       - - . . . . K . . R - -
tell       - - - - - - - - - - - -
tell       - - - - - - - - - - - -

 1*     93        0          2  h1g1
 1*     99        0         14  e1f2
 1*    100        0         15  e1e2
 1     100        0         17  e1e2
 2*    100        0         24  e1e2 d4e5
 2     100        0         71  e1e2 d4e5
 3*     99        0        104  e1e2 d4e4 h1g1
 3*    100        1        381  e1d2 d4e4 d2c3
 3     100        1        394  e1d2 d4e4 d2c3
 4*    101        1        557  e1d2 d4e4 h1h4 e4e5 d2e3
 4     101        1       1316  e1d2 d4e4 h1h4 e4e5 d2e3
 5*    102        1       1874  e1d2 d4e4 d2c3 e4d5 h1e1 d5c5
 5     102        6       4195  e1d2 d4e4 d2c3 e4d5 h1e1 d5c5
 6*    104        6       5991  e1d2 d4e4 h1h4 e4f5 d2e3 f5e5 h4h5 e5d6
 6     104        8      10780  e1d2 d4e4 h1h4 e4f5 d2e3 f5e5 h4h5 e5d6
 7*    105        9      14836  e1d2 d4e4 h1h4 e4d5 d2e3 d5c5 e3e4 c5c4
 7     105       13      25856  e1d2 d4e4 h1h4 e4d5 d2e3 d5c5 e3e4 c5c4
 8*    106       16      34523  e1d2 d4e4 h1h4 e4d5 d2e3 d5e5 h4h5 e5d6 e3e4
 8     106       27      53293  e1d2 d4e4 h1h4 e4d5 d2e3 d5e5 h4h5 e5d6 e3e4
 9*    107       38      74291  e1d2 d4e4 h1h4 e4e5 d2e3 e5f5 h4e4 f5g5 e4e5 g5f6
                                e3d4
 9     107       58     102511  e1d2 d4e4 h1h4 e4e5 d2e3 e5f5 h4e4 f5g5 e4e5 g5f6
                                e3d4
10*    107       79     137030  e1d2 d4e4 h1h4 e4d5 d2e3 d5c5 e3e4 c5c4 e4e5 c4c5
                                h4g4 c5b5
10*    107       91     147202  e1e2 d4e4 h1h5 e4d4 e2f3 d4c3 f3e4 c3c4 h5g5 c4c3
10     107      118     188988  e1e2 d4e4 h1h5 e4d4 e2f3 d4c3 f3e4 c3c4 h5g5 c4c3
11*    108      145     234524  e1e2 d4e4 h1h5 e4d4
11     108      179     298792  e1e2 d4e4 h1h5 e4d4
12*    108      217     379986  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5h4 d3c2 f3e3 c2b3
12     108      278     491399  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5h4 d3c2 f3e3 c2b3
13*    109      344     619547  e1e2 d4e5 e2e3 e5d5 h1h5 d5e6 e3d4 e6f6 d4e4 f6e6
13*    110      413     741548  h1h5 d4d3 e1f2 d3e4 f2e2 e4d4 e2f3 d4d3 h5d5 d3c4
                                f3e4 c4c3 d5h5 c3c4 e4e3 c4b3
13     110      429     754978  h1h5 d4d3 e1f2 d3e4 f2e2 e4d4 e2f3 d4d3 h5d5 d3c4
                                f3e4 c4c3 d5h5 c3c4 e4e3 c4c3 e3e4 c3c4 e4e3 c4c3 e3e4
14*    110      457     803123  h1h5 d4d3 e1f2 d3e4 f2e2
14*    114      561    1009493  e1d2 d4e4 h1h4 e4e5 d2e3 e5d5 h4h5 d5e6 e3f4
                                e6d6 f4e4 d6c6 e4d4
14     114      614    1099995  e1d2 d4e4 h1h4 e4e5 d2e3 e5d5 h4h5 d5e6 e3f4 e6d6
                                f4e4 d6c6 e4d4 c6d6
15*    114      697    1255571  e1d2 d4e4 h1h4 e4d5 d2e3 d5e5 h4h5 e5e6 e3f4
                                e6d6 f4e4 d6c6 e4d4
15*    114      747    1338899  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5d5 d3c4 f3e4 c4c3
                                d5c5 c3d2 c5c7 d2e1 c7c2 e1d1 c2h2
15     114      807    1441301  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5d5 d3c4 f3e4 c4c3
                                d5c5 c3d2 c5c7 d2e1 c7c2 e1d1 c2h2 d1e1 h2a2 e1d1 e4e3
16*    115      904    1646855  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5d5 d3c3 f3e3 c3c4
                                d5f5
16     115     1086    1966597  e1e2 d4e4 h1h5 e4d4 e2f3 d4d3 h5d5 d3c3 f3e3 c3c4
                                d5f5 c4c3 f5f4 c3c2
17*    142     1442    2678225  e1e2 d4e4 h1d1 e4f4 d1d4 f4f5 e2f3 f5e5 f3e3 e5f5
                                d4d5 f5f6 e3d4 f6f7 d4e5 f7g6 e5e6 g6h7 d5e5 h7g6 e5c5
17*    143     1630    3008740  e1d2 d4e4 d2c3 e4e5 h1e1 e5f6 c3d4 f6f5 e1f1 f5e6
                                f1f2 e6d6 f2f6 d6e7 f6h6
17     143     1763    3250041  e1d2 d4e4 d2c3 e4e5 h1e1 e5f6 c3d4 f6f5 e1f1 f5e6
                                f1f2 e6d6 f2f6 d6e7 f6h6 e7f7
18*  10017     2384    4412331  e1d2 d4e4 h1h4 e4f5 h4d4 f5f6 d2d3 f6f5 d4d5 f5f6 
                                d3e3 f6e6 e3e4 e6f6 d5d4 f6g5 d4d6 g5g4 d6d5
18*  10014     2431    4479177  h1h5 d4d3 h5h4 d3e3 h4a4 e3d3 e1d1 d3e3 d1c2
                                e3f2 c2d3 f2g1
18   10014     2591    4730099  h1h5 d4d3 h5h4 d3e3 h4a4 e3d3 e1d1 d3e3 d1c2
                                e3f2 c2d3 f2g1
19*  10014     3025    5572310  h1h5 d4c4 e1e2 c4d4 e2f3 d4d3 h5h4 d3d2 h4c4
                                d2d3 c4e4 d3d2 e4e3 d2c1 e3e2 c1b1 f3e3 b1c1 e3d4
19   10014     3339    6120124  h1h5 d4c4 e1e2 c4d4 e2f3 d4d3 h5h4 d3d2 h4c4
                                d2d3 c4e4 d3d2 e4e3 d2c1 e3e2 c1b1 f3e3 b1c1 e3d4 c1d1
20*  10013     4105    7681329  h1h5 d4e4 e1e2 e4d4 e2f3 d4d3 h5h4 d3d2 h4d4
                                d2c2 f3e2 c2c1
20   10013     4553    8460288  h1h5 d4e4 e1e2 e4d4 e2f3 d4d3 h5h4 d3d2 h4d4
                                d2c2 f3e2 c2c1
21*  10013     7078   13531798  h1h5 d4d3 h5h4 d3e3 h4a4 e3d3 e1f2 d3c3 f2e3
                                c3b3 a4e4 b3c2
21   10013     7833   14807085  h1h5 d4d3 h5h4 d3e3 e1d1 e3f3
22*  10012    10622   20431157  h1h5 d4d3 h5h4 d3e3 h4a4 e3d3 e1f2 d3c2 a4a3
                                c2b1 f2e1 b1c2
22   10012    11729   22201605  h1h5 d4d3 h5h4 d3e3 h4a4 e3d3 e1f2 d3c2 a4a3
                                c2b1 f2e1 b1c1
I tried this on a 1GHz Athlon XP with slow memory (no DDR); on my real computer (Core 2 Duo 2.4GHz) it would be approximately 3 times faster.

Joker finds the first mate score (mate-in-18) at 18 ply after 24 sec (4.4M nodes), there. (Note that 10017 means mate-in-18, as Joker reports the mating distance as it is after its move. I.e. a score of 10000 would mean it mated the opponent with this move.)

The mate-in-13 is found at 22 ply after 106 sec (20.4M nodes).
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stress test for hashtable, checkmates, node counting.

Post by hgm »

Martin wrote:It turns out that this is a good test for winboard too, because it reveals a bug in winboard that I never noticed before.
Anatoli considered short castling at lower depths so I thought it had a bug, because there is no 'K' in the fen. But in the logfile I found that winboard had added it to the fen before passing it on to Anatoli: setboard 8/8/8/8/3k4/8/8/4K2R w K - 0 1 :shock:
This is not so much a bug as a design choice: the 'official' WinBoard release (4.2.7) does not keep track of castling or e.p. rights, so to avoid iit refusing perfectly legal moves from engine or Human it assumes castling or e.p. capture is always possible. And this is what it also tells the engine after 'edit position'.

If you want a WinBoard that is 'castling aware', use WinBoard 4.3.12 ('WinBoard_F'), or, if you are adventurous, 4.3.13 (for which you can download the .exe as 'alpha.tst' on my website).
Martin

Re: Stress test for hashtable, checkmates, node counting.

Post by Martin »

hgm wrote: This is not so much a bug as a design choice: the 'official' WinBoard release (4.2.7) does not keep track of castling or e.p. rights, so to avoid iit refusing perfectly legal moves from engine or Human it assumes castling or e.p. capture is always possible. And this is what it also tells the engine after 'edit position'.

If you want a WinBoard that is 'castling aware', use WinBoard 4.3.12 ('WinBoard_F'), or, if you are adventurous, 4.3.13 (for which you can download the .exe as 'alpha.tst' on my website).
Aha, so it's a feature of 4.2.7, not a bug.
I will try 4.3.12 soon, or 4.3.13 when I'm in an adventurous mood. :D
Thanks!
Jouni
Posts: 3279
Joined: Wed Mar 08, 2006 8:15 pm

Re: Stress test for hashtable, checkmates, node counting.

Post by Jouni »

Chest is fast, only 4M nodes:

Mate in 13 found ! (1 Solution in 00:11)
13/13 00:11 4.266.804 367.005 +M13 1.Rh1h5 Kd4e4 2.Ke1e2 Ke4f4 3.Ke2d3 Kf4g4 4.Rh5e5 Kg4f4 5.Re5d5 Kf4f3 6.Rd5d4 Kf3f2 7.Rd4f4+ Kf2g2 8.Kd3e2 Kg2g3 9.Rf4e4 Kg3g2 10.Re4e3 Kg2g1 11.Ke2f3 Kg1h1 12.Kf3g3 Kh1g1 13.Re3e1+