Docs / PGN and FEN
How PGN is used in LilyChess
See supported PGN syntax for what the parser accepts.
Uploading games
- A
.pgnfile can contain several games. Each game is processed separately; the first keeps the upload identifier and the others get their own. - Credits: each game costs credits and the deep analysis is billed per position that is not yet cached (cached positions are free). See Pricing for the current rates. Games for which no credit is available are skipped; if none can be processed, the upload is cancelled with a notification.
- Upload without analysis: the game is stored without running the engine; only the upload credit is used.
- There is no file-size limit enforced by the server. Games of an unsupported variant are ignored.
- A game whose
[FEN]is not the initial position (and is not a Chess960 starting position) is classified as a study; otherwise it is a game.
Importing into an opening repertoire
- Maximum size: 1,048,576 characters. Errors are returned with line numbers.
- Only games whose
[Result]is*(or missing) are imported; the others are counted as skipped. - The color comes from the repertoire, not from the PGN. Variations
( )become repertoire variations; comments are kept (the comment before the very first move is dropped). - Moves that already exist are not duplicated (only their comments are updated).
- Export: format
tree(a single game with variations) orlines(one game per line), with[Event "Repertoire: <title>"],[Date],[White "white"]or[Black "black"],[Result "*"]and, if needed,[FEN]plus[SetUp "1"].
Custom puzzle suites from a PGN
- Maximum size: 1,000,000 characters; at most 300 puzzles (extra games are ignored).
- Each game of the PGN becomes one puzzle (no marker is needed). Only the main line is used (variations are ignored), starting from the
[FEN]position or the initial position. - Option
introMove(default on): the first move is played automatically and the solver plays the other side (2 half-moves minimum). Without it, all moves are the solution (1 half-move minimum). - Option
keyMoves: keep only N solver moves (each followed by the opponent’s reply). - The first
[%eval X]found in the line comments becomes the puzzle’s “score”. - Default visibility is private; the
coachingtracking mode is not allowed on a public suite.
Exporting games
- Enriched export: moves, variations and comments, plus on every main-line move an annotation
[%eval +0.35,<depth>](or[%eval #N]for mate) from White’s point of view, NAGs, engine variations and theWhiteACPLandBlackACPLtags. - Clean export (used when a course is exported with its resources): no engine evaluation at all; only the owner of a game can export it.