> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/chess/puzzles.md).

# Puzzles

2,800 puzzles from real games, solved alone at any table, with a puzzle rating for every player.

A player alone at a table, with the other chair free or the computer on it, can solve puzzles there: **Solve puzzles** in the lobby or after a game. Nobody else can sit down while puzzles are being solved, and passers-by see the puzzle on the table.

<figure><img src="https://3924607527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkrCqB30nvL5PDNUr89iF%2Fuploads%2FYId5djkq4xpqi6abqneZ%2Fchess-puzzles.webp?alt=media" alt="A puzzle on the board with the puzzle card beside it"><figcaption><p>A puzzle, with its rating and the player's puzzle rating beside the board.</p></figcaption></figure>

## Solving

* The opponent's move leads into the position. Then you find the best move, and every move after it. The opponent's answers are played for you.
* A move that mates is right even where the puzzle had another mate in mind.
* A wrong move is not played. You may try again, but the puzzle no longer counts as solved.
* **Show solution** plays the rest of the puzzle out.
* **Next puzzle** gives the next one, **Back to the lobby** ends puzzles.

## The puzzles

There are 2,800 puzzles from real games, rated from 500 to 2800. They come from Lichess's open puzzle database (CC0), and every one was checked against the resource's own rules. They are in `data/puzzles.json`.

## Puzzle rating

Every player has a puzzle rating that moves with each puzzle like a game rating. A puzzle solved without a wrong move is a win, otherwise a loss. The next puzzle is picked near the player's puzzle rating and is never one of their last 60.

| Option                     | Default | Meaning                                |
| -------------------------- | ------- | -------------------------------------- |
| `Config.Puzzles`           | `true`  | Offer puzzles                          |
| `Config.PuzzleRatingStart` | `1200`  | The puzzle rating a player starts with |
| `Config.PuzzleK`           | `20`    | The most one puzzle can move it        |

The puzzle rating is kept in `stats.json` beside the game rating, and has its own [leaderboard](/organized-chaos-docs/chess/leaderboard.md).
