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.08k stars 2.23k forks source link

Re-analysis info and option #10998

Open kingscrusher opened 2 years ago

kingscrusher commented 2 years ago

Please could there be an option to re-analyse games especially master games

If a game was analysed more than 2 years ago it maybe worth the option of having it re-analysed

See: https://lichess.org/forum/lichess-feedback/re-analysis-info-and-option for discussions on this

Stockfish in particular in the last 2-3 years has been NN enhanced and GM Mathew Sadler has indicated that great improvements have resulted in opening understanding and positional understanding. So being able to over-ride the cached analysis when games have been analysed say more than 2 years ago would be a great enhancement in my view. Maybe it is much trickier to identify the engine version etc, but I think that just knowing the date when a game was last analysed could then be used to give the user the option to re-analyse (particularly classic "Master games" )

Cheers, K

NoseKnowsAll commented 2 years ago

I would like to second this. I've run into many famous imported games (such as Kasparov's immortal ) that have been analyzed a while ago, and the engine eval is just straight incorrect. For instance, the plot in that game shows that black is -1 at several points during the forced sequence, where-as actually following the SF 14 line the eval is literally +7 during moves 25 and 26. Kasparov's 28. Qc3?? however gets the eval back to +0.8. None of this information can be gleaned from the out of date engine analysis.

Earlier engines just can't keep up with modern engines, and I agree that an option to re-request a game analysis for a game analyzed over 2 years ago would be a good line in the sand for when someone should be able to re-request an analysis.

cyqsimon commented 3 weeks ago

Bump. I got here because I was looking at some famous past engine games. Notably the famous A0 vs SF8 game where SF played the pitiful Qh8 and got smothered.

The saved engine analysis, clearly out of date, showed all zeros until way too late. While SF16.1 sees immediately that 42...Nc7 is already a serious inaccuracy, and the infamous 45...Qh8 is simply a consequence and is actually the best move (by far; Qh8 is ~+1; second best Qc7 is ~+2.8).

My point is, to analyse these games properly, having the best engine available is basically a necessity. So please consider raising the priority of this. Thanks.

schlawg commented 3 weeks ago

Fishnet uses 16.1.

Regarding the node count, we're constrained by the hardware costs of providing free server analysis at scale.

cyqsimon commented 3 weeks ago

Fishnet uses 16.1.

I don't think Lichess redoes its analysis every time fishnet upgrades its bundled Stockfish.

Here's what the current analysis of the original game looks like:

old

It was immediately obvious to me that the existing analysis was done by a non-NNUE version of Stockfish. The long period of 0.0 evaluation is such an archetypical behaviour. In fact all non-NN engines had a tendency to do this, which was discussed in detail in the book "Game Changer":

In this chapter we zoom in on one mysterious aspect of engine evaluations that I first became consciously aware of on the day that I first analysed with AlphaZero. 0.00 A couple of months ago, I was reviewing an excellent middlegame book of extremely complicated positions analysed by a world-class grandmaster. The author mentioned a few times when the crisis in a particular position was at its highest that his engines were assessing the position as 0.00. Judging from his comments, he wasn’t completely sure what to make of such an assessment which didn’t always tally with his intuitive or practical feeling about the position. Any chess player who has analysed complicated positions seriously with an engine running in the background will recognise this scenario. You summon your inner genius, think up a brilliant double- pawn sacrifice to set the board on fire… and your engine responds with an evaluation of 0.00 and a best line ending in you forcing a bizarre repetition of moves. And it’s not just one engine: they all want you to force a repetition (though the ways to do so often vary). It’s perhaps the most irritating and obstructive thing that these otherwise fantastic engines do during analysis. If an engine thinks that a draw by repetition is the best course, it’s not going to chip in with interesting suggestions anymore. It’s all on you to think of something and challenge the engine and force it to look outside its closed path. The meaning of these 0.00 evaluations is something puzzling. At the point when the possibilities should be boundless, a draw by repetition is apparently the best option. However, if you attempt to take on the engine and prove it to be wrong, then you often end up losing… or discovering more repetitions. The engines are just too strong and can usher away any of your objections. You can imagine therefore that I was intrigued when playing through games between AlphaZero and Stockfish to see many 0.00 evaluations whizzing past my eyes as my engines analysed in the background. Even more interestingly, AlphaZero’s was normally the only dissenting voice: in positions assessed at 0.00 by the engines, its evaluation was often positive for itself. Putting that together with the score AlphaZero was making in such positions, it made me wonder whether a new chapter had been opened on 0.00 evaluations. In any case, it seemed well worth bringing together some of these positions to understand what we could learn from AlphaZero and the engines.

Just to prove this definitively, I replayed the game manually with myself and requested a new analysis. Here's the up to date analysis for the new game:

new

Clearly different and for sure much stronger.


Regarding the node count, we're constrained by the hardware costs of providing free server analysis at scale.

I strongly doubt that Fishnet is short on compute nodes. I personally run a pretty powerful node, and the work starvation situation was so bad to the point that it made me wonder if there's a bug in Fishnet's scheduler. See lichess-org/fishnet#267. Turns out no; there was literally no work to do.

So yeah. I think it's fair to say Fishnet currently has plenty of resources to spare. Adding an option to offer re-analysis is probably not even going to make a dent.