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

Expand Practice Mode to play against manually specified lines (Parrot Mode) #2566

Closed arex1337 closed 4 years ago

arex1337 commented 7 years ago

Functional description

When a user goes to practice a study chapter, they should be able to choose between two different modes:

image Machine Mode, playing against the local engine (current Practice mode) image Parrot Mode, playing against the lines specified within the study (no engine involved)

If a study chapter only has an initial position, then Machine Mode should be enabled by default and Parrot Mode should not be available (as there isn’t anything to parrot).

If a study chapter has any moves, then Parrot Mode should be enabled by default, but the player should have the option to switch to Machine Mode.

From a study author perspective, Machine mode and Parrot mode are both Practice mode.

Machine Mode image

Machine Mode is best suited for use cases where there are many possible ways of solving the problem and you want to allow the player some freedom in how they solve it:

Parrot Mode image

Parrot Mode is best suited for use cases where there is only one or multiple manually specified lines that are considered correct.

Use cases with one line per chapter (mono-line)

The study author sets which color the user should play, but it should be overridable by the user. Overriding the setting does not make sense for mating exercises, but does make sense for playing over Master Games and practicing opening lines. The user is playing the configured color, and the moves for the other color are made automatically according to the line in the study (no engine involved).

When practicing a study with mono-line chapters in Parrot Mode, the user starts on chapter 1 and progresses sequentially through the chapters (sequential-mode) unless they manually select a specific chapter to practice.

Use cases with many lines per chapter (multi-line)

When practicing a study with multi-line chapters in Parrot Mode, the user starts on the first line in the first chapter and progresses sequentially through lines and chapters (sequential-mode). In addition to sequential-mode, the user should be able to select random-complete-chapter (RCC) mode and random-complete-study (RCS) mode.

RCC mode should randomly select lines within the current chapter until all lines in the chapter have been played once. RCS mode should randomly select lines from any chapter in the study until all lines in the study have been played once.

The user should also be able to manually select a specific line. If no mode is selected, then the user will be prompted to play the same line repeatedly.

Motivation

Unihedro commented 7 years ago

Is there an SVG of those icons you have there?

arex1337 commented 7 years ago

Icons:

arex1337 commented 7 years ago

Requests in the wild:

arex1337 commented 7 years ago

Slack discussion quote:

[13:13]
arex https://github.com/ornicar/lila/issues/2566 is what we should have (edited)

[13:14]
arex for many reasons. for opening training specificially, i think curated content would be better than relying on the master db

[13:15]
clarkey Where you play like the first 5-10 moves against the master db. It analyses the nodes that you have trouble with, and takes you in that direction until you learn the best lines.

[13:18]
arex parrot mode gives us the control we need to build any exercise. it can also be used to allow users to train opening lines they build themselves, or opening lines other people have built

[13:18]
arex it really supports the educational and sharing culture of lichess imo

[13:19]
lukhas personalized training adds huge value

[13:20]
lukhas instead of simply following the masters db

[13:22]
nojoke I have a bunch of private repertoire studies that i use to keep track of my openings...i'm really looking forward to parrot mode to test myself

[13:23]
arex i would look forward to build /practice stuff without having to make sure the engine plays the move i want it to

[13:23]
arex although machine mode is perfect for drills (edited)

[13:24]
ddugovic I assume @arex is referring to how Stockfish plays endgame moves without tablebases

[13:24]
arex nope

[13:25]
arex say i want to illustrate forks by letting the user find a fork tactic from a master game, then perhaps Kasparov had two moves with similar evaluation but only one of them uses a fork. then i need to make sure that the "correct" move is the best engine move at various depths

[13:26]
arex parrot mode would eliminate this

arex1337 commented 7 years ago

00:07]
arex lakin, so you know how study chapters have a "practice mode" and about /practice. In the current practice mode, the user plays against the local engine (which i call machine mode). Parrot Mode would be a new study chapter mode where the user does NOT play against the local engine, but against the specified lines within the study chapter.

[00:07]
lakin, Parrot Mode would allow us to make /practice studies where we completely control the moves. For your use case of openings, practicing a chapter in Parrot Mode, you would be presented with a line from the chapter (containing opening lines), and you would need to respond with the correct moves according to the chapter content. The idea is that you can play either color and you can choose if you want to play all lines sequentially, in a random order, or just pick the line you want to practice.

[00:08]
lakin That's most of it. If you get a system that tells me which lines to practice, then you have much of what I'm looking for.

[00:08]
arex aha, based on?

[00:08]
lakin When I have 10 minutes to study chess, I don't want to spend any of that time figuring out what to study. I want the machine to tell me.

[00:09]
lakin Which lines you get wrong, where you went wrong in your most recent game, line you have practiced recently etc.

arex1337 commented 7 years ago

[00:16]
lakin Also, at the moment, in order for the play against the machine to be not torture, I have to use chrome, the ASMJS version of the engine just isn't fast enough.

[00:16]
arex the main problem being waiting time?

[00:16]
lakin yeah

[00:16]
lovlas Thats one part I hated about the chess.com drills

[00:17]
the engine takes ages

[00:17]
arex another good argument for parrot mode (for those studies that can use parrot mode instead of machine mode)

[00:17]
there's no reason mate in 3 with only 1 line should be played by the engine

[00:18]
but for mating with BB and BN, machine mode is excellent and parrot mode would never work obviously (edited)

arex1337 commented 7 years ago

1r4k1/1p3pbp/1P1P4/p1P2p2/4p3/8/1P2B1PP/3R3K w - - 0 33 is a cool overloaded puzzle but the engine needs to get to d21 until it understands that Ba6 is the best move so i can't use in in machine mode - http://www.chessgames.com/perl/chessgame?gid=1536452

arex1337 commented 7 years ago

^^^ Never mind, performance is not an argument for parrot mode after the implementation of the eval cache. The other arguments remain though :P

arex1337 commented 7 years ago

Lichess Lesson Experiment: https://youtu.be/loKbh5lO8zI https://lichess.org/study/ByhlXnmM

arex1337 commented 7 years ago

image

stale[bot] commented 4 years ago

There has been no activity on this issue for 2 years. It will be automatically closed in 2 weeks. If the issue is still relevant, please briefly explain (or remove the label). Feel free to reopen at any time.