lichess.org
Donate

Engine arrow styling based on centipawn loss threshold

Any chance LichessTools allow you to style the analysis board engine arrows based on a centipawn loss threshold relative to the best move? Either only show arrows that are within a certain centipawn loss of the best move, or fade them out to disappear or be thin by a centipawn loss threshold? If not, is this easy to do with something like tampermonkey? Thanks!

Any chance LichessTools allow you to style the analysis board engine arrows based on a centipawn loss threshold relative to the best move? Either only show arrows that are within a certain centipawn loss of the best move, or fade them out to disappear or be thin by a centipawn loss threshold? If not, is this easy to do with something like tampermonkey? Thanks!

The Lichess code will calculate the winning chances changes for each engine move and show the ones that don't change them with more than 20%. Based on that percentage it renders the size of the arrow (rounded to a value from 2 to 12).

The code is not something I can overwrite and it doesn't preserve information related to centipawns or even that winning percentage.

Moreover, there is a design reason why the value for width is integer and capped between 2 and 12. CSS style rules are based on the fact that arrows will have a specific set of sizes.

So the answer is no, it can't be easily done, if at all. The only thing one can do is display a completely new set of arrows based on the values in the computer eval object.

The [Lichess code](https://github.com/lichess-org/lila/blob/d163dd0cef6cb340be38a70f51d07a44093be4ac/ui/analyse/src/autoShape.ts#L142) will calculate the winning chances changes for each engine move and show the ones that don't change them with more than 20%. Based on that percentage it renders the size of the arrow (rounded to a value from 2 to 12). The code is not something I can overwrite and it doesn't preserve information related to centipawns or even that winning percentage. Moreover, there is a design reason why the value for width is integer and capped between 2 and 12. CSS style rules are based on the fact that arrows will have a specific set of sizes. So the answer is no, it can't be easily done, if at all. The only thing one can do is display a completely new set of arrows based on the values in the computer eval object.

Ah, that's too bad. Thank you for the detailed explanation!

Ah, that's too bad. Thank you for the detailed explanation!

Join the L1Chess Tools Users Team team, to post in this forum