- Blind mode tutorial
lichess.org
Donate

How are these "themes" given to puzzles?

When downloading puzzles from the lichess database (https://database.lichess.org/#puzzles), each puzzle has certain "themes". Almost all puzzles have one of the following themes "opening", "middlegame", and "endgame" and no puzzles have more than one of those themes.

How does lychess define "opening", "middlegame", and "endgame"?

And I mean strictly in the code written to give these themes to puzzles.

I think the code for giving the themes is somewhere in here (https://github.com/ornicar/lichess-puzzler), but I can't find it and I would like to find an exact definition usable in code.

(I want this because I'm working on a bit that tries to create more puzzle-like situations and I think differentiating between early, mid, and late puzzles would be useful for knowing when to look for which puzzles. But I don't know at which point in the game to switch from "opening" puzzles to "middlegame" puzzles. Similair explanations of the other themes would be welcome. The puzzletheme descriptions (https://github.com/lichess-org/lila/blob/master/translation/source/puzzleTheme.xml) were too vague for me for these themes.)

When downloading puzzles from the lichess database (https://database.lichess.org/#puzzles), each puzzle has certain "themes". Almost all puzzles have one of the following themes "opening", "middlegame", and "endgame" and no puzzles have more than one of those themes. How does lychess define "opening", "middlegame", and "endgame"? And I mean strictly in the code written to give these themes to puzzles. I think the code for giving the themes is somewhere in here (https://github.com/ornicar/lichess-puzzler), but I can't find it and I would like to find an exact definition usable in code. (I want this because I'm working on a bit that tries to create more puzzle-like situations and I think differentiating between early, mid, and late puzzles would be useful for knowing when to look for which puzzles. But I don't know at which point in the game to switch from "opening" puzzles to "middlegame" puzzles. Similair explanations of the other themes would be welcome. The puzzletheme descriptions (https://github.com/lichess-org/lila/blob/master/translation/source/puzzleTheme.xml) were too vague for me for these themes.)

Bump because It'd really help me if someone knew.

Bump because It'd really help me if someone knew.

Take a look at commit 62a4db8 in lichess-puzzler. It deletes the Phaser directory. phaser/Divider.scala looks like it had the algorithm to determine opening/middlegame/endgame. Note that the first comment was "hacked from scalachess". So it makes sense that this commit was refactoring to delete duplicate code.

The original is https://github.com/lichess-org/scalachess/blob/master/src/main/scala/Divider.scala.

Take a look at commit 62a4db8 in lichess-puzzler. It deletes the Phaser directory. phaser/Divider.scala looks like it had the algorithm to determine opening/middlegame/endgame. Note that the first comment was "hacked from scalachess". So it makes sense that this commit was refactoring to delete duplicate code. The original is https://github.com/lichess-org/scalachess/blob/master/src/main/scala/Divider.scala.

This topic has been archived and can no longer be replied to.