Hot answers tagged

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 ...
user avatar
  • 7,547
20 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, ...
user avatar
  • 11.8k
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 ...
user avatar
  • 1,969
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. ...
user avatar
  • 1,561
12 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 ...
user avatar
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 ...
user avatar
  • 12.9k
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 ...
user avatar
  • 1,561
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 ...
user avatar
  • 11.8k
10 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 ("...
user avatar
  • 20.4k
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 [...
user avatar
  • 23.9k
9 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 ...
user avatar
  • 21.6k
9 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 ...
user avatar
  • 14.9k
8 votes
Accepted

How to a add draw offer to a PGN

There is no symbol for a draw offer. Just add a comment {draw offered}
user avatar
8 votes

How to create PGN notation with wrong moves in it?

PGN files are normal text files. You can generate it to somepoint using the software and then save the file, open it in a text editor (notepad, notepad++, ...) and continue editing there.
user avatar
  • 266
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 ...
user avatar
  • 32.1k
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 ...
user avatar
  • 21.6k
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
user avatar
  • 15.6k
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.
user avatar
  • 2,555
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/...
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 &...
user avatar
  • 23.9k
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 ...
user avatar
6 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 ...
user avatar
  • 11.8k
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 ...
user avatar
  • 77.5k
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 ...
user avatar
  • 10.3k
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, ...
user avatar
  • 11.8k
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 ...
user avatar
6 votes

Building up a dataset for image recognition of hand-written scoresheets

Does anybody have a (larger) body of scoresheet images + respective PGNs or knows which persons/entities could potentially provide those? All FIDE rated tournaments where norms are available (so must ...
user avatar
  • 77.5k
6 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,...
user avatar
  • 2,555
6 votes

I need a tool to convert the lines from a pgn file to figurine notation. any suggestions?

You can use a python script to read the pgn file using python-chess library. Examine each move and get the piece (K, Q ... k, q ...) and convert each specific piece symbol to figurine. Output [Event &...
user avatar
  • 2,555

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