lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.63k stars 2.28k forks source link

Arrows with varying sizes should be added in multiple lines of threats #7882

Open klaurence opened 3 years ago

klaurence commented 3 years ago

Currently, arrows of best moves found by Stockfish are shown in varying sizes. The arrow of the best move is colored blue and the other best moves are partly transparent. An example for this is shown below. Note that three multiple best lines by Black are being shown in the side (Qxe4+, Be6, a6) and that there are arrows depicting the first moves of these lines.

best_lines_example_game

Currently, when threats are being shown, only the best threat by White is depicted with arrows. An example is shown below. Note that the only arrows depict 10... Qxe4+ (Black's best move) and 10. f3 (White's best move/threat), despite that there are three multiple threat lines by White shown in the side (f3, Bd3, Be3).

threats_example_game

I think that the multiple threat lines by White (f3, Bd3, Be3) should be depicted with arrows in a way similar to how the multiple best lines by Black (Qxe4+, Be6, a6) are shown.

wnbeser commented 7 months ago

There are some exceptional situations where multiple threats arrows are drawn properly in multipv mode. This is when all of the threats are equally threatening (have the same eval). This is easiest to see there are multiple mate-in-X threat-lines. Another case where I run into this is when many threat lines have 0.0 or near 0.0 eval, which results in threat arrows phasing in and out of existence chaotically as the evals of the fluctuate around 0.0.

So it's pretty safe to say that the bug is caused (at least partly) by threat arrow rendering checking for eval equality.

(Note how there's no arrow for the #-2 threat line) screencap_24-03-16_22-49-27