TT test positions

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Dann Corbit
Posts: 8600
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: TT test positions

Post by Dann Corbit » Thu May 10, 2018 7:54 pm

Packing on one byte boundaries has a performance penalty.
Reordering with large, properly aligned things first can also help.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

User avatar
xr_a_y
Posts: 84
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: TT test positions

Post by xr_a_y » Fri May 11, 2018 4:55 am

Ok thanks.

Martin Hertz
Posts: 60
Joined: Wed Mar 14, 2012 8:43 pm

Re: TT test positions

Post by Martin Hertz » Fri May 18, 2018 1:32 pm

MOBMAT wrote:
Wed May 09, 2018 4:33 pm
I ran across this position:

Code: Select all

K7/P2k4/8/8/8/8/8/6N1 b
which provided a very interesting search output.
The position is a draw, but it took 80ply to find it on an engine i'm testing.

Code: Select all

  1          8    :00   -4.27  d7d6
  2         29    :00   -4.36  d7d6
  3        114    :00   -4.35  d7d6
  4        618    :00   -4.43  d7c7
  5        952    :00   -4.41  d7c7
  6       1908    :00   -4.48  d7c7
  7       2714    :00   -4.45  d7c7
  8       3808    :00   -4.48  d7c7
  9       5476    :00   -4.45  d7c7
 10       7538    :00   -4.50  d7c7
 11       9858    :00   -4.47  d7c7
 12      12536    :00   -4.48  d7c7
 13      17965    :00   -4.46  d7c7
 14      22443    :00   -4.50  d7c7
 15      29434    :00   -4.47  d7c7
 16      37155    :00   -4.50  d7c7
 17      48087    :00   -4.48  d7c7
 18      59625    :00   -4.49  d7c7
 19      73773    :00   -4.47  d7c7
 20      90104    :00   -4.48  d7c7
 21     109581    :00   -4.45  d7c7
 22     132387    :00   -4.49  d7c7
 23     155535    :00   -4.46  d7c7
 24     186480    :00   -4.48  d7c7
 25     216012    :00   -4.44  d7c7
 26     257852    :00   -4.50  d7c7
 27     294422    :00   -4.45  d7c7
 28     351075    :00   -4.48  d7c7
 29     398833    :00   -4.46  d7c7
 30     475491    :00   -4.49  d7c7
 31     533272    :00   -4.47  d7c7
 32     634504    :00   -4.48  d7c7
 33     702177    :00   -4.48  d7c7
 34     773322    :00   -4.45  d7c7
 35     913979    :00   -4.46  d7c7
 36    1067766    :00   -4.48  d7c7
 37    1158919    :00   -4.45  d7c7
 38    1346746    :00   -4.50  d7c7
 39    1444903    :00   -4.43  d7c7
 40    1544095    :00   -4.43  d7c7
 41    1789634    :00   -4.44  d7c7
 42    2056931    :00   -4.50  d7c7
 43    2176818    :00   -4.44  d7c7
 44    2488403    :00   -4.46  d7c7
 45    2617640    :00   -4.44  d7c7
 46    2982505    :00   -4.45  d7c7
 47    3120797    :00   -4.44  d7c7
 48    3260417    :01   -4.44  d7c7
 49    3710391    :01   -4.46  d7c7
 50    4188131    :01   -4.50  d7c7
 51    4341587    :01   -4.44  d7c7
 52    4496525    :01   -4.44  d7c7
 53    5053883    :01   -4.45  d7c7
 54    5638213    :01   -4.50  d7c7
 55    5803028    :01   -4.44  d7c7
 56    5967392    :01   -4.42  d7c7
 57    6134169    :01   -4.40  d7c7
 58    6832007    :01   -4.41  d7c7
 59    7623645    :02   -4.42  d7c7
 60    8424045    :02   -4.44  d7c7
 61    8612084    :02   -4.42  d7c7
 62    9481720    :02   -4.50  d7c7
 63    9671798    :02   -4.47  d7c7
 64    9864481    :02   -4.44  d7c7
 65   10058345    :02   -4.42  d7c7
 66   11039567    :02   -4.50  d7c7
 67   11262920    :02   -4.47  d7c7
 68   11463008    :03   -4.40  d7c7
 69   11664767    :03   -4.39  d7c7
 70   12778474    :03   -4.44  d7c7
 71   12985941    :03   -4.44  d7c7
 72   13193894    :03   -4.40  d7c7
 73   13403052    :03   -4.40  d7c7
 74   13615614    :03   -4.39  d7c7
 75   13831291    :03   -4.38  d7c7
 76   15166400    :03   -4.42  d7c7
 77   15387645    :03   -4.38  d7c7
 78   15607382    :04   -4.37  d7c7
 79   15828782    :04   -4.35  d7c7
 80   16051694    :04   +0.00  d7c7
 81   16275446    :04   +0.00  d7c7
 82   16502614    :04   +0.00  d7c7
 83   16729070    :04   +0.00  d7c7
 84   16957482    :04   +0.00  d7c7
 85   17187477    :04   +0.00  d7c7
 86   17418842    :04   +0.00  d7c7
 87   17651908    :04   +0.00  d7c7
 88   17886895    :04   +0.00  d7c7
 89   18123547    :04   +0.00  d7c7
 90   18361100    :04   +0.00  d7c7
 91   18599913    :04   +0.00  d7c7
 92   18840120    :04   +0.00  d7c7
 93   19082718    :04   +0.00  d7c7
 94   19325818    :05   +0.00  d7c7
 95   19570366    :05   +0.00  d7c7
 96   19815810    :05   +0.00  d7c7
 97   20062333    :05   +0.00  d7c7
 98   20309955    :05   +0.00  d7c7
 99   20558402    :05   +0.00  d7c7
100   20807741    :05   +0.00  d7c7
101   21057658    :05   +0.00  d7c7
102   21308024    :05   +0.00  d7c7
103   21558549    :05   +0.00  d7c7
104   21810201    :05   +0.00  d7c7
105   22060767    :05   +0.00  d7c7
106   22311484    :05   +0.00  d7c7
107   22562371    :05   +0.00  d7c7
108   22813457    :05   +0.00  d7c7
109   23064802    :06   +0.00  d7c7
110   23316217    :06   +0.00  d7c7
111   23567902    :06   +0.00  d7c7
112   23819658    :06   +0.00  d7c7
113   24071430    :06   +0.00  d7c7
114   24323425    :06   +0.00  d7c7
115   24576391    :06   +0.00  d7c7
116   24828175    :06   +0.00  d7c7
117   25080092    :06   +0.00  d7c7
118   25332083    :06   +0.00  d7c7
119   25584126    :06   +0.00  d7c7
120   25836231    :06   +0.00  d7c7
121   26088321    :06   +0.00  d7c7
122   26340797    :06   +0.00  d7c7
123   26593212    :06   +0.00  d7c7
124   26845697    :07   +0.00  d7c7
125   27098149    :07   +0.00  d7c7
126   27351559    :07   +0.00  d7c7
I've tested this position with some DOS programs and to my surprise M-Chess recognizes a draw already in depth 1.
The other programs show a losing score even at maximum depth.

User avatar
xr_a_y
Posts: 84
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: TT test positions

Post by xr_a_y » Sun May 20, 2018 4:55 pm

xr_a_y wrote:
Thu May 10, 2018 5:12 pm
you scores are similar to mine but you didn't let it search out to find the draw.
well that's the point, I cannot go deep because looking at too much nodes is too expensive, it would take hours ...
In Fine70, the point is to find the correct move (Kb1) after 20 ply or so. it is a win in 32 moves (64ply).
No problem to find the good move, Weini goes to depth 20 in less than a second on Fine#70, and see the pawn capture at ply 18.
But I see some engine output that goes to depth 45 or 50 and clearly see the mate score. Maybe using end game tables ... maybe not, I don't know.
But for Weini it is totally impossible to go to depth 40 on Fine#70, I think it has already looked at 10 000 000 000 nodes near depth 38 ...
How is your implemented? How big is the hash when ran the test? I ran the test with a 128Mb hash. Do you save and use the PV?
Weini uses a quite simple implementation with a bucket system (one entry is always replaced and the other replaced by depth). The transposition table itself is 512Mb and contains 8388608 entries (that means 16777216 transpositions) because the size of a transposition stored is 32 bytes.

Here is Fine#70 results (good move found in 0.4sec, but after depth 25 and above it takes ages to compute):

Code: Select all

1 52 10 2 0	a1b2 
1 52 10 6 0	a1b2 
2 61 10 23 2	a1b2 a7b6 
2 61 10 39 4	a1b2 a7b6 
3 61 10 90 7	a1b2 a7b6 b2c3 
3 61 10 116 10	a1b2 a7b6 b2c3 
4 123 10 193 14	a1b2 a7b6 b2c3 b6c7 
4 123 10 219 18	a1b2 a7b6 b2c3 b6c7 
5 68 10 382 25	a1b2 a7b6 b2c3 b6c7 c3d3 
5 68 10 422 39	a1b2 a7b6 b2c3 b6c7 c3d3 
6 128 10 652 60	a1b2 a7b6 b2c3 b6c7 c3d3 c7d7 
6 128 10 700 75	a1b2 a7b6 b2c3 b6c7 c3d3 c7d7 
7 62 10 1051 125	a1b2 a7b6 b2c3 b6c7 c3d3 c7d7 d3e3 
7 62 10 1109 155	a1b2 a7b6 b2c3 b6c7 c3d3 c7d7 d3e3 
8 134 10 1733 249	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 
8 134 10 1791 283	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 
9 134 10 3337 647	a1b2 a7b6 b2b3 b6a7 b3b2 a7b6 b2b3 b6a7 b3b2 
9 134 10 3401 684	a1b2 a7b6 b2b3 b6c7 b3c4 c7b6 c4b3 b6c7 b3c4 
10 134 10 4455 989	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4c3 b6c7 c3c4 c7b6 
10 134 10 4687 1090	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3c3 c7b6 
11 134 10 6694 1678	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3c3 b6c7 c3d3 c7b6 d3c3 
11 134 10 7128 1852	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3c3 b6c7 c3d3 c7b6 d3c3 
12 134 10 8173 2267	a1b2 a7b6 b2c3 b6c7 c3c4 c7d7 c4b5 d7e7 b5a5 e7f7 a5b4 f7f6 
12 134 10 8730 2510	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3e3 b6c7 e3d3 c7b6 d3e3 b6c7 
13 134 11 14822 4470	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3c4 b6a6 c4d3 a6b6 d3c4 b6a6 c4d3 
13 134 11 15529 4791	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3c4 b6a6 c4d3 a6b6 d3c4 b6a6 c4d3 
14 134 11 20007 6727	a1b2 a7b6 b2b3 b6c7 b3c4 c7d7 c4b5 d7e7 b5a5 e7f6 a5b4 f6f7 a4a5 f7f6 
14 134 11 21167 7273	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3e3 b6c7 e3d3 c7b6 d3e3 b6c7 e3d3 
15 134 12 30722 10674	a1b2 a7b6 b2c3 b6c7 c3c4 c7d7 c4b5 d7e7 b5a5 e7f6 a5b4 f6e7 a4a5 e7f6 b4c3 
15 134 12 32121 11418	a1b2 a7b6 b2c3 b6c7 c3d3 c7b6 d3e3 b6c7 e3d3 c7b6 d3e3 b6c7 e3d3 
16 134 14 47086 17036	a1b2 a7b6 b2c3 b6c7 c3d2 c7b6 d2c3 b6c7 c3d2 c7b6 d2c3 
16 134 14 48509 17742	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3e3 c7b6 e3f3 b6c7 f3e3 c7b6 e3f3 b6c7 
17 134 16 74849 27081	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3c3 c7b6 c3c4 b6a6 c4d3 a6b7 d3c2 b7c7 c2b3 
17 134 16 76243 27820	a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3e3 c7d7 e3d3 d7e7 d3e3 e7f6 e3d3 f6g6 d3e3 
18 134 30 254135 102133	a1b2 a7a8 b2b3 a8a7 b3c3 a7b7 c3c4 b7b6 c4b3 b6c7 b3c4 c7b6 c4b3 b6c7 b3c4 c7b6 
18 204 39 355807 140693	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3c3 c7b7 c3c4 b7c7 c4d3 c7b6 d3c4 b6a6 c4d3 a6b6 
18 204 39 355807 140711	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3c3 c7b7 c3c4 b7c7 c4d3 c7b6 d3c4 b6a6 c4d3 a6b6 
19 204 39 360756 143214	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3e3 c7d7 e3d3 d7c7 d3e3 c7d7 e3d3 d7c7 
19 204 42 390390 155488	a1b1 a7b7 b1c2 b7b8 c2b3 b8a7 b3c4 a7b6 c4d3 b6c7 d3c4 c7b6 c4d3 b6c7 d3c4 c7b6 
20 224 57 567340 219288	a1b1 a7b7 b1c1 b7c7 c1d1 c7d7 d1c2 d7c7 c2d3 c7b6 d3e3 b6c7 e3d3 c7b6 d3e3 b6c7 e3d3 
20 224 58 575819 223076	a1b1 a7b7 b1c2 b7b8 c2b3 b8a7 b3c3 a7b7 c3b3 b7c7 b3c4 c7b6 c4c3 b6b7 c3b3 b7c7 b3c4 c7b6 c4c3 b6b7 
21 235 78 809197 307066	a1b1 a7b7 b1c1 b7c7 c1d1 c7d7 d1d2 d7c8 d2d3 c8c7 d3e3 c7d7 e3d2 d7c8 d2d3 c8c7 d3e3 c7d7 e3d2 
21 235 79 822059 312717	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3e3 c7d7 e3d3 d7c7 d3e3 c7d7 e3d3 d7c7 
22 235 108 1178530 449698	a1b1 a7b7 b1c1 b7c7 c1d1 c7d7 d1d2 d7c8 d2d3 c8c7 d3e3 c7d7 e3d2 d7c8 d2d3 c8c7 d3e3 c7d7 e3d2 
22 235 184 2103374 781117	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3c3 c7b7 c3b3 b7c7 b3c4 c7b6 c4d3 b6c7 d3c3 c7b7 c3b3 b7c7 b3c4 c7b6 
23 224 297 3388429 1204337	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3c4 c7b6 c4d3 b6c7 d3c4 c7b6 c4d3 b6c7 
23 224 342 3790915 1293264	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3e3 c7d7 e3d2 d7c8 d2d3 c8c7 d3e3 c7d7 e3d2 d7c8 
24 233 897 10257242 3579346	a1b1 a7b7 b1c1 b7c7 c1d1 c7d7 d1e2 d7d8 e2d3 d8c7 d3c4 c7b6 c4d3 b6c7 d3c4 c7b6 c4d3 b6c7 
24 233 898 10269308 3585016	a1b1 a7b7 b1c1 b7c7 c1d1 c7d7 d1e2 d7d8 e2d3 d8c7 d3c4 c7b6 c4d3 b6c7 d3c4 c7b6 c4d3 b6c7 
25 290 1117 12537335 4469470	a1b1 a7b7 b1c1 b7c7 c1d2 c7c8 d2d3 c8c7 d3c3 c7b7 c3b3 b7c7 b3c4 c7b6 c4d3 b6c7 d3c3 c7b7 c3b3 b7c7 b3c4 c7b6 c4d3 b6c7 
25 290 1119 12551579 4475846	a1b1 a7b6 b1c2 b6b7 c2c3 b7b6 c3c4 b6a6 c4c3 a6b7 c3b3 b7c7 b3c4 c7b6 c4d3 b6c7 d3c3 c7b7 c3b3 b7c7 b3c4 c7b6 c4d3 b6c7 d3c3 
Wow, finally found it, the bug in my TT implementation was quite simple to fix but as always hard to found.

Code: Select all

+    // this is because, even if no bestmove is found > alpha, insert something in TT with score alpha ...
+    if ( isFirstMove ) bestMove = &*it;
The bug was : in non-root search, when no moves was > alpha, nothing was inserted in TT. Now, as it seems to be done in CPW, I insert first move with score alpha.

Result, Fine#70 is much much faster ! I am able to reach depth 38 in 2 minutes.

I'am starting a tournament to validate that ...

Post Reply