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 ...
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, ...
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 ...
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 ...
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 ("...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 [...
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 ...
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 ...
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
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.
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/...
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 ...
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 ...
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 &...
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,...
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 ...
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 ...
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.
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 ...
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, ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pgn × 158software × 35
database × 19
programming × 17
engines × 13
notation × 13
opening × 12
fen × 10
python × 10
analysis × 8
chessbase × 7
scid × 7
lichess × 6
stockfish × 4
evaluation × 4
annotation × 4
chess.com × 4
pgn-extract × 4
online × 3
websites × 3
linux × 3
rules × 2
learning × 2
tactics × 2
tournament × 2