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

Add --accept-bounds option #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Craftyawesome
Copy link

If enabled, removes upper/lowerbound so lichess won't hide it.

@niklasf
Copy link
Member

niklasf commented Dec 10, 2022

Thanks. Do you have any particular engines in mind?

@Craftyawesome
Copy link
Author

This should affect most modern AB engines. It will show more up to date info at the cost of often showing 1-2 ply PVs.

Sometimes it takes a while to resolve a fail. For an extreme example on SF 15.1:

position fen 8/8/2Pk2p1/4pp1p/1P6/P7/1P3PP1/6K1 b - - 0 1
go depth 49
...
info depth 48 seldepth 54 multipv 1 score cp 0 nodes 39863146 nps 2087075 hashfull 1000 tbhits 0 time 19100 pv d6c6 f2f4 e5f4 a3a4 g6g5 b4b5 c6b6 g1h1 b6c5 b2b4 c5b6 h1h2 g5g4 h2g1 h5h4 g1f2 b6a7 a4a5 a7b7 b5b6 b7c6 f2f1 f4f3 g2f3 h4h3 f3g4 f5g4 f1g1 g4g3 g1h1 c6b7 b4b5 h3h2 h1g2 b7c8 a5a6 c8b8 g2h1 b8a8 b6b7 a8a7 b7b8q a7b8 b5b6 b8c8 h1g2 c8b8 b6b7 b8a7 g2h1 a7b8
info depth 49 currmove d6c6 currmovenumber 1
info depth 49 currmove g6g5 currmovenumber 2
info depth 49 seldepth 49 multipv 1 score cp 2 lowerbound nodes 62118774 nps 2052698 hashfull 1000 tbhits 0 time 30262 pv g6g5
info depth 48 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 5 lowerbound nodes 73104573 nps 2028372 hashfull 1000 tbhits 0 time 36041 pv g6g5
info depth 47 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 9 lowerbound nodes 80706201 nps 2021040 hashfull 1000 tbhits 0 time 39933 pv g6g5
info depth 46 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 14 lowerbound nodes 87316707 nps 2019583 hashfull 1000 tbhits 0 time 43235 pv g6g5
info depth 45 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 21 lowerbound nodes 93177710 nps 2019324 hashfull 1000 tbhits 0 time 46143 pv g6g5
info depth 44 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 30 lowerbound nodes 98554771 nps 2024044 hashfull 1000 tbhits 0 time 48692 pv g6g5
info depth 43 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 42 lowerbound nodes 104496250 nps 2031420 hashfull 1000 tbhits 0 time 51440 pv g6g5
info depth 42 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 57 lowerbound nodes 111806897 nps 2049133 hashfull 1000 tbhits 0 time 54563 pv g6g5
info depth 41 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 77 lowerbound nodes 120539337 nps 2069486 hashfull 1000 tbhits 0 time 58246 pv g6g5
info depth 40 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 101 lowerbound nodes 131606520 nps 2099824 hashfull 1000 tbhits 0 time 62675 pv g6g5
info depth 39 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 132 lowerbound nodes 146389441 nps 2105171 hashfull 1000 tbhits 0 time 69538 pv g6g5
info depth 38 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 172 lowerbound nodes 163888421 nps 2097100 hashfull 1000 tbhits 0 time 78150 pv g6g5
info depth 37 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 222 lowerbound nodes 183794035 nps 2072670 hashfull 1000 tbhits 0 time 88675 pv g6g5
info depth 36 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 285 lowerbound nodes 210702859 nps 2066808 hashfull 1000 tbhits 0 time 101946 pv g6g5
info depth 35 currmove g6g5 currmovenumber 1
info depth 49 seldepth 49 multipv 1 score cp 364 lowerbound nodes 254757666 nps 2015169 hashfull 1000 tbhits 0 time 126420 pv g6g5
info depth 34 currmove g6g5 currmovenumber 1
info depth 34 currmove d6c6 currmovenumber 2
info depth 34 currmove h5h4 currmovenumber 3
info depth 34 currmove f5f4 currmovenumber 4
info depth 34 currmove e5e4 currmovenumber 5
info depth 34 currmove d6c7 currmovenumber 6
info depth 34 currmove d6d5 currmovenumber 7
info depth 34 currmove d6e6 currmovenumber 8
info depth 34 currmove d6e7 currmovenumber 9
info depth 49 seldepth 49 multipv 1 score cp 352 nodes 284234680 nps 1989519 hashfull 1000 tbhits 0 time 142866 pv g6g5 b4b5 e5e4 a3a4 h5h4 a4a5 d6c7 g1f1 g5g4 g2g3 h4h3 b2b4 f5f4 g3f4 g4g3 f2g3 e4e3 f4f5 h3h2 f1g2 h2h1q g2h1 e3e2 h1h2 e2e1q f5f6 e1f2 h2h3 f2f5 h3h2 f5f6
bestmove g6g5 ponder b4b5

Defaults will not output between time 19100 and 142866, and will show the wrong move until 142866. Showing lowerbounds will show the correct move at time 30262 and eval will continue climbing.

@niklasf
Copy link
Member

niklasf commented Dec 10, 2022

I guess then including these should be the one and only behavior. Is there any convention that GUIs use to distinguish displayed evaluations like these?

@dav1312
Copy link

dav1312 commented Dec 10, 2022

image

Arena shows a "+" next to the depth for upperbounds and a "-" for lowerbounds but I found that to be pretty confusing

@Craftyawesome
Copy link
Author

Arena will show them and note them with a + or - after depth. But the consequence of short PVs are nearly nothing because it shows previous outputs.
Nibbler is the same as this PR, ignores by default but you can turn it on.
TCEC will show it and will add the old PV if it's the same move. It will denote the end of real PV in red. Although viewers there will be more familiar with engines than the average lichess user.
Chesscom doesn't seem to show it.
My assumption is that GUIs that show previous outputs will almost always show them but GUIs that only show current outputs will generally not.

Keep in mind that usually SF usually doesn't take as long as my example to stop giving upper/lowerbounds. For a lot of positions it isn't really helpful.

Maybe a lichess-side heuristic would be better? Like only show if different move and/or big enough eval difference? I assume lichess intentionally doesn't show bounds.

@niklasf
Copy link
Member

niklasf commented Dec 10, 2022

Thanks for the overview.

I'd love to find a heuristic that can be used all the time, rather than adding an option that barely anyone will know to enable. We can try different ideas and ask for user feedback.

So far, not much thought went into handling these on Lichess side. But we did observe that users dislike short PVs, or even assume that the engine is weak/bad if it can "look only two moves ahead".

Candidates for icons: ↥↧

@Craftyawesome
Copy link
Author

An option is to avoid bothering with the GUI. 2 ply is upperbound, 1 ply is lowerbound. And it might be overkill for the average user to know about upper/lowerbounds anyway?

If I had to give a suggestion:
Always show if move changes
If move is same, only show if >20 centipawn difference.
Maybe require two consecutive upper/lowerbounds to show? I think another output will tend to show in a reasonable time.

If enabled, removes upper/lowerbound so lichess won't hide it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants