Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To ensure MakeTerminal value overwrites any MCTS calculated value #677

Closed

Conversation

MelleKoning
Copy link
Contributor

@MelleKoning MelleKoning commented Jan 13, 2019

This is a bit of a stretch, but it does seem to fix #627 and also #572

This is probably because overwriting the MakeTerminal with a value big enough to prevent any MCTS accumulation-visits overshooting the MCTS-Search decided MakeTerminal.

  1. This would imply that for training a different MakeTerminal is to be used -to keep it at just one and minus one- but for enabling matches you want the Terminal-value to be big enough to ensure it is finalizing the search.

Details of go nodes after applying this as a 'hotfix' as compared to issue #627 shows the right move Bg1-f2 is found and kept after only few nodes:

C:\dev\lc0>lc0 --minibatch-size=128 --weights=nets\32300
       _
|   _ | |
|_ |_ |_| v0.21.0-dev built Jan 13 2019
position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 c1e3 e7e5 d4b3 f8e7 f2f3 c8e6 d1d2 h7h5 c3d5 f6d5 e4d5 e6f5 b3a5 b7b6 a5c4 b8d7 a2a4 e8g8 f1e2 a8c8 e1g1 h5h4 h2h3 f5g6 b2b4 d8c7 f1c1 c7b7 c2c3 f8e8 e2f1 c8b8 e3f2 f7f5 d2e1 b7c7 f2h4 e7h4 e1h4 f5f4 a4a5 b6b5 c4d2 d7f6 c3c4 b5c4 d2c4 b8b4 c4b6 c7e7 f1a6 e5e4 h4f4 f6h5 f4e3 e7e5 f3f4 h5f4 a6f1 f4d3 c1d1 e5b2 b6d7 b4b3 a5a6 d3e5 e3g5 b3h3 g5d2 b2b3 d7e5 b3g3 e5g4 g3g4 d2e1 h3h8 a6a7 e4e3 a7a8Q g4f4 g2g3 f4h6
go nodes 10000
Loading weights file from: nets\32300
Creating backend [cudnn]...
info depth 1 seldepth 2 time 122 nodes 5 score cp 270 hashfull 0 nps 40 tbhits 0 pv a8e8 g6e8
info depth 2 seldepth 3 time 188 nodes 10 score cp 91 hashfull 0 nps 53 tbhits 0 pv f1g2 g8f7 g3g4
info depth 2 seldepth 4 time 298 nodes 15 score cp 272 hashfull 0 nps 50 tbhits 0 pv a8e8 g6e8 f1g2 h6h2
info depth 3 seldepth 5 time 361 nodes 17 score cp 388 hashfull 0 nps 47 tbhits 0 pv a8e8 g8h7 g3g4 h8g8 f1g2
info depth 3 seldepth 6 time 457 nodes 21 score cp 281 hashfull 0 nps 45 tbhits 0 pv a8e8 g8h7 g3g4 h8g8 f1g2 g8h8
info depth 3 seldepth 7 time 525 nodes 22 score cp 197 hashfull 0 nps 41 tbhits 0 pv a8e8 g8h7 g3g4 h8g8 f1g2 g8h8
info depth 4 seldepth 8 time 590 nodes 26 score cp 140 hashfull 0 nps 44 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3
info depth 3 seldepth 8 time 610 nodes 31 score cp 140 hashfull 0 nps 50 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3
info depth 4 seldepth 8 time 643 nodes 35 score cp 97 hashfull 0 nps 54 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3
info depth 4 seldepth 8 time 697 nodes 56 score cp 173 hashfull 1 nps 80 tbhits 0 pv f1g2 g8f7 g3g4 h6h2 g1f1
info depth 4 seldepth 9 time 1122 nodes 164 score cp 131 hashfull 2 nps 146 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 e1e2 e8a8 a1a8
info depth 4 seldepth 10 time 1592 nodes 278 score cp 88 hashfull 3 nps 174 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2
info depth 5 seldepth 10 time 1646 nodes 296 score cp 103 hashfull 3 nps 179 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8f8 e8f8 e3e2 f1e2
info depth 5 seldepth 11 time 2094 nodes 399 score cp 137 hashfull 4 nps 190 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 e8f8 d4f4 h2g3
info depth 5 seldepth 12 time 2148 nodes 414 score cp 143 hashfull 4 nps 192 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 e8f8 d4f4 f8f4
info depth 5 seldepth 13 time 2255 nodes 435 score cp 149 hashfull 4 nps 192 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 e8f8 d4f4 f8f4 g3f4
info depth 5 seldepth 14 time 2467 nodes 478 score cp 147 hashfull 5 nps 193 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 e8f8 d4f4 f8f4 g3f4 h2f4
info depth 6 seldepth 14 time 3051 nodes 651 score cp 111 hashfull 6 nps 213 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 e8f8 d4f4 f8f4 g3f4 h2f4
info depth 6 seldepth 15 time 3133 nodes 704 score cp 97 hashfull 6 nps 224 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 e1c3 e3e2 f1f2 e2e1n c3e1 h8f8
info depth 6 seldepth 16 time 3358 nodes 797 score cp 48 hashfull 7 nps 237 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e2 h2g2 e2e1 f8b8
info depth 7 seldepth 16 time 3874 nodes 892 score cp -6286 hashfull 8 nps 230 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e2 h2g2 e2e1 f8b8
info depth 8 seldepth 18 time 4576 nodes 1153 score cp 1623 hashfull 10 nps 251 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 h8a8 e1e3 a8a1 f1f2 h2g1 f2f3 g6h5 f3f4 g7g5 f4e4
info depth 8 seldepth 19 time 4627 nodes 1174 score cp -405 hashfull 10 nps 253 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 h8a8 e1e3 a8a1 f1f2 h2g1 f2f3 g6h5 f3e4 a1a4 e4d3
info depth 9 seldepth 19 time 5085 nodes 1427 score cp -891 hashfull 11 nps 280 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 h8a8 e1e3 a8a1 f1f2 h2g1 f2f3 g6h5 f3f4 g7g5 f4e4 g1b1 e3d3
info depth 10 seldepth 19 time 5921 nodes 1937 score cp -739 hashfull 13 nps 327 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 d2d4 h8h7 g2e4 g3f4 d4f2
info depth 10 seldepth 20 time 6104 nodes 2054 score cp -97 hashfull 14 nps 336 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 d2b4 h8h7 f1g1 g6f5 g1h1 h7g6
info depth 10 seldepth 21 time 6428 nodes 2301 score cp 28 hashfull 15 nps 357 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 d2b4 h8h7 f1g1 g6f5 g1h1 h7g6
info depth 10 seldepth 23 time 6525 nodes 2402 score cp 16 hashfull 15 nps 368 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 d2b4 h8h7 f1g1 g6f5 g1h1 h7g6
info depth 10 seldepth 24 time 6877 nodes 2639 score cp -536 hashfull 16 nps 383 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8h7 g2h3
info depth 11 seldepth 24 time 6942 nodes 2653 score cp -218 hashfull 16 nps 382 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8h7 g2h3
info depth 11 seldepth 24 time 11950 nodes 5121 score cp 122 hashfull 30 nps 428 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 11 seldepth 24 time 12227 nodes 5265 score cp 601 hashfull 31 nps 430 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
bestmove f1g2 ponder h6h2
go nodes 20000
info depth 11 seldepth 19 time 95 nodes 5491 score cp 490 hashfull 32 nps 347 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 19 time 245 nodes 5580 score cp 35 hashfull 32 nps 497 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 12 seldepth 19 time 417 nodes 5610 score cp 1315 hashfull 32 nps 364 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 19 time 740 nodes 5665 score cp 249 hashfull 33 nps 279 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 12 seldepth 19 time 904 nodes 5793 score cp 390 hashfull 33 nps 370 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 12 seldepth 20 time 1044 nodes 5888 score cp 190 hashfull 34 nps 411 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 20 time 1176 nodes 5953 score cp -393 hashfull 34 nps 420 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 12 seldepth 20 time 1416 nodes 6130 score cp -137 hashfull 35 nps 474 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 20 time 3380 nodes 7704 score cp -6 hashfull 41 nps 664 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 21 time 5996 nodes 9781 score cp -234 hashfull 48 nps 720 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 22 time 6145 nodes 9863 score cp 265 hashfull 48 nps 716 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 23 time 6424 nodes 9985 score cp -116 hashfull 49 nps 704 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 24 time 6548 nodes 10084 score cp 1007 hashfull 49 nps 706 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 25 time 6688 nodes 10229 score cp 185 hashfull 50 nps 713 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
info depth 13 seldepth 25 time 6767 nodes 10254 score cp -186 hashfull 50 nps 708 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 d1d2 e8a8 a1a8 e3d2 a8h8 h7h8 e1d2 h2g3 f1g1 g6e4 d2e2 g3g2 e2g2 e4g2 g1g2 h8g8 g2h3
bestmove f1g2 ponder h6h2

@MelleKoning
Copy link
Contributor Author

Removed the change in search.cc as actually not needed.

@wakamex
Copy link

wakamex commented Jan 13, 2019

tested appveyor build against v0.20.1 at short tc (10+0.1s) on 1060 (nps 3439 go nodes 130000).
does worse, but result could be different at longer tc or using TBs.

lc0-32587 vs lc0pr677-32587: 253 - 112 - 135 [0.641]
   # PLAYER            :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)
   1 lc0-32587         :    51.2   13.4   320.5     500  64.1     100
   2 lc0pr677-32587    :   -51.2   13.4   179.5     500  35.9     ---

update: seems worse with TBs

lc0-32587TB vs lc0pr677-32587TB: 45 - 11 - 28 [0.702]
   # PLAYER              :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)
   1 lc0-32587TB         :    75.3   32.0    59.0      84  70.2     100
   2 lc0pr677-32587TB    :   -75.3   32.0    25.0      84  29.8     ---

@ddobbelaere
Copy link
Contributor

ddobbelaere commented Jan 13, 2019

Probably we are seeing this worse performance because of the following. If there is an unforced mate (e.g. after blunder of opponent, more like a helpmate actually) in a line starting with a suboptimal move and the search has explored this mate, it gets completely sucked into this suboptimal move.

The fact that the huge (as enforced in this PR) Q value of an unforced mate greatly influences its parents is wrong. Or am I completely missing something here?

@MelleKoning
Copy link
Contributor Author

Hi @ddobbelaere good point, I guess that must be the reason.

The latest commit just applied lowers the maxnumber and takes the 'depth' into account.
The goal of taking the depth into account is to see if this would lead to faster mates and less trolling.

First test applied showed that the original problem for issue #627 is still fixed, but I do have to test this on other positions as well to see if it lowers the amount of trolling.

PS: I know this is just a hack because it does not consider any tree-reuse (results of hitting upon same hash position with different moves), so eventually some better solution should have to be found.
This PR just posted here as an idea to see results.

C:\dev\lc0>lc0 --verbose-move-stats -t 1 --minibatch-size=128 --weights=.\nets\32367
       _
|   _ | |
|_ |_ |_| v0.21.0-dev built Jan 15 2019
position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 c1e3 e7e5 d4b3 f8e7 f2f3 c8e6 d1d2 h7h5 c3d5 f6d5 e4d5 e6f5 b3a5 b7b6 a5c4 b8d7 a2a4 e8g8 f1e2 a8c8 e1g1 h5h4 h2h3 f5g6 b2b4 d8c7 f1c1 c7b7 c2c3 f8e8 e2f1 c8b8 e3f2 f7f5 d2e1 b7c7 f2h4 e7h4 e1h4 f5f4 a4a5 b6b5 c4d2 d7f6 c3c4 b5c4 d2c4 b8b4 c4b6 c7e7 f1a6 e5e4 h4f4 f6h5 f4e3 e7e5 f3f4 h5f4 a6f1 f4d3 c1d1 e5b2 b6d7 b4b3 a5a6 d3e5 e3g5 b3h3 g5d2 b2b3 d7e5 b3g3 e5g4 g3g4 d2e1 h3h8 a6a7 e4e3 a7a8Q g4f4 g2g3 f4h6
go nodes 10000
Loading weights file from: .\nets\32367
Creating backend [cudnn]...
info depth 1 seldepth 2 time 119 nodes 5 score cp 179 hashfull 0 nps 42 tbhits 0 pv a8e8 g6e8
info depth 2 seldepth 3 time 184 nodes 7 score cp 201 hashfull 0 nps 38 tbhits 0 pv a8e8 g6e8 f1g2
info depth 2 seldepth 4 time 249 nodes 11 score cp 372 hashfull 0 nps 44 tbhits 0 pv a8e8 g8h7 e8h8 h7h8
info depth 3 seldepth 5 time 308 nodes 13 score cp 361 hashfull 0 nps 42 tbhits 0 pv a8e8 g8h7 e8h8 h7h8 d1d4
info depth 3 seldepth 6 time 371 nodes 17 score cp 388 hashfull 0 nps 45 tbhits 0 pv a8e8 g8h7 e8h8 h7h8 a1a4 h6g5
info depth 4 seldepth 7 time 431 nodes 18 score cp 280 hashfull 0 nps 41 tbhits 0 pv a8e8 g8h7 e8h8 h7h8 a1a4 h6g5
info depth 4 seldepth 8 time 479 nodes 20 score cp 160 hashfull 0 nps 41 tbhits 0 pv a8e8 g8h7 e8h8 h7h8 a1a4 h6g5
info depth 4 seldepth 9 time 543 nodes 26 score cp 55 hashfull 0 nps 47 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3 e1e2
info depth 5 seldepth 10 time 600 nodes 34 score cp -51 hashfull 1 nps 56 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 e1e2 b5e2 f1e2 h2g2
info depth 4 seldepth 10 time 669 nodes 46 score cp -51 hashfull 1 nps 68 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 e1e2 b5e2 f1e2 h2g2
info depth 4 seldepth 10 time 894 nodes 72 score cp 133 hashfull 1 nps 80 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8f8 e8f8
info depth 5 seldepth 10 time 955 nodes 79 score cp 121 hashfull 1 nps 82 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2
info depth 5 seldepth 11 time 1220 nodes 178 score cp 161 hashfull 2 nps 145 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e3e2 f1f2 g6e4
info depth 5 seldepth 12 time 1343 nodes 229 score cp 132 hashfull 2 nps 170 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2
info depth 6 seldepth 13 time 1409 nodes 242 score cp 110 hashfull 3 nps 171 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e2
info depth 6 seldepth 14 time 1477 nodes 261 score cp 72 hashfull 3 nps 176 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 f8f4 g3f4 d3e2
info depth 6 seldepth 15 time 1738 nodes 337 score cp 7 hashfull 3 nps 193 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 f1f2 e8f8 a4f4 e2d1q e1d1 h2g3
info depth 7 seldepth 15 time 1815 nodes 395 score cp -26 hashfull 4 nps 217 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 f1f2 e8f8 a4f4 e2d1q e1d1 f8f4
info depth 7 seldepth 17 time 1933 nodes 451 score cp -26 hashfull 4 nps 233 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2c2 d1e1 g6f5
info depth 8 seldepth 18 time 2045 nodes 528 score cp -17 hashfull 4 nps 258 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2c2 d1d4 h7h6 g2f3
info depth 8 seldepth 19 time 2146 nodes 594 score cp -7 hashfull 4 nps 276 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2c2 d1d4 h7h6 g2f3
info depth 9 seldepth 19 time 2661 nodes 719 score cp 3 hashfull 6 nps 270 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 h7h6 g2f3 g6h5
info depth 10 seldepth 20 time 3014 nodes 951 score cp -8 hashfull 7 nps 315 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 h7h6 g2f3 g6f5 d4b4
info depth 10 seldepth 21 time 3371 nodes 1148 score cp -13 hashfull 8 nps 340 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 d4b4 g6f6
info depth 11 seldepth 21 time 3624 nodes 1315 score cp -25 hashfull 9 nps 362 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4
info depth 11 seldepth 22 time 3827 nodes 1469 score cp -38 hashfull 9 nps 383 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4
info depth 12 seldepth 23 time 4028 nodes 1632 score cp -40 hashfull 10 nps 405 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4
info depth 13 seldepth 23 time 5025 nodes 2434 score cp -86 hashfull 13 nps 484 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2
info depth 13 seldepth 24 time 5222 nodes 2606 score cp -86 hashfull 14 nps 499 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2
info depth 14 seldepth 24 time 5806 nodes 3135 score cp -79 hashfull 16 nps 539 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 h4h5
info depth 14 seldepth 25 time 6214 nodes 3443 score cp -72 hashfull 17 nps 554 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 g7g6 a4a8
info depth 15 seldepth 25 time 7545 nodes 4650 score cp -49 hashfull 22 nps 616 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 g7g6 a4a8
info depth 15 seldepth 25 time 8368 nodes 5332 score cp -42 hashfull 24 nps 637 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 g7g6 a4a8
info string a1a5  (15  ) N:       2 (+ 0) (P:  0.62%) (Q: -4.45859) (U: 0.52255) (Q+U: -3.93603) (V: -0.7772)
info string a1a4  (13  ) N:       2 (+ 0) (P:  0.62%) (Q: -4.39745) (U: 0.52062) (Q+U: -3.87683) (V: -0.6549)
info string a1a7  (19  ) N:       2 (+ 0) (P:  0.75%) (Q: -4.47157) (U: 0.63145) (Q+U: -3.84012) (V: -0.8031)
info string d1b1  (73  ) N:       2 (+ 0) (P:  0.73%) (Q: -4.44591) (U: 0.61872) (Q+U: -3.82719) (V: -0.7518)
info string a1a6  (17  ) N:       2 (+ 0) (P:  0.87%) (Q: -4.47216) (U: 0.73808) (Q+U: -3.73408) (V: -0.8043)
info string d1c1  (74  ) N:       2 (+ 0) (P:  0.89%) (Q: -4.46569) (U: 0.75483) (Q+U: -3.71086) (V: -0.7914)
info string a8a3  (1602) N:       2 (+ 0) (P:  0.92%) (Q: -4.45565) (U: 0.77932) (Q+U: -3.67633) (V: -0.7713)
info string g1g2  (156 ) N:       2 (+ 0) (P:  0.91%) (Q: -4.40076) (U: 0.76450) (Q+U: -3.63626) (V: -0.6615)
info string a8a2  (1600) N:       2 (+ 0) (P:  0.89%) (Q: -4.37207) (U: 0.75097) (Q+U: -3.62110) (V: -0.6041)
info string a8a4  (1604) N:       2 (+ 0) (P:  1.01%) (Q: -4.45377) (U: 0.85535) (Q+U: -3.59842) (V: -0.7675)
info string a1a3  (10  ) N:       2 (+ 0) (P:  1.13%) (Q: -4.39639) (U: 0.95715) (Q+U: -3.43924) (V: -0.6528)
info string f1b5  (141 ) N:       2 (+ 0) (P:  1.18%) (Q: -4.42945) (U: 0.99420) (Q+U: -3.43525) (V: -0.7189)
info string f1a6  (143 ) N:       2 (+ 0) (P:  1.29%) (Q: -4.50118) (U: 1.08989) (Q+U: -3.41129) (V: -0.8624)
info string f1c4  (139 ) N:       2 (+ 0) (P:  1.26%) (Q: -4.46674) (U: 1.06250) (Q+U: -3.40424) (V: -0.7935)
info string d1d4  (90  ) N:       2 (+ 0) (P:  1.28%) (Q: -4.39942) (U: 1.07700) (Q+U: -3.32242) (V: -0.6588)
info string a1c1  (1   ) N:       2 (+ 0) (P:  1.42%) (Q: -4.47951) (U: 1.19749) (Q+U: -3.28202) (V: -0.8190)
info string d1d3  (86  ) N:       2 (+ 0) (P:  1.70%) (Q: -4.40975) (U: 1.43879) (Q+U: -2.97096) (V: -0.6795)
info string f1d3  (134 ) N:       2 (+ 0) (P:  1.78%) (Q: -4.44041) (U: 1.50645) (Q+U: -2.93396) (V: -0.7408)
info string a8a5  (1606) N:       2 (+ 0) (P:  2.14%) (Q: -4.46260) (U: 1.80864) (Q+U: -2.65396) (V: -0.7852)
info string d1d2  (81  ) N:       2 (+ 0) (P:  2.04%) (Q: -4.34452) (U: 1.72552) (Q+U: -2.61900) (V: -0.5490)
info string f1e2  (130 ) N:       2 (+ 0) (P:  2.35%) (Q: -4.45699) (U: 1.98841) (Q+U: -2.46859) (V: -0.7740)
info string g3g4  (615 ) N:       2 (+ 0) (P:  2.77%) (Q: -4.51096) (U: 2.34215) (Q+U: -2.16882) (V: -0.8819)
info string e1d2  (105 ) N:       2 (+ 0) (P:  2.72%) (Q: -4.43115) (U: 2.29833) (Q+U: -2.13282) (V: -0.7223)
info string a8c6  (1610) N:       2 (+ 0) (P:  3.39%) (Q: -4.45905) (U: 2.86341) (Q+U: -1.59564) (V: -0.7781)
info string a1b1  (0   ) N:       2 (+ 0) (P:  3.46%) (Q: -4.47867) (U: 2.92527) (Q+U: -1.55341) (V: -0.8173)
info string a1a2  (7   ) N:       2 (+ 0) (P:  3.37%) (Q: -4.29045) (U: 2.84408) (Q+U: -1.44637) (V: -0.4409)
info string a8a6  (1608) N:       2 (+ 0) (P:  3.61%) (Q: -4.45464) (U: 3.05027) (Q+U: -1.40437) (V: -0.7693)
info string e1f2  (107 ) N:       2 (+ 0) (P:  3.68%) (Q: -4.49530) (U: 3.10826) (Q+U: -1.38704) (V: -0.8506)
info string a8c8  (1615) N:       2 (+ 0) (P:  3.67%) (Q: -4.48263) (U: 3.09666) (Q+U: -1.38597) (V: -0.8253)
info string a8b7  (1612) N:       2 (+ 0) (P:  3.69%) (Q: -4.45950) (U: 3.11985) (Q+U: -1.33965) (V: -0.7790)
info string a8d8  (1616) N:       2 (+ 0) (P:  3.81%) (Q: -4.49917) (U: 3.21779) (Q+U: -1.28137) (V: -0.8583)
info string a8b8  (1614) N:       2 (+ 0) (P:  5.08%) (Q: -4.48401) (U: 4.28738) (Q+U: -0.19663) (V: -0.8280)
info string a8a7  (1611) N:       2 (+ 0) (P:  5.22%) (Q: -4.41714) (U: 4.40723) (Q+U: -0.00991) (V: -0.6943)
info string e1a5  (117 ) N:       3 (+ 0) (P:  0.65%) (Q: -2.98170) (U: 0.41306) (Q+U: -2.56864) (V: -0.8241)
info string e1b4  (114 ) N:       3 (+ 0) (P:  0.64%) (Q: -2.96041) (U: 0.40279) (Q+U: -2.55763) (V: -0.7807)
info string e1c3  (109 ) N:       3 (+ 0) (P:  0.97%) (Q: -2.97487) (U: 0.61421) (Q+U: -2.36066) (V: -0.8096)
info string e1e3  (111 ) N:       3 (+ 0) (P:  1.39%) (Q: -3.17602) (U: 0.88120) (Q+U: -2.29482) (V: -0.3987)
info string e1e2  (106 ) N:       3 (+ 0) (P:  5.76%) (Q: -5.62578) (U: 3.64660) (Q+U: -1.97919) (V: -0.5974)
info string f1h3  (138 ) N:      22 (+ 0) (P:  5.43%) (Q: -0.94172) (U: 0.59822) (Q+U: -0.34350) (V: -0.0050)
info string a8e8  (1617) N:      54 (+ 0) (P: 10.20%) (Q: -0.56768) (U: 0.46996) (Q+U: -0.09771) (V:  0.3566)
info string f1g2  (132 ) N:    5174 (+132) (P:  4.69%) (Q: -0.09451) (U: 0.00224) (Q+U: -0.09227) (V:  0.1932)
bestmove f1g2 ponder h6h2

@mooskagh
Copy link
Member

FYI in lectures from DeepMind they said that they tried some heuristics to make A0 play shortest checkmate, but their attempts decreased average strength.
So I'd assume it's not that trivial.
And also, people actually like watching that. :) So unless it improves strength, I don't think it should be merged.
And even if it does improve things, it's still questionable, because of non-zero, added complexity, all that stuff.

@MelleKoning
Copy link
Contributor Author

This line of code seems to stop trolling:

if (q_ > -0.98f && q_ < 0.98f ) { // keep terminal values of -1 and 1 when found

Tested on position:

https://lichess.org/analysis/standard/1B1Q4/6P1/2P5/Q1K5/8/8/8/1k6_w_-_-#0

C:\dev\lc0>lc0pr677 --verbose-move-stats -t 1 --minibatch-size=256 --weights=.\nets\32709
       _
|   _ | |
|_ |_ |_| v0.21.0-dev built Jan 20 2019
position fen 1B1Q4/6P1/2P5/Q1K5/8/8/8/1k6 w - - 5 110
go nodes 50000
Loading weights file from: .\nets\32709
Creating backend [cudnn]...
info depth 1 seldepth 2 time 120 nodes 17 score cp 5674 hashfull 0 nps 141 tbhits 0 pv a5d2 b1a1
info depth 2 seldepth 3 time 222 nodes 56 score cp 1073 hashfull 0 nps 252 tbhits 0 pv a5b4 b1c1 b4a5
info depth 3 seldepth 4 time 285 nodes 88 score cp 3289 hashfull 0 nps 308 tbhits 0 pv a5a1 b1c2 a1c1 c2b3
info depth 3 seldepth 5 time 390 nodes 139 score cp 2219 hashfull 0 nps 356 tbhits 0 pv a5a1 b1c2 a1c1 c2b3 c1b1
info depth 3 seldepth 6 time 403 nodes 141 score cp 2219 hashfull 0 nps 349 tbhits 0 pv a5a1 b1c2 a1c1 c2b3 c1b1 b3c3
info depth 4 seldepth 6 time 531 nodes 210 score cp 5674 hashfull 1 nps 395 tbhits 0 pv a5d2 b1a1 d2d3 a1b2 c5d4 b2c1
info depth 4 seldepth 7 time 676 nodes 284 score cp 5674 hashfull 1 nps 420 tbhits 0 pv a5d2 b1a1 c5b6 a1b1 d2d3 b1c1 b6a7
info depth 4 seldepth 8 time 718 nodes 304 score cp 5674 hashfull 1 nps 423 tbhits 0 pv a5d2 b1a1 d2d3 a1b2 d3d4 b2c2 d4d5 c2c1
info depth 5 seldepth 8 time 870 nodes 418 score cp 5674 hashfull 1 nps 480 tbhits 0 pv a5d2 b1a1 d2d4 a1b1 d4e3 b1a1 e3e4
info depth 5 seldepth 9 time 1067 nodes 526 score cp 5674 hashfull 2 nps 492 tbhits 0 pv a5d2 b1a1 d2d4 a1b1 d4e3 b1a1 e3e4
info depth 5 seldepth 10 time 1438 nodes 777 score cp 5674 hashfull 3 nps 540 tbhits 0 pv a5d2 b1a1 d2d4 a1b1 d4e3 b1a1 e3e4
info depth 5 seldepth 11 time 1591 nodes 846 score cp 5674 hashfull 3 nps 531 tbhits 0 pv a5d2 b1a1 d2d4 a1b1 d4e3 b1a1 e3e4
info depth 5 seldepth 12 time 2258 nodes 1302 score cp 5674 hashfull 5 nps 576 tbhits 0 pv a5d2 b1a1 d2d4 a1b1 d4e3 b1a1 e3e4
info depth 5 seldepth 13 time 3561 nodes 2251 score cp 5674 hashfull 8 nps 632 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d2d3 b1b2 d3c4 b2b1
info depth 6 seldepth 13 time 4675 nodes 3243 score cp 5674 hashfull 11 nps 693 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d2d3 b1b2 d3c4 b2b1
info depth 6 seldepth 14 time 5395 nodes 3907 score cp 5674 hashfull 14 nps 724 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d2d3 b1b2 d3c4 b2b1
info depth 6 seldepth 15 time 6299 nodes 4839 score cp 5674 hashfull 16 nps 768 tbhits 0 pv a5d2 b1a1 c5b5 a1b1 b5b6 b1a1 b6a7 a1b1 a7a8 b1a1 a8a7 a1b1 a7a8 b1a1
info depth 6 seldepth 16 time 8634 nodes 7378 score cp 5674 hashfull 23 nps 854 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8b b1a1 d2d3 a1a2
info depth 7 seldepth 16 time 9353 nodes 8253 score cp 5674 hashfull 25 nps 882 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8n b1a1 c8e7 a1b1 e7f5
info depth 7 seldepth 17 time 11225 nodes 10354 score cp 5674 hashfull 32 nps 922 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8n b1a1 c8e7 a1b1 e7f5
info depth 7 seldepth 18 time 15700 nodes 15849 score cp 5674 hashfull 46 nps 1009 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8n b1a1 c8e7 a1b1 e7f5 b1a1
info depth 7 seldepth 18 time 20753 nodes 22547 score cp 5674 hashfull 61 nps 1086 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8n b1a1 c8e7 a1b1 e7f5 b1a1
info depth 8 seldepth 18 time 24229 nodes 26977 score cp 5674 hashfull 72 nps 1113 tbhits 0 pv a5d2 b1a1 c5d5 a1b1 d5e6 b1a1 c6c7 a1b1 c7c8n b1a1 c8e7 a1b1 e7f5 b1a1
info depth 8 seldepth 18 time 28541 nodes 33042 score cp 5674 hashfull 85 nps 1157 tbhits 0 pv a5d2 b1a1 d2b2 a1b2 d8c7 b2c1 c7c8 c1c2 c8d8 c2c1 d8d1
info string d8d2  (1671) N:       7 (+ 0) (P:  0.84%) (Q:  0.00000) (U: 0.95327) (Q+U:  0.95327) (V:  0.0000) (T)
info string g7g8q (1846) N:      48 (+ 0) (P:  1.10%) (Q:  0.78784) (U: 0.20250) (Q+U:  0.99035) (V:  0.6814)
info string d8g8  (1693) N:      76 (+ 0) (P:  1.07%) (Q:  0.86234) (U: 0.12489) (Q+U:  0.98723) (V:  0.9471)
info string d8c8  (1690) N:      76 (+ 0) (P:  0.99%) (Q:  0.87171) (U: 0.11608) (Q+U:  0.98779) (V:  0.9449)
info string d8d4  (1673) N:      79 (+ 0) (P:  0.89%) (Q:  0.88044) (U: 0.10058) (Q+U:  0.98101) (V:  0.9391)
info string d8d5  (1676) N:      86 (+ 0) (P:  0.97%) (Q:  0.87748) (U: 0.10084) (Q+U:  0.97832) (V:  0.9599)
info string d8h4  (1674) N:      86 (+ 0) (P:  0.91%) (Q:  0.89298) (U: 0.09395) (Q+U:  0.98693) (V:  0.9308)
info string d8b6  (1678) N:      89 (+ 0) (P:  1.07%) (Q:  0.87971) (U: 0.10704) (Q+U:  0.98675) (V:  0.9610)
info string d8h8  (1694) N:      89 (+ 0) (P:  1.12%) (Q:  0.87582) (U: 0.11201) (Q+U:  0.98783) (V:  0.9503)
info string d8d6  (1680) N:      91 (+ 0) (P:  0.93%) (Q:  0.89534) (U: 0.09079) (Q+U:  0.98613) (V:  0.9386)
info string d8f8  (1692) N:      91 (+ 0) (P:  1.01%) (Q:  0.88765) (U: 0.09884) (Q+U:  0.98649) (V:  0.9614)
info string d8e8  (1691) N:      94 (+ 0) (P:  1.09%) (Q:  0.88233) (U: 0.10398) (Q+U:  0.98630) (V:  0.9657)
info string g7g8n (1572) N:      94 (+ 0) (P:  1.03%) (Q:  0.88900) (U: 0.09800) (Q+U:  0.98700) (V:  0.9491)
info string b8h2  (1623) N:      95 (+ 0) (P:  1.02%) (Q:  0.89062) (U: 0.09597) (Q+U:  0.98659) (V:  0.9545)
info string d8c7  (1684) N:      97 (+ 0) (P:  1.16%) (Q:  0.88021) (U: 0.10722) (Q+U:  0.98743) (V:  0.9576)
info string d8e7  (1686) N:     108 (+ 0) (P:  1.27%) (Q:  0.88153) (U: 0.10537) (Q+U:  0.98690) (V:  0.9513)
info string g7g8b (1848) N:     113 (+ 0) (P:  1.26%) (Q:  0.88751) (U: 0.09945) (Q+U:  0.98697) (V:  0.9665)
info string b8e5  (1629) N:     116 (+ 0) (P:  1.46%) (Q:  0.86816) (U: 0.11244) (Q+U:  0.98060) (V:  0.9484)
info string d8f6  (1682) N:     116 (+ 0) (P:  1.21%) (Q:  0.89311) (U: 0.09367) (Q+U:  0.98678) (V:  0.9747)
info string b8g3  (1625) N:     119 (+ 0) (P:  1.49%) (Q:  0.87581) (U: 0.11204) (Q+U:  0.98785) (V:  0.9582)
info string b8a7  (1634) N:     122 (+ 0) (P:  1.40%) (Q:  0.88538) (U: 0.10259) (Q+U:  0.98797) (V:  0.9283)
info string b8d6  (1633) N:     128 (+ 0) (P:  1.54%) (Q:  0.87931) (U: 0.10788) (Q+U:  0.98719) (V:  0.9397)
info string g7g8r (1847) N:     131 (+ 0) (P:  1.26%) (Q:  0.90009) (U: 0.08602) (Q+U:  0.98611) (V:  0.9469)
info string d8g5  (1677) N:     138 (+ 0) (P:  1.31%) (Q:  0.90093) (U: 0.08479) (Q+U:  0.98572) (V:  0.9633)
info string c5c4  (961 ) N:     141 (+ 0) (P:  1.69%) (Q:  0.87954) (U: 0.10756) (Q+U:  0.98710) (V:  0.9548)
info string b8c7  (1636) N:     150 (+ 0) (P:  1.60%) (Q:  0.89089) (U: 0.09586) (Q+U:  0.98674) (V:  0.9502)
info string d8d7  (1685) N:     151 (+ 0) (P:  1.20%) (Q:  0.91462) (U: 0.07101) (Q+U:  0.98563) (V:  0.9551)
info string d8d1  (1670) N:     153 (+ 0) (P:  0.89%) (Q:  0.93323) (U: 0.05209) (Q+U:  0.98533) (V:  0.9759)
info string b8f4  (1627) N:     154 (+ 0) (P:  1.35%) (Q:  0.90717) (U: 0.07870) (Q+U:  0.98586) (V:  0.9670)
info string c5d6  (974 ) N:     155 (+ 0) (P:  1.90%) (Q:  0.87746) (U: 0.10987) (Q+U:  0.98732) (V:  0.9454)
info string c5b4  (960 ) N:     159 (+ 0) (P:  1.75%) (Q:  0.88794) (U: 0.09894) (Q+U:  0.98688) (V:  0.9489)
info string c5b5  (965 ) N:     162 (+ 0) (P:  1.88%) (Q:  0.88244) (U: 0.10405) (Q+U:  0.98649) (V:  0.9611)
info string c5d5  (966 ) N:     184 (+ 0) (P:  2.09%) (Q:  0.88525) (U: 0.10180) (Q+U:  0.98705) (V:  0.9548)
info string c5d4  (962 ) N:     189 (+ 0) (P:  2.36%) (Q:  0.87521) (U: 0.11202) (Q+U:  0.98724) (V:  0.9398)
info string a5a8  (919 ) N:     208 (+ 0) (P:  2.63%) (Q:  0.87319) (U: 0.11347) (Q+U:  0.98666) (V:  0.9570)
info string a5b4  (904 ) N:     210 (+ 0) (P:  2.84%) (Q:  0.86544) (U: 0.12153) (Q+U:  0.98697) (V:  0.9691)
info string a5a7  (916 ) N:     225 (+ 0) (P:  2.81%) (Q:  0.87450) (U: 0.11209) (Q+U:  0.98659) (V:  0.9468)
info string a5b6  (914 ) N:     226 (+ 0) (P:  2.64%) (Q:  0.88181) (U: 0.10511) (Q+U:  0.98691) (V:  0.9612)
info string a5e1  (897 ) N:     238 (+ 0) (P:  2.58%) (Q:  0.88853) (U: 0.09756) (Q+U:  0.98609) (V:  0.9743)
info string c5b6  (972 ) N:     256 (+ 0) (P:  3.05%) (Q:  0.87984) (U: 0.10701) (Q+U:  0.98685) (V:  0.9367)
info string a5c3  (902 ) N:     279 (+ 0) (P:  2.91%) (Q:  0.89172) (U: 0.09392) (Q+U:  0.98564) (V:  0.9760)
info string a5b5  (906 ) N:     303 (+ 0) (P:  3.56%) (Q:  0.88099) (U: 0.10564) (Q+U:  0.98664) (V:  0.9741)
info string a5a6  (913 ) N:     329 (+ 0) (P:  4.24%) (Q:  0.87089) (U: 0.11593) (Q+U:  0.98682) (V:  0.9546)
info string c6c7  (1219) N:     342 (+ 0) (P:  4.04%) (Q:  0.88069) (U: 0.10624) (Q+U:  0.98693) (V:  0.9336)
info string a5a4  (903 ) N:     349 (+ 0) (P:  3.52%) (Q:  0.89511) (U: 0.09082) (Q+U:  0.98592) (V:  0.9622)
info string a5c7  (918 ) N:     373 (+ 0) (P:  4.75%) (Q:  0.87206) (U: 0.11470) (Q+U:  0.98677) (V:  0.9133)
info string a5a3  (900 ) N:     557 (+ 0) (P:  4.57%) (Q:  0.91140) (U: 0.07399) (Q+U:  0.98540) (V:  0.9726)
info string a5a1  (896 ) N:     663 (+ 0) (P:  3.96%) (Q:  0.93105) (U: 0.05378) (Q+U:  0.98483) (V:  0.9683)
info string a5a2  (898 ) N:     786 (+ 0) (P:  4.08%) (Q:  0.93777) (U: 0.04679) (Q+U:  0.98456) (V:  0.9783)
info string d8d3  (1672) N:    3015 (+ 0) (P:  0.89%) (Q:  0.98019) (U: 0.00266) (Q+U:  0.98285) (V:  0.9719)
info string a5d2  (899 ) N:   20795 (+256) (P:  2.82%) (Q:  0.98160) (U: 0.00121) (Q+U:  0.98281) (V:  0.9816)
bestmove a5d2 ponder b1a1

And it also stops the blunder move from #627

C:\dev\lc0>lc0pr677 --verbose-move-stats -t 1 --minibatch-size=256 --weights=.\nets\32709
       _
|   _ | |
|_ |_ |_| v0.21.0-dev built Jan 20 2019
position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 c1e3 e7e5 d4b3 f8e7 f2f3 c8e6 d1d2 h7h5 c3d5 f6d5 e4d5 e6f5 b3a5 b7b6 a5c4 b8d7 a2a4 e8g8 f1e2 a8c8 e1g1 h5h4 h2h3 f5g6 b2b4 d8c7 f1c1 c7b7 c2c3 f8e8 e2f1 c8b8 e3f2 f7f5 d2e1 b7c7 f2h4 e7h4 e1h4 f5f4 a4a5 b6b5 c4d2 d7f6 c3c4 b5c4 d2c4 b8b4 c4b6 c7e7 f1a6 e5e4 h4f4 f6h5 f4e3 e7e5 f3f4 h5f4 a6f1 f4d3 c1d1 e5b2 b6d7 b4b3 a5a6 d3e5 e3g5 b3h3 g5d2 b2b3 d7e5 b3g3 e5g4 g3g4 d2e1 h3h8 a6a7 e4e3 a7a8Q g4f4 g2g3 f4h6
go nodes 50000
info depth 1 seldepth 2 time 110 nodes 9 score cp 348 hashfull 86 nps 81 tbhits 0 pv a8e8 g6e8
info depth 2 seldepth 3 time 180 nodes 11 score cp 277 hashfull 87 nps 61 tbhits 0 pv a8e8 g6e8 f1g2
info depth 2 seldepth 4 time 288 nodes 12 score cp 300 hashfull 87 nps 41 tbhits 0 pv a8e8 g6e8 f1g2 h6h2
info depth 2 seldepth 5 time 351 nodes 16 score cp 317 hashfull 87 nps 45 tbhits 0 pv a8e8 g8h7 a1b1 h6h5 b1a1
info depth 3 seldepth 6 time 401 nodes 17 score cp 216 hashfull 87 nps 42 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5
info depth 3 seldepth 7 time 461 nodes 18 score cp 141 hashfull 87 nps 39 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3
info depth 3 seldepth 8 time 514 nodes 20 score cp 90 hashfull 87 nps 38 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3
info depth 3 seldepth 9 time 579 nodes 21 score cp 44 hashfull 87 nps 36 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3 e1e2
info depth 4 seldepth 9 time 611 nodes 23 score cp 19 hashfull 87 nps 37 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3 e1e2 h2g3
info depth 4 seldepth 10 time 635 nodes 26 score cp -38 hashfull 87 nps 40 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3 e1e2 d3e2
info depth 4 seldepth 11 time 699 nodes 38 score cp -107 hashfull 88 nps 54 tbhits 0 pv a8e8 g6e8 f1g2 h6h2 g1f1 e8b5 d1d3 b5d3 e1e2 d3e2 f1e2
info depth 5 seldepth 11 time 819 nodes 56 score cp 54 hashfull 88 nps 68 tbhits 0 pv f1g2 h6h2 g1f1 e3e2 e1e2 h2h1 f1f2
info depth 6 seldepth 11 time 1139 nodes 111 score cp 98 hashfull 88 nps 97 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a2 g6h5 d1d4 e3e2
info depth 6 seldepth 12 time 1295 nodes 189 score cp 99 hashfull 89 nps 145 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 f8f4
info depth 5 seldepth 12 time 1337 nodes 194 score cp 101 hashfull 89 nps 145 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 f8f4
info depth 6 seldepth 13 time 1417 nodes 221 score cp 104 hashfull 89 nps 155 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e2
info depth 5 seldepth 13 time 1453 nodes 223 score cp 104 hashfull 89 nps 153 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e2 h2g3
info depth 6 seldepth 14 time 1488 nodes 238 score cp 69 hashfull 89 nps 159 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 f8f4 g3f4 d3e2
info depth 6 seldepth 15 time 1558 nodes 270 score cp 21 hashfull 89 nps 173 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 d1d4 e8f8 d4f4 g6d3 e1e2 d3e2 f1e1 h2g2 f4f8
info depth 7 seldepth 16 time 1935 nodes 393 score cp -5 hashfull 90 nps 203 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2c2 d1e1 c2c4
info depth 8 seldepth 17 time 2081 nodes 472 score cp 0 hashfull 91 nps 226 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1e1 b2b1 e1b1
info depth 8 seldepth 18 time 2233 nodes 559 score cp 11 hashfull 91 nps 250 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6
info depth 10 seldepth 19 time 2485 nodes 709 score cp 10 hashfull 92 nps 285 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5
info depth 9 seldepth 19 time 2552 nodes 734 score cp 14 hashfull 92 nps 287 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5
info depth 10 seldepth 20 time 2795 nodes 924 score cp 0 hashfull 93 nps 330 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5
info depth 10 seldepth 21 time 3070 nodes 1098 score cp -4 hashfull 93 nps 357 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4
info depth 11 seldepth 22 time 3364 nodes 1311 score cp -8 hashfull 94 nps 389 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2
info depth 12 seldepth 23 time 3745 nodes 1625 score cp -10 hashfull 96 nps 433 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2 b4b7
info depth 13 seldepth 23 time 4571 nodes 2306 score cp -10 hashfull 98 nps 504 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2 b4b7
info depth 13 seldepth 24 time 4951 nodes 2644 score cp -12 hashfull 99 nps 534 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2 b4b7
info depth 14 seldepth 24 time 6018 nodes 3596 score cp -14 hashfull 103 nps 597 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2 b4b7
info depth 14 seldepth 25 time 6856 nodes 4300 score cp -14 hashfull 105 nps 627 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2a2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4b4 a2d2 b4b7
info depth 15 seldepth 25 time 8581 nodes 5968 score cp -14 hashfull 112 nps 695 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 a4a7 g7g6
info depth 15 seldepth 26 time 9331 nodes 6689 score cp -14 hashfull 114 nps 716 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 a4a7 g7g6
info depth 15 seldepth 27 time 11853 nodes 8731 score cp -15 hashfull 122 nps 736 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 a4a7 g7g6
info depth 16 seldepth 27 time 13752 nodes 10874 score cp -16 hashfull 128 nps 790 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 a4a7 g7g6 a7f7
info depth 16 seldepth 28 time 15990 nodes 13306 score cp -16 hashfull 136 nps 832 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 e4f5 g6f5 d4a4 b2d2 a4a7 g7g6 a7f7 f5e5
info depth 16 seldepth 29 time 18128 nodes 15869 score cp -17 hashfull 144 nps 875 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 d4a4 g6f6 e4f5 f6f5 a4a7 g7g6 a7f7 f5e5
info depth 17 seldepth 29 time 20364 nodes 18421 score cp -17 hashfull 151 nps 904 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 d4a4 g6f6 e4f5 f6f5 a4a7 g7g6 a7f7 f5e5
info depth 17 seldepth 29 time 25426 nodes 24123 score cp -18 hashfull 168 nps 948 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 d4a4 g6f6 e4f5 f6f5 a4a7 g7g6 a7f7 f5e5 f7g7 e5f6 g7d7
info depth 17 seldepth 29 time 26757 nodes 25926 score cp -19 hashfull 173 nps 968 tbhits 0 pv f1g2 h6h2 g1f1 g8h7 a8e8 h8e8 a1a4 e3e2 e1e2 e8e2 a4h4 h2h4 g3h4 e2b2 d1d4 g6f5 g2e4 h7g6 d4a4 g6f6 e4f5 f6f5 a4a7 g7g6 a7f7 f5e5 f7g7 e5f6 g7d7
info string g3g4  (615 ) N:       3 (+ 0) (P:  0.42%) (Q: -0.93623) (U: 0.78974) (Q+U: -0.14649) (V: -0.8087)
info string d1d4  (90  ) N:       5 (+ 0) (P:  0.59%) (Q: -0.91426) (U: 0.74025) (Q+U: -0.17400) (V: -0.5713)
info string e1e3  (111 ) N:       6 (+ 0) (P:  0.70%) (Q: -0.91351) (U: 0.75193) (Q+U: -0.16158) (V: -0.4943)
info string e1a5  (117 ) N:       6 (+ 0) (P:  0.72%) (Q: -0.92850) (U: 0.77263) (Q+U: -0.15587) (V: -0.5710)
info string d1d3  (86  ) N:       6 (+ 0) (P:  0.75%) (Q: -0.93117) (U: 0.80460) (Q+U: -0.12657) (V: -0.5870)
info string e1b4  (114 ) N:       6 (+ 0) (P:  0.77%) (Q: -0.92206) (U: 0.82674) (Q+U: -0.09532) (V: -0.5323)
info string f1b5  (141 ) N:       6 (+ 0) (P:  0.80%) (Q: -0.91163) (U: 0.86076) (Q+U: -0.05087) (V: -0.6664)
info string f1a6  (143 ) N:       7 (+ 0) (P:  0.94%) (Q: -0.96492) (U: 0.88550) (Q+U: -0.07942) (V: -0.8702)
info string e1c3  (109 ) N:       7 (+ 0) (P:  0.95%) (Q: -0.93389) (U: 0.89411) (Q+U: -0.03978) (V: -0.5373)
info string a1a7  (19  ) N:       8 (+ 0) (P:  1.11%) (Q: -0.97984) (U: 0.92611) (Q+U: -0.05373) (V: -0.8387)
info string a1a5  (15  ) N:       9 (+ 0) (P:  1.13%) (Q: -0.97449) (U: 0.84985) (Q+U: -0.12463) (V: -0.7704)
info string e1f2  (107 ) N:      10 (+ 0) (P:  1.31%) (Q: -0.98136) (U: 0.89232) (Q+U: -0.08904) (V: -0.8356)
info string a1a4  (13  ) N:      10 (+ 0) (P:  1.30%) (Q: -0.96241) (U: 0.88684) (Q+U: -0.07557) (V: -0.6241)
info string a1a6  (17  ) N:      10 (+ 0) (P:  1.34%) (Q: -0.97730) (U: 0.91788) (Q+U: -0.05942) (V: -0.7730)
info string d1d2  (81  ) N:      11 (+ 0) (P:  1.18%) (Q: -0.84644) (U: 0.73929) (Q+U: -0.10715) (V: -0.4205)
info string e1d2  (105 ) N:      12 (+ 0) (P:  1.43%) (Q: -0.87750) (U: 0.82456) (Q+U: -0.05294) (V: -0.6075)
info string f1c4  (139 ) N:      13 (+ 0) (P:  1.49%) (Q: -0.88816) (U: 0.80091) (Q+U: -0.08725) (V: -0.7179)
info string a1a3  (10  ) N:      13 (+ 0) (P:  1.57%) (Q: -0.87709) (U: 0.84354) (Q+U: -0.03355) (V: -0.5639)
info string d1b1  (73  ) N:      14 (+ 0) (P:  1.72%) (Q: -0.90136) (U: 0.86420) (Q+U: -0.03716) (V: -0.6309)
info string a8c6  (1610) N:      15 (+ 0) (P:  1.93%) (Q: -0.98063) (U: 0.90882) (Q+U: -0.07182) (V: -0.7676)
info string a8b7  (1612) N:      17 (+ 0) (P:  2.04%) (Q: -0.90491) (U: 0.85087) (Q+U: -0.05404) (V: -0.6325)
info string g1g2  (156 ) N:      21 (+ 0) (P:  2.44%) (Q: -0.89180) (U: 0.83285) (Q+U: -0.05895) (V: -0.7209)
info string a8a5  (1606) N:      21 (+ 0) (P:  2.63%) (Q: -0.93316) (U: 0.90066) (Q+U: -0.03249) (V: -0.7514)
info string a8a3  (1602) N:      22 (+ 0) (P:  2.83%) (Q: -0.98128) (U: 0.92488) (Q+U: -0.05641) (V: -0.7754)
info string d1c1  (74  ) N:      22 (+ 0) (P:  2.70%) (Q: -0.93746) (U: 0.88396) (Q+U: -0.05350) (V: -0.6982)
info string a8a4  (1604) N:      25 (+ 0) (P:  2.90%) (Q: -0.87668) (U: 0.83979) (Q+U: -0.03689) (V: -0.5905)
info string a8d8  (1616) N:      26 (+ 0) (P:  3.34%) (Q: -0.98037) (U: 0.93004) (Q+U: -0.05033) (V: -0.7251)
info string f1d3  (134 ) N:      27 (+ 0) (P:  3.15%) (Q: -0.88528) (U: 0.84600) (Q+U: -0.03928) (V: -0.7237)
info string f1e2  (130 ) N:      28 (+ 0) (P:  3.39%) (Q: -0.94088) (U: 0.88015) (Q+U: -0.06073) (V: -0.8237)
info string a8b8  (1614) N:      28 (+ 0) (P:  3.32%) (Q: -0.90746) (U: 0.86036) (Q+U: -0.04709) (V: -0.6739)
info string a1c1  (1   ) N:      29 (+ 0) (P:  3.68%) (Q: -0.98020) (U: 0.92311) (Q+U: -0.05708) (V: -0.8218)
info string a8a2  (1600) N:      29 (+ 0) (P:  3.40%) (Q: -0.89047) (U: 0.85158) (Q+U: -0.03890) (V: -0.5420)
info string a8c8  (1615) N:      30 (+ 0) (P:  3.57%) (Q: -0.90435) (U: 0.86594) (Q+U: -0.03841) (V: -0.5588)
info string a8a7  (1611) N:      34 (+ 0) (P:  3.99%) (Q: -0.91320) (U: 0.85781) (Q+U: -0.05539) (V: -0.5318)
info string e1e2  (106 ) N:      35 (+ 0) (P:  3.92%) (Q: -0.86730) (U: 0.81868) (Q+U: -0.04862) (V: -0.3551)
info string a8a6  (1608) N:      37 (+ 0) (P:  4.41%) (Q: -0.92420) (U: 0.87284) (Q+U: -0.05136) (V: -0.6046)
info string a1b1  (0   ) N:      37 (+ 0) (P:  4.77%) (Q: -0.98082) (U: 0.94502) (Q+U: -0.03580) (V: -0.7698)
info string a1a2  (7   ) N:      39 (+ 0) (P:  4.50%) (Q: -0.88101) (U: 0.84698) (Q+U: -0.03402) (V: -0.3485)
info string f1h3  (138 ) N:      42 (+ 0) (P:  3.58%) (Q: -0.67043) (U: 0.62668) (Q+U: -0.04375) (V: -0.0918)
info string a8e8  (1617) N:      88 (+ 0) (P:  5.98%) (Q: -0.54815) (U: 0.50524) (Q+U: -0.04292) (V:  0.5653)
info string f1g2  (132 ) N:   25111 (+264) (P:  7.30%) (Q: -0.04261) (U: 0.00216) (Q+U: -0.04045) (V: -0.0665)
bestmove f1g2 ponder h6h2

More testing is probably needed though.

@MelleKoning
Copy link
Contributor Author

MelleKoning commented Jan 20, 2019

Played a few testgames. It seems PR677 knows how to win, but the scores it is showing while mating is actually opposite. Weird, and I guess this shows that either the 'flip' is going wrong somewhere in the searchtree or else this small change to skip averaging nodes has now introduced a new bug?

image

@ddobbelaere
Copy link
Contributor

The reason we are seeing bogus evaluations is because of the employed conversion of the root Q value to centipawns in search.cc:

uci_info.score = 290.680623072 * tan(1.548090806 * edge.GetQ(0));

which implicitly assumes that the magnitude of Q is not bigger than 1. Changing edge.GetQ(0) to min(1, max(-1, edge.GetQ(0))) would solve at least this aspect.

@mooskagh mooskagh added the not for merge Experimental code which is not intended to be merged into the master label Jan 21, 2019
@ddobbelaere
Copy link
Contributor

That being said, I concur with @mooskagh that the solution to the problem lies elsewhere (certainty propagation for example).

Nothing fundamental has changed for unforced mates that tend to pull the search unjustifiedly to a certain inferior move.

@MelleKoning
Copy link
Contributor Author

Hi @ddobbelaere thanks for your comments.

  1. the last commit(s) ensure there are no Q's bigger than one.

  2. can you explain the pulling towards unforced mates?
    That is, understandbly MCTS is not alpha-beta with pruning, but how come the current search would be pulling into such a 'profitable value' because if that is the case that would than also be the case without this change, or am I missing something obvious?

@ddobbelaere
Copy link
Contributor

ddobbelaere commented Jan 21, 2019

  1. Apparently not, simple case where Q get as low as -5.34902:
./build_pr677/release/lc0 -l lc0log.txt --verbose-move-stats --fpu-reduction=0
       _
|   _ | |
|_ |_ |_| v0.21.0-dev built Jan 21 2019
position fen 6k1/pb3ppp/1pq5/2p5/2P5/1PQ5/P4PPP/1B4K1 w - - 0 1
go nodes 500
Found pb network file: ./build/release/35114_17c19e7105d4a4f10310e617ac055677e88ebc85fea25a75d86a9b18277b0f61
Creating backend [blas]...
BLAS, maximum batch size set to 256
BLAS vendor: OpenBlas.
OpenBlas [OpenBLAS 0.3.5 DYNAMIC_ARCH NO_AFFINITY Haswell SINGLE_THREADED].
OpenBlas found 1 Haswell core(s).
OpenBLAS using 1 core(s) for this backend.
BLAS max batch size is 256.
info depth 1 seldepth 2 time 218 nodes 2 score cp 3 hashfull 0 nps 9 tbhits 0 pv f2f3 c6d6
info depth 2 seldepth 3 time 418 nodes 16 score cp 37 hashfull 0 nps 38 tbhits 0 pv f2f3 c6d6 b1c2
info depth 2 seldepth 4 time 629 nodes 40 score cp 47 hashfull 0 nps 63 tbhits 0 pv f2f3 c6c7 c3d2 g7g6
info depth 3 seldepth 4 time 631 nodes 73 score cp 9 hashfull 0 nps 115 tbhits 0 pv f2f3 c6d6 c3d3 d6d3
info depth 3 seldepth 5 time 799 nodes 107 score cp -2 hashfull 0 nps 133 tbhits 0 pv f2f3 c6d6 b1c2 g7g6 h2h4
info depth 3 seldepth 5 time 1001 nodes 171 score cp 50 hashfull 1 nps 170 tbhits 0 pv c3g3 g7g6 h2h3 c6d7 g3b8
info depth 3 seldepth 6 time 1021 nodes 189 score cp 49 hashfull 1 nps 185 tbhits 0 pv c3g3 g7g6 h2h4 c6f6 g3b8 g8g7
info depth 3 seldepth 6 time 1303 nodes 266 score cp 11 hashfull 1 nps 204 tbhits 0 pv f2f3 c6d6 c3d3 d6d3 b1d3 g8f8
info depth 4 seldepth 7 time 1754 nodes 378 score cp 0 hashfull 2 nps 215 tbhits 0 pv f2f3 c6d6 c3d3 d6d3 b1d3 b7c6 g1f2
info depth 4 seldepth 8 time 1990 nodes 453 score cp -13 hashfull 2 nps 227 tbhits 0 pv f2f3 c6d6 c3d3 d6d3 b1d3 g8f8 d3h7 g7g6
info depth 4 seldepth 9 time 2351 nodes 540 score cp -15 hashfull 2 nps 229 tbhits 0 pv f2f3 c6d6 c3d3 d6d3 b1d3 b7c6 g1f2 g7g6 f2e3
info string c3b4  (484 ) N:       1 (+ 0) (P:  0.70%) (Q: -0.98621) (U: 0.24797) (Q+U: -0.73824) (V: -0.9862) 
info string c3f6  (494 ) N:       1 (+ 0) (P:  0.66%) (Q: -0.97345) (U: 0.23533) (Q+U: -0.73812) (V: -0.9735) 
info string c3g7  (496 ) N:       1 (+ 0) (P:  0.68%) (Q: -0.90114) (U: 0.24074) (Q+U: -0.66040) (V: -0.9011) 
info string c3a5  (488 ) N:       1 (+ 0) (P:  0.93%) (Q: -0.98007) (U: 0.32787) (Q+U: -0.65219) (V: -0.9801) 
info string g1h1  (153 ) N:       1 (+ 0) (P:  0.63%) (Q: -0.86166) (U: 0.22405) (Q+U: -0.63761) (V: -0.8617) 
info string b1g6  (43  ) N:       1 (+ 0) (P:  0.82%) (Q: -0.91310) (U: 0.29180) (Q+U: -0.62129) (V: -0.9131) 
info string a2a4  (207 ) N:       1 (+ 0) (P:  0.72%) (Q: -0.79205) (U: 0.25519) (Q+U: -0.53685) (V: -0.7920) 
info string c3a1  (466 ) N:       1 (+ 0) (P:  0.85%) (Q: -0.80299) (U: 0.30167) (Q+U: -0.50132) (V: -0.8030) 
info string a2a3  (204 ) N:       1 (+ 0) (P:  0.87%) (Q: -0.80789) (U: 0.30721) (Q+U: -0.50068) (V: -0.8079) 
info string c3d4  (486 ) N:       1 (+ 0) (P:  1.34%) (Q: -0.96760) (U: 0.47486) (Q+U: -0.49274) (V: -0.9676) 
info string b3b4  (453 ) N:       1 (+ 0) (P:  0.84%) (Q: -0.75312) (U: 0.29775) (Q+U: -0.45538) (V: -0.7531) 
info string c3c1  (468 ) N:       1 (+ 0) (P:  0.90%) (Q: -0.76588) (U: 0.31855) (Q+U: -0.44732) (V: -0.7659) 
info string c3b2  (472 ) N:       1 (+ 0) (P:  0.97%) (Q: -0.76790) (U: 0.34368) (Q+U: -0.42422) (V: -0.7679) 
info string b1f5  (41  ) N:       1 (+ 0) (P:  1.10%) (Q: -0.74843) (U: 0.38826) (Q+U: -0.36017) (V: -0.7484) 
info string g2g4  (378 ) N:       1 (+ 0) (P:  1.34%) (Q: -0.78861) (U: 0.47445) (Q+U: -0.31416) (V: -0.7886) 
info string h2h4  (403 ) N:       1 (+ 0) (P:  1.23%) (Q: -0.70728) (U: 0.43582) (Q+U: -0.27147) (V: -0.7073) 
info string f2f4  (351 ) N:       1 (+ 0) (P:  1.67%) (Q: -0.81529) (U: 0.59144) (Q+U: -0.22385) (V: -0.8153) 
info string b1d3  (37  ) N:       1 (+ 0) (P:  1.55%) (Q: -0.73203) (U: 0.54754) (Q+U: -0.18450) (V: -0.7320) 
info string c3c2  (473 ) N:       1 (+ 0) (P:  1.46%) (Q: -0.69573) (U: 0.51687) (Q+U: -0.17886) (V: -0.6957) 
info string c3e1  (470 ) N:       1 (+ 0) (P:  1.45%) (Q: -0.63647) (U: 0.51417) (Q+U: -0.12230) (V: -0.6365) 
info string b1c2  (32  ) N:       1 (+ 0) (P:  1.86%) (Q: -0.75595) (U: 0.65764) (Q+U: -0.09831) (V: -0.7560) 
info string b1h7  (45  ) N:       1 (+ 0) (P:  1.09%) (Q: -0.37987) (U: 0.38718) (Q+U:  0.00731) (V: -0.3799) 
info string c3e5  (492 ) N:       2 (+ 0) (P:  1.54%) (Q: -5.20712) (U: 0.36340) (Q+U: -4.84372) (V: -0.4342) 
info string c3e3  (479 ) N:       2 (+ 0) (P:  1.90%) (Q: -5.27259) (U: 0.44905) (Q+U: -4.82353) (V: -0.5652) 
info string h2h3  (400 ) N:       2 (+ 0) (P:  2.24%) (Q: -5.34197) (U: 0.52939) (Q+U: -4.81258) (V: -0.7039) 
info string c3d2  (474 ) N:       2 (+ 0) (P:  2.34%) (Q: -5.27360) (U: 0.55353) (Q+U: -4.72007) (V: -0.5672) 
info string g2g3  (374 ) N:       2 (+ 0) (P:  3.17%) (Q: -5.34902) (U: 0.74896) (Q+U: -4.60006) (V: -0.7180) 
info string b1e4  (39  ) N:       2 (+ 0) (P:  3.28%) (Q: -0.75439) (U: 0.77454) (Q+U:  0.02015) (V: -0.6092) 
info string c3d3  (478 ) N:       3 (+ 0) (P:  1.66%) (Q: -3.47223) (U: 0.29316) (Q+U: -3.17907) (V: -0.2928) 
info string g1f1  (152 ) N:       3 (+ 0) (P:  3.41%) (Q: -0.62495) (U: 0.60414) (Q+U: -0.02080) (V: -0.6369) 
info string c3f3  (480 ) N:      10 (+ 0) (P:  5.45%) (Q: -0.36112) (U: 0.35085) (Q+U: -0.01027) (V: -0.3017) 
info string c3h3  (482 ) N:      11 (+ 0) (P:  4.73%) (Q: -0.27235) (U: 0.27929) (Q+U:  0.00693) (V: -0.1354) 
info string c3g3  (481 ) N:     171 (+ 0) (P: 12.57%) (Q: -0.04683) (U: 0.05175) (Q+U:  0.00492) (V: -0.0011) 
info string f2f3  (346 ) N:     307 (+ 0) (P: 34.05%) (Q: -0.03538) (U: 0.07829) (Q+U:  0.04291) (V:  0.0081) 
bestmove f2f3 ponder c6d6
  1. Lets say move a is an inferior opponent move that allows mate by us. This move after a while still gets explored (due to increasing U value over time) and the mate is found, leading to approximately Q = 10 (by this PR). This high Q value is propagated further up the tree and has the effect that the position that allowed the opponent to blunder is evaluated much better than it should be (as the opponent will not blunder anyway). You are basically saying: the chance I win this position is 1000%, please update your averages further up the tree accordingly.

@MelleKoning
Copy link
Contributor Author

Hi @ddobbelaere

Thank you.

  1. and 2) so because no division over sibling nodes is made higher up the tree we see values otside of 1, which in turn leads to wrong assumptions of mating as oppnent is not going in assumed blunder direction?

Interesting. Might be the fen positions I tested were already winning anyway.

The problem of #627 is still there in mainline and I'm curious when the termnal branch gets merged as that seems to fix certain scenario's.
I'm also very n favor of Certainty propagation. What PR is that?
Thank you for clarifying,

@MelleKoning MelleKoning deleted the terminal-exception branch January 26, 2019 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not for merge Experimental code which is not intended to be merged into the master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lc0 missing mate in #1 in tight endgame
5 participants