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

Enhancement: Disable cloud analysis when using external-engine #11526

Open SnowballSH opened 2 years ago

SnowballSH commented 2 years ago

Problem

When external-engine is enabled, say on a tournament broadcast page where games are analyzed by hundreds of users, lichess displays the result of cloud analysis instead of our local external-engine when cloud analysis depth is higher.

The user is using external-engine usually because they want to see the analysis using their own engine instead of the wasm stockfish lichess gives. Even if someone ran stockfish at a higher depth than user's external-engine, it is not what exactly the user want (plus, user's local engine may give a more accurate analysis even at a lower depth than the wasm stockfish).

Current Behaviour

Cloud analysis result is shown even when external-engine is enabled and running.

Expected Behaviour

(Default?) option to disable cloud analysis when external-engine is enabled.

SnowballSH commented 2 years ago

I can try to implement it, but I might need some help understanding the option tabs and external-engine detection. Or someone else can do it if they feel it's an easy work for them.

benediktwerner commented 2 years ago

Duplicate of #11237

As mentioned there, hiding cloud eval when an external engine is in use is probably the preferred solution. cloud eval is handled in evalCache.ts, it should be relatively simple to make it not request an eval when an external engine is registered if you want to give it a shot. Feel free to ask on Discord if you need some more directions.

SnowballSH commented 1 year ago

I am unable to fix this issue because I am facing too many problems with setting up fishnet, cloud analysis, external engine sockets, etc. I think it is best for someone who have a complete setup to do it.