
Brilliant/good/best move detection on lichess.org!
... but what does it mean?TLDR; version
Install the LiChess Tools browser extension and enable Extra Analysis Charting -> "Find interesting moves" and "... more moves".
Long version
This has been a feature long time requested by players, mostly from people who were motivated by the badgification system on chess dot com which does this: analyses your game, shows you a nice summary with a human avatar suggesting things, but mostly shows you which moves were brilliant, best, great, and good. In comparison, Lichess seems bleak, always busting your balls about where you went wrong.
Now, there is a very good reason why Lichess has stubbornly refused to implement this feature: it's a gimmick. There is no objective evaluation of a position, only what a particular brand and version of an engine finds at a specific ply or node depth. Is that the best move? No one can tell, because there is no one move which is subjectively best. If that were the case, there would be only one main line in the entirety of chess. Even on chess dot com the evaluation is based on neural network statistics, on the rating of the players and other factors: it's a guess.
But let's assume that Stockfish is our computer god overlord and its always consistently right. Can we use that, then? Well, yes, and we do. Lichess uses it to crush your dreams and hopes telling you how far you deviated from that best move. Assuming SF knows what the best move is, any other move is inferior. The objective truth, then, is that you can either be best or not best. There is only one brilliant move and the engine found it.
Every month or so someone comes asking for the implementation of this feature, though, and even says things like "it should be easy to implement". Well, yes, again, it is easy to implement. The problem is that it is mostly meaningless.
LiChess Tools
If you've been living under a rock and don't know about the greatest achievement in both chess and software development that is the browser extension I am developing, you now have the opportunity to get educated. It's a one click install of a tool that has a 77% chance of having the feature which does exactly what you want most. And other 100+ features that you had no idea you ever needed.
Humor aside, everything this extension does is configurable in the Lichess Preferences menu and one of the features that it now has is... finding Brilliant/Best/Good moves! All you have to do is enable the Find interesting move setting in the Extra Analysis Charting feature (it should be enabled by default) and then enable the ... more moves setting in the same feature.
Initially, I've implemented an algorithm to try to find brilliant moves, but since this is not something that can be objectively calculated - especially without access to server statistics, I've decided to call them interesting moves. They may be brilliant or perhaps not. For sure what is brilliant to some it's not brilliant for Magnus. However, if you are so inclined, with the new setting you get bolder evaluations: you get the brilliants, the best, the good and the interesting.
How it works
The server side analysis of Lichess uses a system called Fishnet, which spreads chess analysis between multiple computers from volunteers who donate their spare CPU for this. Unfortunately this means the depth of analysis is pretty low, around 16, and the evaluation could change, maybe not dramatically, but significantly, if we were to use a different depth.
The data returned is the eval for each move and, on mistakes, the best move.. Theoretically this means everything at the level of that eval is best. Practically you might get a better evaluation after you make a move or a worse one even with the best move, because now it's one move further on that branch and deeper calculation means a different evaluation.
So everything at the level of the previous move evaluation or higher is best (the star). Everything lower, but still very close, is good (!). Interesting good moves are considered brilliant (!!). This is how the feature works.
In order to mitigate the issue with the Fishnet evaluation, the local computer evaluation is taken into consideration if available. Start computer evaluation, then go to the different positions and wait until the calculation reached the depth you find acceptable. Unfortunately, LiChess Tools, being a browser extension, has no way to store the local evaluation, so every time you refresh the page, you get the server eval back.
In order to determine how close to best a move is we compute the probability of winning for each side. We use what Lichess itself uses for Win%.
Then a good move is one that loses less than 1% winning chance, best is losing nothing. The interesting move calculation is hard to define, it's pretty heuristic and I've fiddled with it a lot.
Conclusion
This is a typical case of "the client wants, the client gets". If you like it, fine, if you don't like it, don't enable it. Considering it is using low quality evaluation data and no server statistics, this works pretty good for what it does.
Play around with the settings and let me know what you think. I would appreciate your honest feedback. Enjoy!
You may also like

Post-Mortem of our Longest Downtime
From 14:54 UTC on the 12th September until 01:33 UTC on the 13th September, Lichess experienced the …
How I started building Lichess
I get this question sometimes. How did you decide to make a chess server? The truth is, I didn't.
The REAL value of chess pieces
... according to Stockfish
Should I report this?
Ever encountered a user misbehaving on Lichess? Check out if and how to report them.
Stockfish 17 is here!
The free and open source engine that you love, now stronger than ever before!