Depth anomaly in Asymptote

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Depth anomaly in Asymptote

Post by Guenther »

During a fast test tournament I noticed, after looking at some depth stats, that
Asymptote shows some strange depth output behaviour, always exactly in the
10 moves before the next move session e.g. move 31-40 / 71-80 etc in a tc with 40 move sessions.
It suddendly adds around 15-20 more plies to the depth output as before and after this.
(independent from Q exchange BTW)

I have not yet checked Asymptotes sources, but what could be a useful explanation
for artificially bumping the depth output in relation to a certain move number region (adapted to the tc)?

Below is one example, this happens in all games.
[Event "Test_20190715"]
[Site "RWBC Win7U-64 Q8200 2.33Ghz Nvidia GT 710"]
[Date "2019.07.16"]
[Round "10"]
[White "Asymptote_062-64"]
[Black "RodentIII_0287-64"]
[Result "0-1"]
[ECO "D20"]
[Opening "Queen's gambit accepted"]
[PlyCount "314"]
[TimeControl "40/40"]

1. d4 {book} d5 {book}
2. c4 {book} dxc4 {book}
3. e3 {book} c5 {book}
4. Bxc4 {+0.85/12 1.12} e6 {-0.52/13 0.97}
5. Nf3 {+0.48/12 1.70} Nc6 {-0.42/14 0.98}
6. Nc3 {+0.56/12 1.29} Nf6 {-0.41/15 0.97}
7. O-O {+0.48/12 1.73} cxd4 {-0.45/14 0.97}
8. exd4 {+0.57/14 2.32} Be7 {-0.45/15 0.99}
9. Be3 {+0.58/13 2.28} O-O {-0.43/15 0.99}
10. a3 {+0.59/12 1.30} Bd7 {-0.40/15 0.99}
11. Rc1 {+0.59/12 1.31} Ng4 {-0.44/15 1.00}
12. Bf4 {+0.84/12 1.07} Rc8 {-0.50/14 0.99}
13. Bd3 {+0.82/12 1.20} Nf6 {-0.39/15 0.99}
14. h3 {+0.78/11 1.60} a6 {-0.49/14 0.99}
15. Re1 {+0.68/11 1.26} Na5 {-0.38/13 1.02}
16. Ne5 {+0.78/10 0.90} Nc6 {-0.33/15 1.01}
17. Be3 {+0.70/10 2.08} Be8 {-0.35/13 1.01}
18. Re2 {+0.71/9 1.38} Bd6 {-0.20/14 1.03}
19. Bg5 {+0.40/9 1.16} Be7 {-0.22/12 1.01}
20. Rd2 {+0.59/9 0.81} h6 {-0.45/12 1.02}
21. Be3 {+0.63/10 1.13} Bd6 {-0.09/13 1.04}
22. b4 {+0.53/9 1.21} Bb8 {+0.04/13 1.05}
23. Be2 {+0.73/9 1.18} Ne7 {-0.09/15 1.04}
24. Rdc2 {+0.38/10 1.19} Nf5 {0.00/16 1.05}
25. Bf3 {+0.24/11 0.90} Rc7 {+0.02/16 1.06}
26. Qd2 {+0.30/10 0.98} Ba7 {+0.15/16 1.07}
27. Ne2 {+0.14/11 0.88} Rxc2 {+0.41/16 1.06}
28. Rxc2 {+0.13/12 0.79} Nd5 {+0.38/16 1.07}
29. Rc1 {+0.09/11 0.66} Ndxe3 {+0.39/15 1.21}
30. fxe3 {+0.01/12 0.65} Bb8 {+0.71/15 1.21}
31. Nd3 {-0.11/32 0.58} b6 {+0.63/15 1.20}
32. Bg4 {-0.09/31 0.59} Qg5 {+0.48/16 1.21}
33. Bxf5 {-0.41/30 0.59} Qxf5 {+0.63/17 1.21}
34. Ndf4 {-0.55/25 0.59} Bb5 {+1.01/17 1.21}
35. Nc3 {-0.48/26 0.59} Bd7 {+0.86/15 1.24}
36. Rf1 {-0.27/25 0.59} Qg5 {+0.98/15 1.22}
37. Rc1 {-0.36/25 0.59} Rc8 {+0.97/16 1.22}
38. Kf2 {-0.83/26 0.59} Qd8 {+1.19/14 1.23}
39. Kg1 {-0.85/27 0.60} Bc6 {+1.11/14 1.21}
40. Nce2 {-0.89/27 0.61} Bb7 {+1.22/14 1.00}

41. Rxc8 {-0.96/12 1.12} Qxc8 {+1.22/15 0.89}
42. Nc3 {-0.92/13 2.14} Qd8 {+1.40/14 0.91}
43. a4 {-0.92/12 1.31} e5 {+1.53/14 0.91}
44. Nfd5 {-0.72/13 1.22} Qg5 {+1.20/15 0.90}
45. Qd1 {-0.70/12 1.75} exd4 {+1.91/16 0.93}
46. Qxd4 {-0.98/16 1.36} Be5 {+1.26/16 0.90}
47. Qg4 {-0.95/16 1.07} Qd8 {+1.13/15 0.91}
48. Qc4 {-0.95/15 0.97} Kh8 {+1.24/13 0.94}
49. Kf2 {-0.85/12 0.99} a5 {+1.31/12 0.93}
50. b5 {-0.78/12 0.96} h5 {+1.16/12 0.93}
51. Kf1 {-0.85/11 0.90} h4 {+0.79/13 0.93}
52. e4 {-0.69/12 1.15} Qg5 {+1.01/14 0.94}
53. Nd1 {-0.76/12 1.32} Kg8 {+1.06/15 0.93}
54. Qd3 {-0.57/13 2.36} Bxd5 {+1.10/14 0.93}
55. Qxd5 {-0.48/14 1.16} g6 {+1.01/15 0.93}
56. Qa8+ {-0.54/14 0.87} Kg7 {+0.67/16 0.96}
57. Qd5 {-0.49/16 1.10} Qf4+ {+0.58/16 0.95}
58. Ke2 {-0.37/16 0.91} Qg3 {+0.77/18 0.96}
59. Ne3 {-0.37/16 0.85} Bf6 {+0.59/18 0.96}
60. Qd7 {-0.53/16 1.10} Qe5 {+0.70/18 0.96}
61. Qd5 {-0.52/15 1.53} Qa1 {+0.87/17 0.97}
62. Qb3 {-0.45/16 1.14} Qd4 {+0.80/18 0.96}
63. Qc4 {-0.47/17 0.99} Qb2+ {+0.72/19 0.98}
64. Qc2 {-0.45/17 0.89} Qa3 {+0.60/18 0.99}
65. Qd1 {-0.45/16 1.07} Qb4 {+0.79/17 0.99}
66. Qc2 {-0.49/16 0.71} Bd4 {+0.85/18 1.01}
67. Kd3 {-0.46/15 0.90} Bc5 {+0.98/18 0.99}
68. Nc4 {-0.37/14 0.81} Kg8 {+0.89/18 1.02}
69. Ke2 {-0.52/15 0.72} Bd4 {+1.09/18 1.01}
70. Nd2 {-0.51/14 0.65} Qa3 {+1.14/17 1.05}
71. Qb3 {-0.43/30 0.59} Qc1 {+0.75/18 1.05}
72. Qb1 {-0.51/31 0.59} Qc7 {+0.70/18 1.05}
73. Qd3 {-0.37/30 0.59} Bc5 {+1.31/18 1.06}
74. Nb3 {-0.44/30 0.59} Qh2 {+1.32/18 1.22}
75. Qd8+ {-0.44/27 0.59} Bf8 {+0.81/16 1.20}
76. Qg5 {-0.38/30 0.60} Bd6 {+1.06/16 1.20}
77. Kf3 {-0.86/31 0.60} Bb4 {+0.93/16 1.22}
78. e5 {-0.56/25 0.60} Qg1 {+1.31/16 1.21}
79. Qd8+ {-0.75/29 0.60} Bf8 {+1.40/18 1.22}
80. Nd2 {-0.83/27 0.61} Qd1+ {+1.28/16 1.01}

81. Kf2 {-1.00/14 1.07} Qxa4 {+1.80/14 0.89}
82. Qxb6 {-1.43/14 1.24} Qf4+ {+2.72/14 0.90}
83. Nf3 {-1.73/13 1.33} a4 {+1.97/15 0.91}
84. Qc6 {-1.84/13 1.18} a3 {+2.17/13 0.92}
85. e6 {-2.86/12 2.46} Qf6 {+3.38/11 0.91}
86. exf7+ {-1.60/11 2.27} Qxf7 {+3.05/15 0.90}
87. b6 {-2.86/12 1.29} a2 {+4.01/15 0.93}
88. Qa8 {-3.21/12 0.93} Kg7 {+3.42/15 0.91}
89. b7 {-3.91/12 0.95} Bc5+ {+4.86/14 0.94}
90. Ke1 {-3.87/15 1.42} Qe6+ {+3.92/15 0.93}
91. Kd2 {-3.87/15 1.15} Bb4+ {+4.16/14 0.93}
92. Kd3 {-3.85/15 1.19} Qb3+ {+4.60/14 0.92}
93. Ke4 {-3.85/15 2.34} Qc4+ {+4.64/14 0.95}
94. Nd4 {-4.29/14 1.01} Bc3 {+4.39/15 0.94}
95. Qd8 {-4.24/13 0.85} Qxd4+ {+4.35/15 0.93}
96. Qxd4+ {-4.18/13 0.95} Bxd4 {+4.50/17 0.95}
97. b8=Q {-4.26/15 1.55} a1=Q {+4.62/16 0.96}
98. Qb7+ {-4.23/14 0.90} Kh6 {+5.05/14 0.96}
99. Qd5 {-4.20/14 1.11} Bf6 {+5.33/13 0.97}
100. Qd2+ {-4.19/12 0.99} Bg5 {+5.32/14 0.97}
101. Qd4 {-4.19/12 1.27} Qe1+ {+5.26/13 0.97}
102. Kd5 {-4.15/13 0.71} Qe8 {+5.24/15 0.97}
103. Qe5 {-4.20/12 1.18} Qd7+ {+5.27/15 0.98}
104. Ke4 {-4.20/13 0.92} Qb7+ {+5.28/14 0.98}
105. Qd5 {-4.20/15 0.94} Qb2 {+5.35/16 0.99}
106. Kd3 {-4.20/14 0.87} Qd2+ {+5.26/15 1.02}
107. Kc4 {-4.21/16 0.78} Qa2+ {+5.26/17 1.00}
108. Kd4 {-4.20/15 0.70} Bf6+ {+5.25/15 1.01}
109. Kc5 {-4.20/16 0.64} Be7+ {+5.30/14 1.04}
110. Kd4 {-4.20/17 0.57} Qc2 {+5.32/15 1.04}
111. Ke5 {-4.20/27 0.52} Bb4 {+5.26/15 1.03}
112. Qf3 {-4.19/26 0.52} Qc7+ {+5.21/14 1.06}
113. Ke4 {-4.20/27 0.52} Qc4+ {+5.19/13 1.07}
114. Ke5 {-4.20/31 0.52} Qc5+ {+5.31/14 1.07}
115. Ke4 {-4.21/27 0.52} Kg7 {+5.20/15 1.21}
116. Qd3 {-4.20/29 0.52} Qe7+ {+5.27/15 1.23}
117. Kd4 {-4.20/25 0.52} Be1 {+5.26/13 1.23}
118. Qf3 {-4.19/24 0.53} Qa7+ {+5.26/12 1.22}
119. Kd3 {-4.19/25 0.53} Qa6+ {+5.39/14 1.24}
120. Kc2 {-4.19/25 0.54} Qc4+ {+5.69/13 0.99}

121. Kd1 {-4.25/14 1.37} Bc3 {+5.66/14 0.90}
122. Kc2 {-4.28/14 1.63} Be5+ {+6.28/13 0.91}
123. Kd1 {-4.37/15 1.06} Bf4 {+6.56/14 0.90}
124. Ke1 {-4.26/15 2.52} Kh6 {+6.02/15 0.91}
125. Kf2 {-4.26/14 1.06} Qc5+ {+5.68/14 0.91}
126. Ke2 {-4.20/14 1.12} Qc2+ {+5.25/14 0.92}
127. Kf1 {-4.20/16 1.27} Qc1+ {+5.29/16 0.92}
128. Ke2 {-4.21/17 1.59} Qb2+ {+5.40/15 0.91}
129. Kf1 {-4.21/15 1.15} Qb1+ {+5.31/17 0.93}
130. Ke2 {-4.21/17 1.81} Qb5+ {+5.29/15 0.92}
131. Qd3 {-4.21/17 1.32} Qb2+ {+5.30/17 0.93}
132. Kf3 {-4.20/16 1.19} Qf6 {+5.29/17 0.94}
133. Qe4 {-4.21/13 1.21} Bg5+ {+5.27/16 0.95}
134. Ke2 {-4.21/17 1.42} Qa6+ {+5.26/18 0.96}
135. Qd3 {-4.21/17 0.98} Qa2+ {+5.24/16 0.94}
136. Kf1 {-4.21/18 1.92} Qa1+ {+5.23/17 0.94}
137. Kf2 {-4.22/18 1.01} Qe5 {+5.27/17 0.94}
138. g3 {-4.07/13 1.07} Be7 {+5.59/12 0.97}
139. gxh4 {-4.43/13 0.83} Bxh4+ {+5.38/13 0.95}
140. Kg1 {-4.47/15 1.44} Bg5 {+5.45/15 0.95}
141. Kg2 {-4.09/13 0.73} Be3 {+5.55/15 0.98}
142. Qe2 {-4.18/14 0.99} Qg5+ {+5.70/16 0.97}
143. Qg4 {-4.24/15 1.12} Qxg4+ {+18.60/26 0.98}
144. hxg4 {-6.07/34 0.68} Kg5 {+19.59/27 1.01}
145. Kf3 {-6.08/32 0.72} Bf4 {+M81/26 0.98}
146. Kg2 {-7.41/30 0.87} Kxg4 {+M77/24 1.00}
147. Kf1 {-M82/23 0.78} Kf3 {+M23/21 1.01}
148. Ke1 {-M62/22 0.69} g5 {+M21/20 1.01}
149. Kd1 {-M24/24 0.56} g4 {+M19/19 1.02}
150. Kc2 {-M22/27 0.58} g3 {+M19/17 1.03}
151. Kc3 {-M20/39 0.52} g2 {+M15/16 1.05}
152. Kd4 {-M18/39 0.53} g1=Q+ {+M13/15 1.06}
153. Kd5 {-M14/49 0.53} Qb6 {+M9/14 0.72}
154. Kc4 Ke4 {+M7/12 0.11}
155. Kc3 Qb5 {+M5/9 0.015}
156. Kc2 Qb4 {+M3/6 0.005}
157. Kd1 Qd2# {+M1/4 0.004}
{Black mates}
0-1


Some stats which show the effect on average depth over all games for certain move sections:
(climbing from second last place to first place for the third selected move window 29-40
and to third place in overall moves)

Code: Select all

file         : 20190715.pgn
move window  : [4, 16]

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                     Pirarucu_307      196  62.0  00:01:00:31  16.36  00:01:425
  2                    Goedel_600-64      196  62.5  00:00:46:44  15.23  00:01:100
  3                RodentIII_0287-64      196  56.9  00:00:41:59  14.81  00:00:989
  4                     Winter_06-64      196  45.4  00:01:00:31  13.40  00:01:425
  5                    Topple_072-64      196  42.9  00:00:56:57  13.03  00:01:341
  6                    Marvin_340-64      196  58.7  00:00:49:38  12.54  00:01:169
  7                 Asymptote_062-64      196  32.4  00:01:05:01  12.32  00:01:531
  8                    Counter_33-64      196  39.3  00:00:54:25  11.22  00:01:281

file         : 20190715.pgn
move window  : [17, 28]

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                     Pirarucu_307      196  62.0  00:00:40:58  16.57  00:01:050
  2                    Goedel_600-64      196  62.5  00:00:42:42  15.78  00:01:093
  3                RodentIII_0287-64      196  56.9  00:00:40:44  15.67  00:01:044
  4                    Topple_072-64      196  42.9  00:00:43:45  13.09  00:01:120
  5                     Winter_06-64      196  45.4  00:00:36:55  12.98  00:00:946
  6                    Marvin_340-64      196  58.7  00:00:44:32  12.97  00:01:140
  7                 Asymptote_062-64      196  32.4  00:00:40:58  12.54  00:01:048
  8                    Counter_33-64      196  39.3  00:00:43:52  11.16  00:01:119

file         : 20190715.pgn
move window  : [29, 40]
score window : [-32000.0, +32000.0]
notes        : 1. games and pts% are not affected by move and score windows.
               2. Table is sorted by aveDep in descending order.
               3. aveTime is the average time/move in m:s:ms
               4. sumTime is in d:h:m:s

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                 Asymptote_062-64      196  32.4  00:00:24:20  26.38  00:00:631
  2                RodentIII_0287-64      196  56.9  00:00:45:23  17.18  00:01:190
  3                    Goedel_600-64      196  62.5  00:00:33:17  16.28  00:00:893
  4                     Pirarucu_307      196  62.0  00:00:19:20  16.24  00:00:513
  5                     Winter_06-64      196  45.4  00:00:30:49  14.13  00:00:810
  6                    Marvin_340-64      196  58.7  00:00:35:09  13.58  00:00:934
  7                    Topple_072-64      196  42.9  00:00:27:57  12.87  00:00:740
  8                    Counter_33-64      196  39.3  00:00:30:23  11.48  00:00:785

file         : 20190715.pgn
move window  : [41, 52]
score window : [-32000.0, +32000.0]
notes        : 1. games and pts% are not affected by move and score windows.
               2. Table is sorted by aveDep in descending order.
               3. aveTime is the average time/move in m:s:ms
               4. sumTime is in d:h:m:s

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                     Pirarucu_307      196  62.0  00:00:51:43  20.49  00:01:492
  2                RodentIII_0287-64      196  56.9  00:00:31:30  18.18  00:00:906
  3                    Goedel_600-64      196  62.5  00:00:39:36  17.81  00:01:184
  4                     Winter_06-64      196  45.4  00:00:32:24  16.48  00:00:974
  5                 Asymptote_062-64      196  32.4  00:00:49:42  15.96  00:01:413
  6                    Marvin_340-64      196  58.7  00:00:38:21  14.97  00:01:120
  7                    Topple_072-64      196  42.9  00:00:38:17  14.41  00:01:135
  8                    Counter_33-64      196  39.3  00:00:43:36  13.26  00:01:227

file         : 20190715.pgn
move window  : [53, 64]
score window : [-32000.0, +32000.0]
notes        : 1. games and pts% are not affected by move and score windows.
               2. Table is sorted by aveDep in descending order.
               3. aveTime is the average time/move in m:s:ms
               4. sumTime is in d:h:m:s

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                     Pirarucu_307      196  62.0  00:00:27:39  22.20  00:01:013
  2                RodentIII_0287-64      196  56.9  00:00:25:45  21.07  00:00:932
  3                     Winter_06-64      196  45.4  00:00:21:32  18.60  00:00:841
  4                    Goedel_600-64      196  62.5  00:00:28:47  18.54  00:01:106
  5                 Asymptote_062-64      196  32.4  00:00:29:21  17.32  00:01:059
  6                    Marvin_340-64      196  58.7  00:00:28:51  16.07  00:01:084
  7                    Topple_072-64      196  42.9  00:00:28:01  15.07  00:01:037
  8                    Counter_33-64      196  39.3  00:00:30:41  13.95  00:01:077

file         : 20190715.pgn
move window  : [4, 400]

 nr                           player    games  pts%      sumTime aveDep    aveTime
  1                RodentIII_0287-64      196  56.9  00:03:58:35  19.66  00:00:987
  2                     Pirarucu_307      196  62.0  00:04:10:47  19.59  00:01:053
  3                 Asymptote_062-64      196  32.4  00:04:19:01  18.98  00:01:082
  4                    Goedel_600-64      196  62.5  00:04:02:19  17.94  00:01:034
  5                     Winter_06-64      196  45.4  00:03:54:25  17.11  00:01:011
  6                    Marvin_340-64      196  58.7  00:04:08:05  15.13  00:01:063
  7                    Topple_072-64      196  42.9  00:04:08:20  14.70  00:01:055
  8                    Counter_33-64      196  39.3  00:04:13:33  12.94  00:01:058
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
malu
Posts: 22
Joined: Tue Aug 28, 2018 3:44 pm
Location: Berlin, Germany
Full name: Maximilian Lupke

Re: Depth anomaly in Asymptote

Post by malu »

Hi Guenther,

thanks for testing Asymptote.

As weird as this bug may sound, I can reproduce it using v0.6.2. But I cannot reproduce it using the current master. But I think I know what happens here, I'll give a more detailed explanation in the evening (basically Asymptote stops searching and just increases depth, you will see that the node count does not increase). I'll also release v0.6.3, then, which should fix this.

It seems the last-minute time management changes for TCEC were a bad idea. :D
Chessqueen
Posts: 5576
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Depth anomaly in Asymptote

Post by Chessqueen »

malu wrote: Fri Jul 19, 2019 2:14 pm Hi Guenther,

thanks for testing Asymptote.

As weird as this bug may sound, I can reproduce it using v0.6.2. But I cannot reproduce it using the current master. But I think I know what happens here, I'll give a more detailed explanation in the evening (basically Asymptote stops searching and just increases depth, you will see that the node count does not increase). I'll also release v0.6.3, then, which should fix this.

It seems the last-minute time management changes for TCEC were a bad idea. :D

I also noticed this strange behavior where Asuymptote lost this winning position, it just froze and lost in time, Asymptote was 2 moves from checkmating its opponent Here where asymptote found mate in two it should uses a mate-finding accelerator where it ignores mate distance. If a PV finds mate at a high depth, then the line should cuts off without trying to find a faster mate.; this can accelerate mate finding during time control play since sometimes mates tend to trash. The hash table is corrupt because the fastest mate has NOT been found. The routine is automatically flagged off at the root once mate has been found, so a faster mate can be researched without interference from the hash table. The author of Asymptote should also try using a new gcc v7.2.0 posix compilation or newer that will increase the speed of the program to reach a faster depth.
https://cd.tcecbeta.club/archive.html?s ... ql&game=18

If Asymptote stops searching and just increases depth, you will see that the node count does not increase the problem could be solved by using a hash refutation theory where if a fail-high hash position suddenly fails low at a deep depth, and the move list has never been searched full width, then you have to create a subroutine where a command is sent to an internal iterative deepening routine to find first a better move.
Do NOT worry and be happy, we all live a short life :roll: