lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
14.84k stars 2.2k forks source link

Opening training via Interactive Studies #14619

Open purefan opened 5 months ago

purefan commented 5 months ago

Hello,

Im thinking on how to improve the studies so they can be more useful as a repertoire training tool and am looking for feedback. In general I believe something that uses the techniques described in this other issue can be valuable to both ideas (puzzles and repertoires) and I propose this implementation:

  1. The ability to mark a Study as a repertoire image

  2. A new button to the right of "Practice with Computer" to start the training for this chapter image 2.1 Visible only for studies marked as repertoire

  3. A new button to start training for all this repertoire: image

  4. Mechanics of the training: 4.1 When loading a repertoire study the frontend receives statistics for each position and chapter (see point number 5) 4.2 When starting a training the frontend chooses the position least practiced and shows the starting board position and moves the pieces until it reaches the chosen position. At this point the training shows the Interactive Training interface: image

  5. Training statistics include: 5.1 For each position: 5.1.1 Date when last practiced (for convenience, can be inferred from 5.1.2 and 5.1.3) 5.1.2 An array of SuccessfulAttempt, which is an array of dates 5.1.3 An array of FailedAttempt ( an object with info about when was it last played and what move was tried {when: Date, why: SAN})

I believe this is a good starting point, mostly affecting the behavior of an Interactive Lesson where the frontend chooses the move to prompt the user for not from a static sequence but based on previous inputs (success and date)

It is also possible that I have misunderstood something about the Interactive Lessons, so please do let me know if Im missing the obvious.

In future iterations I would like to see:

  1. An ordered list of failed attempts so the user can review the repertoire or train exclusively the top 5 failed
  2. A button in Game Analysis to compare to a Study Repertoire, clicking it would show the first position in the game that is not in the repertoire and offer to add that position to the Study Repertoire (the user then can analyze and add the best continuation to the study which allows for future trainings)
  3. A "Learned" metric, where each position in the study repertoire gets a label, for example 3 consecutive successful attempts labels it as "learned" and if the last successful attempt was X days ago then it loses the label. "Learned" positions are pushed down the queue during training.
purefan commented 5 months ago

One benefit of using the Studies for this is we can import a pgn directly into a study

ghost commented 5 months ago

For the actual spaced repetition system, we can use https://github.com/open-spaced-repetition (free & open source). It's the same algorithm (FSRS) as in Anki.

Haotin00 commented 5 months ago

Hi ! Just found this thread, really excited about having such feature implemented in lichess.

A cool feature to add in the future could be :

@purefan Are you planning to work on this feature ? I would love to help and contribute on this feature

purefan commented 5 months ago

Hi ! Just found this thread, really excited about having such feature implemented in lichess.

A cool feature to add in the future could be :

  • using lichess database to train in priority most played moves depending on your elo & time control you play the most.

@purefan Are you planning to work on this feature ? I would love to help and contribute on this feature

Hello @Haotin00 I do, so far I have managed to add the setting to the study configuration (just ui), as usual with onboarding a new user (me in this case) there are some challenges, the gitpod instance didnt have permission over node_modules and Im running out of space locally to pull all the docker images, so working around those bumps now.

But, before I get deep into the feature and implement something I would very much appreciate feedback on the visuals and the mechanics of this feature, to make sure I dont end up implementing something nobody wants or that it behaves in weird/unexpected ways, so one way to help (besides code) is to just state the obvious, whatever you think should be common sense and self-explanatory, please state it, no matter how silly or dumb it sounds to you, it may be something I (or other developers) ignored.

Cheers!

Haotin00 commented 5 months ago

For the trainer mechanics, i'm quite in line with what you said.

Adding some options :

Siderite commented 4 months ago

A cool feature to add in the future could be : using lichess database to train in priority most played moves depending on your elo & time control you play the most.

Just curious, have you tried the LiChess Tools browser extension? It has tons of features targeted specifically to analysis and study. One of them, Explorer Practice, allows you to "play" against the Opening Explorer moves in the Lichess database (depending on what you selected)

I am very interested in the subject of this issue. I am going to follow it and maybe add features in LiChess Tools based on suggestions here.

ddugovic commented 3 months ago

Thanks for your hard work on this. Indeed a "study course" system not dissimilar to Chessable could be interesting.