PGN stands for Portable Game Notation. This is a file format for storing chess games (both the moves and various header data such as players' names) that is easily read by people while also easy for programs to parse.
Questions tagged [pgn]
143 questions
22
votes
4 answers
When and why was the notation changed from descriptive to algebraic?
When I was young I used to play chess with the the old form of notation KB (King Bishop square number), even books used to have the same notation, then later found that everyone was using algebraic, is descriptive notation dead? Why?
Binoj Antony
- 3,351
- 2
- 22
- 36
20
votes
12 answers
Tools for automated notation: webcam movie to PGN
Sometimes during blitz games over the board, or when in zeitnot, it gets very difficult to annotate them.
I've seen several software / hardware to help in writing the notation, even one that's FIDE approved; these require that you repeat the moves…
Riccardo Zorn
- 261
- 2
- 9
17
votes
3 answers
Does move disambiguation happen before or after legality checking?
I am wondering if disambiguation occurs before or after the legality of such moves has been established. Given this position:
[FEN "5k2/5n2/3R4/1n6/8/5Q2/8/4K3 b - - 0 1"]
Both knights are targeting d6, but the one on f7 is pinned. In PGN notation,…
Olympiloutre
- 273
- 1
- 7
16
votes
3 answers
Open source chess playing or pgn viewing libraries
Is anyone familiar with any open source chess libraries in any language that can do any of the following:
parse PGNs and/or FENs
calculate valid chess moves based on position
process an entire chess game
EDIT:
Sorry, I should be more clear. I'm…
James Tomasino
- 2,265
- 19
- 20
15
votes
5 answers
Chess Problem Database with PGN or FEN
Is there a database of chess probpems that have the game or positions PGN and or FEN?
Ludwig
- 161
- 1
- 1
- 4
15
votes
2 answers
Is there a text editor with syntax highlighting for PGN files?
In Notepad++ or similar editors, one can get syntax highlighting for multiple file formats/languages. I'd like to have something usable on Windows that would let me do this with pgn files (see header tags, and annotations in different colors from…
Joe
- 4,341
- 2
- 23
- 42
14
votes
1 answer
How to convert PGN moves to long algebraic notation (in python)?
I want to read a PGN file and then advance to a certain move number, and feed that to an UCI engine. Turns out engines work using long algebraic notation, and PGNs are in short algebraic. What is an easy way to make the conversion? i.e. from SAN…
fastmultiplication
- 243
- 2
- 6
14
votes
3 answers
How are PGN ambiguities handled?
How are ambiguities handled when writing the PGN when more than one piece of the same type can move into the same square?
[FEN "1R4QQ/R1R4Q/8/6pP/5P1P/8/NK1k4/1N1N4 w - g6 0 1"]
Note: It isWhite to move, with an en passant capturing square on…
ajax333221
- 3,188
- 23
- 44
13
votes
4 answers
How to convert ChessBase format files to .pgn?
While downloading some games I came across some files in ChessBase format:
.cbv
.cbf
.cbh
I would like to know if is is possible to convert these files to .pgn format without using proprietary software and how it can be made.
lodebari
- 3,323
- 2
- 22
- 44
13
votes
1 answer
Stockfish evaluation of a position from PGN
I am trying to get Stockfish's evaluation of a board position(which is in PGN format) using command line.I know it accepts board position in FEN format, but is there any way i can provide PGN format?
If no, how can i convert PGN format to FEN?
Is…
John
- 233
- 2
- 5
11
votes
3 answers
Render a chessboard from a PGN file
I’d like to render a 2D chessboard image and save it after the last move as a PNG or JPEG from a given PGN file on a Linux console. How can I do this?
I have a PGN file and I want to get a screenshot of the board.
Seems to be a simple task but I…
wintermeyer
- 213
- 2
- 7
11
votes
4 answers
Java Library for PGN parser
I would like to find a Java library that will allow me to read a PGN file that could contain several chess games, probably with comments inserted also. But, it won't be used to generate moves or play the moves in a board. I just want to read the PGN…
Chale CS
- 311
- 2
- 7
10
votes
2 answers
Does any PGN actually use the '%' (escape) or ';' (rest of line comment) mechanisms?
Trawling through the PGN standard, I was surprised by two of the specifications:
An escape mechanism triggered by % at the start of a new line:
There is a special escape mechanism for PGN data. This mechanism is triggered by a percent sign…
Remellion
- 4,980
- 1
- 18
- 52
10
votes
2 answers
How to a add draw offer to a PGN
Does PGN have any annotations for draw offers? Just adding = after a move doesn't seem to work everywhere. Among the standard NAGs there is $10 (a drawish or even position) which translates as =; or I can use a comment. But I am wondering whether…
Samurai
- 203
- 1
- 5
9
votes
4 answers
Is there any website that generates and hosts board position with PGN as input?
Is there any website out there that takes PGN input and generates and hosts board positions (To show as image in the question or answer), till the time we get something like this done on this website itself, we can at least borrow?
Binoj Antony
- 3,351
- 2
- 22
- 36