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

Time-management fix in MultiPV mode. #3729

Closed

Conversation

joergoster
Copy link
Contributor

When playing games in MultiPV mode we must take care to only track the best move changing for the first PV line.
Otherwise, SF will spend most of its time for the initial moves after the book exit.

This has been observed and reported on discord, but can also be seen in games
played in Stefan Pohl's MultiPV experiment.

Tested with MultiPV=4.

STC https://tests.stockfishchess.org/tests/view/615c24b59d256038a969b990
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 1744 W: 694 L: 447 D: 603
Ptnml(0-2): 32, 125, 358, 278, 79

LTC: https://tests.stockfishchess.org/tests/view/615c31769d256038a969b993
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 2048 W: 723 L: 525 D: 800
Ptnml(0-2): 10, 158, 511, 314, 31

Bench: 5714575

@joergoster
Copy link
Contributor Author

A sample game where you can see SF14 with MultiPV=7 using almost all of its time for the very first moves, and playing on increment only, more or less, from move 20 and onward.

[Event "MultiPV testing"]
[Site "?"]
[Date "2021.09.28"]
[Round "2"]
[White "Stockfish 14  avx2 pv=7"]
[Black "KomDragon 2.5 avx2 pv=1"]
[Result "1/2-1/2"]
[ECO "A05"]
[PlyCount "104"]
[EventDate "2021.??.??"]
[TimeControl "180+1"]

1. Nf3 {book} Nf6 {book} 2. c4 {book} b6 {book} 3. Nc3 {book} Bb7 {book} 4. d4
{book} e6 {book} 5. Bg5 {book} Be7 {book} 6. e3 {book} Ne4 {book} 7. Nxe4 {
[%eval 58,23] [%emt 0:00:16]} Bxe4 {[%eval -58,20] 4.0s} 8. h4 {[%eval 35,24] 
[%emt 0:00:29]} h6 {[%eval -41,23] [%emt 0:00:10]} 9. Bf4 {[%eval 50,21] [%emt
0:00:13]} d6 {[%eval -55,23] 5.0s} 10. Bd3 {[%eval 30,22] [%emt 0:00:27]} Bxd3
{[%eval -50,23] 5.2s} 11. Qxd3 {[%eval 45,21] [%emt 0:00:24]} Nd7 {[%eval -48,
23] 7.6s} 12. e4 {[%eval 42,21] [%emt 0:00:22]} O-O {[%eval -47,22] 5.6s} 13.
Rd1 {[%eval 46,20] [%emt 0:00:19]} Qc8 {[%eval -41,24] 8.9s} 14. b3 {[%eval 34,
20] [%emt 0:00:17]} Rd8 {[%eval -33,22] 7.7s} 15. Qe2 {[%eval 32,20] [%emt 0:
00:14]} e5 {[%eval -26,22] 3.3s} 16. Bg3 {[%eval 34,20] 8.0s} Re8 {[%eval -23,
25] 7.0s} 17. O-O {[%eval 39,17] 2.4s} Bf6 {[%eval -15,26] 4.1s} 18. dxe5 {
[%eval 24,16] 1.3s} Bxe5 {[%eval -21,24] 5.2s} 19. Nxe5 {[%eval 46,16] 1.1s}
Nxe5 {[%eval 0,23] 3.0s} 20. f3 {[%eval 36,15] 1.0s} Qe6 {[%eval 0,23] 3.8s}
21. Rd5 {[%eval 37,14] 1.0s} Qg6 {[%eval 0,27] 9.2s} 22. Qf2 {[%eval 28,15] 1.
00s} f6 {[%eval 0,27] 3.5s} 23. a4 {[%eval 34,14] 1.0s} a5 {[%eval 0,24] 5.6s}
24. Bf4 {[%eval 8,15] 1.0s} Qf7 {[%eval 0,25] 6.1s} 25. Qg3 {[%eval 26,14] 1.0s
} Kh8 {[%eval -1,26] 3.4s} 26. Bd2 {[%eval 20,15] 1.0s} Re6 {[%eval 0,23] 2.4s}
27. Qf4 {[%eval 23,14] 1.00s} Rf8 {[%eval 0,26] [%emt 0:00:11]} 28. Bc3 {
[%eval 28,14] 1.0s} Ng6 {[%eval -5,25] 3.9s} 29. Qg3 {[%eval 33,16] 1.00s} Kg8
{[%eval -7,24] 4.8s} 30. Kh2 {[%eval 46,15] 1.0s} Rb8 {[%eval -8,24] 5.2s} 31.
Rfd1 {[%eval 44,15] 1.00s} Ne7 {[%eval 30,24] 3.8s} 32. Rb5 {[%eval 42,15] 1.0s
} c6 {[%eval 14,26] 5.7s} 33. Rxd6 {[%eval -1,14] 1.00s} Rxd6 {[%eval 0,23] 4.
1s} 34. Qxd6 {[%eval 15,15] 1.0s} Qe8 {[%eval 0,22] 2.0s} 35. Rh5 {[%eval -23,
15] 1.0s} Kh7 {[%eval 19,24] 3.1s} 36. g4 {[%eval 0,15] 1.0s} Rd8 {[%eval 0,24]
4.3s} 37. Qe6 {[%eval 41,13] 0.58s} Qf8 {[%eval 0,25] 3.0s} 38. c5 {[%eval 5,
15] 1.3s} Rd3 {[%eval 0,25] 2.7s} 39. Be1 {[%eval 0,14] 1.1s} bxc5 {[%eval 0,
20] 5.4s} 40. Rxc5 {[%eval -13,13] 1.0s} Qb8+ {[%eval 0,23] 6.6s} 41. e5 {
[%eval 0,15] 1.0s} Rxf3 {[%eval 0,25] 2.7s} 42. Kg2 {[%eval 0,14] 1.0s} Rxb3 {
[%eval 0,26] 2.9s} 43. Qxe7 {[%eval 0,13] 1.0s} Rb2+ {[%eval 0,27] 2.5s} 44.
Bf2 {[%eval 0,16] 1.0s} Qb4 {[%eval 0,31] 2.0s} 45. exf6 {[%eval 0,13] 1.00s}
Qxg4+ {[%eval 0,33] 2.1s} 46. Kf1 {[%eval 0,32] 0.37s} Rb1+ {[%eval 0,35] 1.6s}
47. Be1 {[%eval 0,16] 0.59s} Qf3+ {[%eval 0,37] 1.8s} 48. Kg1 {[%eval 0,33] 0.
20s} Qg3+ {[%eval 0,37] 2.2s} 49. Kf1 {[%eval 0,29] 0.82s} Qh3+ {[%eval 0,38]
3.0s} 50. Kg1 {[%eval 0,21] 0.94s} Qg3+ {[%eval 0,40] 1.9s} 51. Kf1 {[%eval 0,
31] 1.4s} Qh3+ {[%eval 0,40] 3.4s} 52. Kg1 {[%eval 0,24] 1.3s} Qg3+ {[%eval 0,
43] 1.3s, Draw by 3-fold repetition} 1/2-1/2

@vondele vondele added the to be merged Will be merged shortly label Oct 5, 2021
@snicolet snicolet closed this in 371b522 Oct 6, 2021
@snicolet
Copy link
Member

snicolet commented Oct 6, 2021

Merged via 371b522, congrats :-)

proukornew pushed a commit to proukornew/Stockfish that referenced this pull request Oct 8, 2021
When playing games in MultiPV mode we must take care to only track the
best move changing for the first PV line. Otherwise, SF will spend most
of its time for the initial moves after the book exit.

This has been observed and reported on Discord, but can also be seen in
games played in Stefan Pohl's MultiPV experiment.

Tested with MultiPV=4.

STC:
https://tests.stockfishchess.org/tests/view/615c24b59d256038a969b990
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 1744 W: 694 L: 447 D: 603
Ptnml(0-2): 32, 125, 358, 278, 79

LTC:
https://tests.stockfishchess.org/tests/view/615c31769d256038a969b993
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 2048 W: 723 L: 525 D: 800
Ptnml(0-2): 10, 158, 511, 314, 31

closes official-stockfish#3729

Bench: 5714575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants