Questions tagged [pgn]

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.

Filter by
Sorted by
Tagged with
16
votes
5answers
2k views

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, ...
15
votes
3answers
2k views

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 ...
15
votes
2answers
1k views

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 ...
14
votes
9answers
4k views

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 ...
13
votes
3answers
3k views

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 ...
12
votes
4answers
20k views

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 ...
12
votes
1answer
3k views

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 ...
9
votes
4answers
10k views

Chess Puzzle Database with PGN or FEN

Is there a database of chess puzzles that have the game or positions PGN and or FEN?
8
votes
4answers
2k views

Is PGN split utility available anywhere?

A couple of places on the web mention a free utility called pgnsplit, that does the following: "A commandline tool to convert pgn-files including games with variation into pgn-files where each ...
8
votes
4answers
912 views

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 ...
8
votes
1answer
3k views

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? ...
7
votes
5answers
358 views

Is this case considered an ambiguity or not?

From the answer to my question How are PGN ambiguities handled?: In the case of ambiguities (multiple pieces of the same type moving to the same square), the first appropriate disambiguating step ...
7
votes
3answers
1k views

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

I downloaded a bunch of games from Kingbase which included the below game. [Event "FSIM November 2018"] [Site "Budapest HUN"] [Date "2018.11.06"] [Round "4.4"] [White "Farago, Sandor"] [Black "Li, ...
7
votes
2answers
2k views

Add comments in a pgn file

I have a pgn file containing a game. I want to add a comment into the game (like at move 23. - This is a ok move etc.) using words and not symbols. Is it possible to do this?
7
votes
2answers
2k views

Great Chess match resources (PGN) suggestions anyone?

Using Arena with a number of Chess engines, I love configuring Arena to use its 'book' feature. There are books of openings, books of famous games, books of particular players, surprise wins, etc. ...
6
votes
2answers
695 views

Does anything actually use numeric annotation glyphs (NAGs)?

Numeric Annotation Glyphs, or NAGs for short, are tokens defined by the PGN standard to allow concise annotation of moves. They consist of a dollar sign ($) followed by a number, e.g. $1 means "good ...
6
votes
1answer
871 views

Parsing PGN files - when can a move be shortened?

I'm writing a PGN file parser, and need to know in which situations you don't need to write the rank/file of a piece that makes the move. I can think of the following: only one piece can conduct the ...
6
votes
2answers
396 views

How to create PGN notation with wrong moves in it?

I was as chess trainer with some young guys on a tournament, and wrote down some of their games. In nearly every game, there were wrong moves in it: king is in check, but does not move or react; ...
6
votes
1answer
244 views

How to add draw offer to PGN?

Does PGN have any annotation for draw offer? Just adding = after a move doesn't seem to work everywhere. Among the standard NAGs there's $10 (drawish position or even) which translate as = or I can ...
6
votes
1answer
70 views

What's the meaning of “%evp” in a PGN comment?

Example: {[%evp 0,17,14,14,14,-25,-15,-15,7,7,55,48,48,48,472,228,802,802,804,771]} 1. e4 e5 2. f4 exf4 3. Bc4 Qh4+ 4. Kf1 Bc5 5. d4 Bb6 6. Nf3 Qg4 What's the meaning of these numbers when used ...
6
votes
2answers
293 views

How to evaluate and comment moves in PGN format?

I want, with Python-chess, to evaluate any movement of some game and generate the PGN with analysis, as Chess.com does in its analysis. For example, i played one game with fools mate and they ...
5
votes
3answers
292 views

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

I was using Apronus to make an new chess puzzle for Puzzling Stack Exchange, but then it did something odd. Take a look here: [FEN ""] 1. Nh3 f5 2. e4 fxe4 3. d3 exd3 4. Be2 Kf7 5. Qd2 dxe2 6. O-O ...
5
votes
3answers
2k views

Import and export of PGN

How do I perform the following related things? Export/import PGN of games from Droidfish. Import my games to Chess.com I found an option to export my games from Chess.com (Share PGN) but I couldn'...
5
votes
2answers
183 views

Does the PGN specification mistakenly omit solidus (/) for symbol tokens?

The Portable Game Notation (PGN) specification appears to contradict itself regarding the valid characters that may appear in a symbol token. From [1], section 7, quote: A symbol token starts with ...
5
votes
3answers
539 views

How to sort a chess PGN game by date?

Is there a way to sort a PGN chess game by date and export the sorted games as a new PGN file?
5
votes
1answer
389 views

What is the best way to play chess via terminal?

I've recently learned about gnu chess, but it's poorly documented, and I'm having difficulties: Setting a reasonable difficulty level; Saving an entire game to a pgn: it's only saving the last move; ...
5
votes
2answers
269 views

What web-based Content Management System (e.g. Blogger) has the best support for chess content?

I am contemplating starting a website/blog, and trying to choose between Blogger, WordPress, and Drupal (but open to others). My needs are mostly blog-like - to post static pages and regular updates, ...
5
votes
1answer
756 views

Scid PGN analysis using Stockfish

Scid outputs this analysis of a PGN file using the Stockfish engine: What does the D mean? And where (e.g. a web page) is this actually explained?
4
votes
3answers
1k views

What are all of the possible tags for PGN?

In a PGN file, there are tags like: [Event "Tournament"] [White "John Smith"] And so on. I would like to know all the possible tags for PGN files so I can use them in a PGN file that my friend is ...
4
votes
3answers
2k views

Reading PGN files using Stockfish engine

Is there a way to read a .PGN file using Stockfish engine? If there is can you please give a sample commmand? THanks
4
votes
2answers
397 views

What is valid PGN?

I want to build a program that makes and reads PGNs. What is valid PGN? What arguments are valid in the header? What values are mandatory, what can be omitted? Can I find somewhere rules for ...
4
votes
1answer
693 views

How can I open (or convert into .PGN) old Chessmaster .CMG files, without Chessmaster?

I have many old chess games saved from Chessmaster 7000, 8000, and maybe even 9000. They are all saved in the Chessmaster .CMG file format. How can I access these games today? I would like to either ...
4
votes
2answers
950 views

PGN database with games of players with ELO 1000 - 2000

I do the research on a difference of players' behaviour on different levels. There is no problem to find games with players rated over 2000 ELO but I lack those below 2000. Does anybody know a source ...
4
votes
1answer
2k views

How do you convert a scid database into a pgn database?

So I got a big scid database and ScidvsMac. I would like to convert the complete database into a pgn database. So far I have only found out how to convert single games into pgn, something I'm not keen ...
4
votes
1answer
159 views

Standard for receiving live chess broadcast

I was making live broadcast recent days and I'm quite surprised how it technically worked. We were downloading whole new PGN file every 5 seconds with format shown it the code below. Is this how ...
4
votes
1answer
197 views

Comment/variation with different starting position

When annotating games, I sometimes want to add a comment which starts from a position that is different from the current position. Like: 1. d4 d5 2.c4 { Our previous game went 1.e4 c5 ...} Or: ...
4
votes
1answer
979 views

Where can I find free training tools like detailed annotated chess openings, middle games and endgames in the PGN format?

I have decided to study chess after playing it leisurely for a while. I looked at some online chess courses like the ones offered by Igor Smirnov at the Remote Chess Academy, but these options seem to ...
4
votes
3answers
573 views

Deleting multiple games from a large PGN file

I have spent around half an hour searching Google and I have not found what I am looking for -perhaps I did recognise it as what I needed if I had come across it. I have just recently downloaded SCID ...
3
votes
2answers
99 views

Can one use alternative identifiers (from languages other than English) for chesspieces in PGN?

I came across this in the PGN standard on this site, section 17, for alternative piece identifiers (emphasis mine): English language piece names are used to define the letter set for identifying ...
3
votes
4answers
2k views

How do I create pgn files visually?

I'm looking for a way to create PGN files visually - so I don't want to type in the position and the moves manually, but I want to set up an initial position on a board, play some moves and then ...
3
votes
2answers
111 views

How can we convert PGN format to Resource Description Framework (RDF)?

Is there any parser available in which we take PGN data as input and then convert it to RDF format? Has someone worked on this thing?
3
votes
3answers
10k views

Freely available PGN databases

I am looking for a relatively large PGN-formatted database (with at least 500k+ games), that is downloadable, with possibly the following properties: Simple formatted (no time indication after moves, ...
3
votes
3answers
3k views

Convert ChessBase format to PGN on Linux

I have some ChessBase-format database files, and I would like to convert them to PGN so thatlinux-compatible programs (like scid, chessdb, etc.) could read it. Since I am running on linux and not ...
3
votes
1answer
918 views

Valid PGN variations?

I've received the following PGN text that I suspect invalid: 8.f4 {0.22/17 0 last book move} 8...e5 ( 8...b5 ( 8...Qb6 ( 8...Qc7 9.a3 What exactly the position the ...
3
votes
3answers
2k views

The Chessboard Editor at Apronus.com — Is it any good?

I am the webmaster of the online chessboard editor at http://www.apronus.com/chess/wbeditor.php. I spend about one week each year on maintaining this utility but I never get to work seriously on it. I ...
3
votes
1answer
133 views

Pgn crash course

Where I can find a fast smart pgn file format help ? You can find here the complete headache details of the format.
3
votes
1answer
153 views

What is %eval syntax in PGN

I've seen two formats of [%eval] syntax in PGN: [%eval 250,5] meaning white is +2.5 pawn up at depth 5 [%eval +0.25] means white is 0.25 pawn up Is any of those mentioned by some PGN standard? Which ...
3
votes
2answers
440 views

Is there a Unicode-compatible alternative to PGN?

One of the problems with PGN is that it requires ASCII, while names of players often contain non-ASCII characters. (And of course, many names are not written in the Latin alphabet ...) The ...
3
votes
1answer
391 views

What are the options to automatically identify games where the first move played was the best by a margin?

Let's imagine I have a pgn file with each game starting from a tactical position, and I want to identify the games where the solution was the only one. Basically an engine would have to evaluate ...
3
votes
2answers
157 views

On blunders in PGNs

Let us say that I commit a blunder in a chess game. One that is deserving for a ??, a mate in one let us say. My opponent misses it. With what mark should the move be written in a pgn? Left markless, ...