Skip to main content
30 votes
Accepted

Two knights can move to e7, but the move is only specified as Ne7

The c6 knight is pinned by the bishop on b5. Note that if the c6 knight were to move it would leave Black's king in check, which renders any such move illegal. Therefore it is ok in this case to ...
Scounged's user avatar
  • 8,028
23 votes
Accepted

Render a chessboard from a PGN file

You can use the SVG rendering functionalities of python-chess. This will allow you to create a SVG-formatted visualisation of any board position loaded using python-chess. FEN to SVG For example, ...
Ellie's user avatar
  • 12k
17 votes

App which transforms chess moves into chess positions

What you're looking for is software/website that allows you to load or import PGN files. The Lichess Analysis board, for example, supports exactly what you want: https://lichess.org/analysis -- below ...
MikeD's user avatar
  • 2,004
13 votes
Accepted

Why is Apronus allowing the White king to castle through an attacked square?

I happen to be the author of the chessboard editor under discussion. Let me clarify the issue. This editor is supposed to enforce legal moves but it has a bug which prevents it from being able to ...
MichalRyszardWojcik's user avatar
13 votes
Accepted

Longest possible FEN

The FEN consists of six parts (see definition of FEN here): piece placement: at most 64 characters, one for each square plus 7 times "/" to delimit ranks = 71 characters active color: one character ("...
user1583209's user avatar
  • 20.9k
12 votes

Is PGN split utility available anywhere?

As of 2017.04.01, pgn-extract (version 17-38) does provide variation splitting functionality via its --splitvariants flag. So, if you want this in a Windows/Linux/Mac OS environment it is available. ...
kentdjb's user avatar
  • 1,891
12 votes
Accepted

Add comments in a pgn file

[Date "1910.01.07"] [Result "1/2-1/2"] [White "Carl Schlechter"] [Black "Emanuel Lasker"] 1. e4 {Notes by J. R. Capablanca} e5 {This is Black's second move!} 2. Nf3 Nc6 3. Bb5 Nf6 * This is a sample ...
SmallChess's user avatar
  • 22.7k
12 votes
Accepted

What happened in this game between Hong Li and Sandor Farago in the FSIM November 2018?

Best guess: the mistake occured before, on move 15 Entry errors are frequent when games are entered into a software, especially if they are not entered by one of the players. Here the operator must ...
Evargalo's user avatar
  • 16.7k
12 votes
Accepted

Am I misunderstanding the --materialz option on pgn-extract, or is it not quite working right?

This is a bug due to sloppy copy-and-paste of code on my part and failure to test games involving promotions. If you wish to apply the fix yourself to the source of v21-08 (and earlier) then in the ...
kentdjb's user avatar
  • 1,891
11 votes

Add comments in a pgn file

Yes, there are two ways to add a text comment to a pgn file. The first is far more common: simply wrap the comment in {braces} 1. e4 {Best by test!} e5 The second is less common, but also a part ...
Andrew's user avatar
  • 15.2k
11 votes
Accepted

Stockfish evaluation of a position from PGN

Yes there are easy ways to do this. I'm going to briefly show you one quick way of doing it in python, using the python-chess module. If the in-code comments are not enough, feel free to ask for ...
Ellie's user avatar
  • 12k
10 votes

Where can I get PGNs of FIDE rated tournaments?

Unfortunately they don't make available a central respository where you can download all the pgns they have for, say, October 2022. If that is what you want then the closest thing is "The Week in ...
Brian Towers's user avatar
  • 100k
9 votes
Accepted

What are all of the possible tags for PGN?

PGN standards are described here. There are seven more-or-less required tags: [Event] [Site] [Date] [Round] [White] [Black] [Result] and many different supplemental tags, for example [WhiteElo] and [...
Glorfindel's user avatar
  • 25k
8 votes
Accepted

Does anything actually use numeric annotation glyphs (NAGs)?

Yes, ChessBase does more than just support them, it definitely uses them. Since I got here, due to how I write notation, de instead of dxe4, for example, I used to have problems getting the FEN board ...
PhishMaster's user avatar
  • 32.7k
8 votes

Render a chessboard from a PGN file

Yes, of course it's possible. I've done it a lot professionally. However, there is no tool that just takes a PGN chess game and convert it into images. You will need to do some programming, not very ...
SmallChess's user avatar
  • 22.7k
8 votes
Accepted

When are both the rank and file required for disambiguation of a move in PGN/SAN?

Yes, it's possible for a piece to need both the rank and file to distinguish it, although it's rare. For example: [FEN "8/1k6/8/8/5Q2/8/3Q1QK1/8 w - - 0 1"] 1.Qf2e3
D M's user avatar
  • 20.3k
8 votes

Am I misunderstanding the --materialz option on pgn-extract, or is it not quite working right?

I tested the first linked game with pgn-extract v21-08 and replay the game, this is caused by a bug.
ferdy's user avatar
  • 4,155
7 votes

Tools for automated notation: webcam movie to PGN

It's 2019-12 now and 5 years after the original question. Does any such thing exist (webcam/video to pgn converter)? A prototype maybe? see https://github.com/WolfgangFahl/play-chess-with-a-webcam/...
Wolfgang Fahl's user avatar
7 votes
Accepted

Valid PGN variations?

Good question. This nested notation (also called: recursive annotation variation, RAV for short) is uncommon but valid[*]. In the example you provide, most online PGN readers have no problem parsing ...
Ellie's user avatar
  • 12k
7 votes
Accepted

Creating a Opening Lines Book in ' tree-like' format

Given various tell-tale signs, that graph was almost certainly generated with GraphViz. GraphViz is free, so you can produce similar diagrams yourself by downloading and installing it, or by using an ...
which-line's user avatar
7 votes

When are both the rank and file required for disambiguation of a move in PGN/SAN?

@DM showed one possibility, which would also work with bishops (and on various other places on the board, with the three pieces at corners of a square). The only other option is with knights: [FEN &...
Glorfindel's user avatar
  • 25k
7 votes
Accepted

How to find the piece to move when reading PGN file

You can use a python chess library to parse the moves of a game in a pgn file. Code """ pip install chess """ import chess.pgn def parse_pgn(inpgn): with open(inpgn,...
ferdy's user avatar
  • 4,155
6 votes

Reading PGN files using thr Stockfish engine

Stockfish is an engine that's called by apps that read PGN files, it doesn't read the PGN data itself. There are many very good free apps that can read PGN files and analyse the games they contain ...
Edward Little's user avatar
6 votes
Accepted

PGN with arrows and circles

The original PGN standard was created and published in 1994 by Stephen J Edwards. Here is a copy of his original standard: Portable Game Notation Specification and Implementation Guide. Here it ...
Brian Towers's user avatar
  • 100k
6 votes

Chess Problem Database with PGN or FEN

http://gorgonian.weebly.com/pgn.html https://exeterchessclub.org.uk/downloads (in chessbase format) Exeter chess club has many other valuable resources.
Fred Knight's user avatar
  • 3,142
6 votes

Does anything actually use numeric annotation glyphs (NAGs)?

Lichess also uses them. When using the Study feature of Lichess, you can manually annotate a game with any of these symbols: If you then export your study or study chapter as a PGN file, it will ...
itub's user avatar
  • 10.6k
6 votes
Accepted

Does any PGN actually use the '%' (escape) or ';' (rest of line comment) mechanisms?

You can use the percent sign to comment out a line of text in your PGN file (similar to Latex). For example, if you'd like to include personal comments that categorize the games within the database, ...
Ellie's user avatar
  • 12k
6 votes
Accepted

Is there Python code to use the Leela neural network?

Python utilities for experimenting with Leela Chess Zero a neural network based chess engine: https://github.com/glinscott/leela-chess/ Here: https://github.com/so-much-meta/lczero_tools This allows ...
edwina oliver's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible