use stockfish-web to generate local computer analysis by jonbgamble · Pull Request #20686 · lichess-org/lila · GitHub
Skip to content

use stockfish-web to generate local computer analysis#20686

Open
jonbgamble wants to merge 4 commits into
lichess-org:masterfrom
jonbgamble:local-analysis
Open

use stockfish-web to generate local computer analysis#20686
jonbgamble wants to merge 4 commits into
lichess-org:masterfrom
jonbgamble:local-analysis

Conversation

@jonbgamble

Copy link
Copy Markdown
Contributor

resolve #20495

  • new buttons in action menu / underboard launch the dialog.
  • you don't need permission or authentication to run it.
  • with permission, you may publish game or chapter analysis to the server.
  • ceval analyses the mainline in a tight loop. no page interaction is allowed while it runs.
  • the dialog offers 2 static presets, standard and broadcast mode. standard is 1,000,000 nodes, broadcast is 5,000,000 nodes per move.
  • custom mode allows timed search with the user's engine settings, so realistically 10,000,000+ nodes per move and up.
  • only analysis from engines with staticAnalysis capability (assigned in engines.ts) can be published.
  • any number of local analyses can be run at any strength at any time, but only the most recent is kept.
  • published server evals may only get stronger. i.e. you must analyse at 5,000,000 nodes to overwrite a 1,000,000 node one.
  • study contributors must enable REC to publish.
  • mods with hunter perms can remove a game analysis.
  • learn from your mistakes and round training are now available in Tools -> Analysis board (if there's a local analysis).

caveats:

  • external engine will not work until the protocol is extended to send bestmove on completion. this means a new lila-engine broker (no problem) and probably an updated provider harness on device (problem).
  • fishnet analyses on study chapters performed PRIOR to this PR lack "comp" hints in their tree data, so they cannot be cleanly overwritten. if a user tries to publish a stronger one on top, they are warned to clean up any old engine lines before uploading. this does not apply to fishnet analyses created after this PR.
  • although newly analyzed chapter nodes do get that "comp" hint, i do not give owners & admins a way to delete published analysis from a chapter. i just use the hint for merge.

- new buttons in action menu / underboard launch the dialog.
- you don't need permission or authentication to perform local anslysis.
- with permission, you may publish the game or chapter analysis to the server.
- ceval analyses the mainline in a tight loop. the browser tab must remain active and no page interaction is allowed during this process.
- the dialog offers 2 engine presets, standard and broadcast. standard is 1,000,000 nodes, broadcast is 5,000,000 nodes per move.
- custom mode allows timed search with the user's engine settings, so 10,000,000+ nodes per move and up.
- only analysis from engines with 'staticAnalysis' capability (assigned in engines.ts) can be published.
- any number of local analyses can be run at any strength for any reason, but only the most recent is kept.
- published server evals may only get stronger. i.e. you must analyse at 5,000,000 nodes to overwrite a 1,000,000 node one.
- study contributors must enable REC to publish.
- learn from your mistakes and round training are now available in Tools -> Analysis board after local analysis.

caveats:

- external engine will not work. the protocol needs to be extended to send bestmove on completion. this means a new lila-engine broker (no problem) and all users would have to update their provider harnesses (problem).
- study chapters analysed with fishnet before this PR lack "comp" hints in their tree data, so they can't be merged cleanly. when this happens, the user is warned to clean up any old engine lines before uploading. this doesn't apply to chapters created after this PR.
@jonbgamble jonbgamble mentioned this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow game analysis on user devices

1 participant