Lines Matching refs:a

23 PGN is "Portable Game Notation", a standard designed for the representation of
31 PGN is not intended to be a general purpose standard that is suitable for every
33 Instead, PGN is proposed as a universal portable representation for data
34 interchange. The idea is to allow the construction of a family of chess
41 Computer usage among chessplayers has become quite common in recent years and a
48 visible when a user attempts to move significant quantities of data from one
50 data, then the chances for a successful transfer are small at best.
58 spreadsheets, fonts, and graphics. Sometimes a manufacturer deliberately
59 designs a data format using encryption or some other secret, proprietary
60 technique to "lock in" a customer. Sometimes a designer may produce a format
63 Another software producer may develop a non-proprietary system, but it may work
64 well only within the scope of a single program or application because it is not
72 A specification for a portable game notation must observe the lessons of
83 property rights. The idea is to let chess programmers compete in a free market
85 artificial requirements created by a secret data format.
87 3) The system must work for a variety of programs. The format should be such
102 local to a given region.
145 computer aided interaction and publishing should be explored to provide a high
152 been prepared by hand, much like a source file for a high level programming
160 prepared under program control, something like a pretty printed source program
161 reformatted by a compiler.
166 For a given PGN data file, export format representations generated by different
174 storage is defined as storage that may be accessed by a variety of computing
176 character have a specific representation that is independent of its value for a
178 a newline is the ASCII control character LF (line feed, decimal value 10,
182 baroque representations for a newline: multicharacter sequences, end-of-line
185 unified world of ANSI C and the those enjoying the bliss of a single '\n'
198 without having to have a full chess engine or other complex parsing routines.
199 The idea is to encourage chess software authors to always allow for at least a
200 limited PGN reading capability. Even when a full chess engine parsing
202 slower than a simple text scanner.
212 for bulk storage of unannotated games. It represents a minimum level of
213 standard conformance for a PGN exporting application.
224 PGN data is represented using a subset of the eight bit ISO 8859/1 (Latin 1)
230 ASCII usage. (Code value 127, the ASCII DEL control character, is a graphic
251 environments by displaying a question mark ("?") for non-ASCII character codes.
262 implementation are hidden from software implementors and users. When a choice
278 Import format PGN text lines are limited to having a maximum of 255 characters
284 are relatively rare. An example of this is the "FEN" tag pair; it may have a
285 long tag value, but this particular tag pair is only used to represent a game
292 first kind is the "rest of line" comment; this comment type starts with a
294 starts with a left brace character and continues to the next right brace
297 Brace comments do not nest; a left brace character appearing in a brace comment
298 loses its special meaning and is ignored. A semicolon appearing inside of a
300 inside of a semicolon comments lose their special meaning and are ignored.
307 There is a special escape mechanism for PGN data. This mechanism is triggered
308 by a percent sign character ("%") appearing in the first column of a line; the
313 A percent sign appearing in any other place other than the first position in a
319 PGN character data is organized as tokens. A token is a contiguous sequence of
320 characters that represents a basic semantic unit. Tokens may be separated from
325 A string token is a sequence of zero or more printing characters delimited by a
328 not a quote.) A quote inside a string is represented by the backslash
329 immediately followed by a quote. A backslash inside a string is represented by
332 of strings. A string token is terminated by its closing quote. Currently, a
333 string is limited to a maximum of 255 characters of data.
335 An integer token is a sequence of one or more decimal digit characters. It is
336 a special case of the more general "symbol" token class described below.
341 A period character (".") is a token by itself. It is used for move number
344 An asterisk character ("*") is a token by itself. It is used as one of the
346 or a game with an unknown or otherwise unavailable result. It is self
359 A Numeric Annotation Glyph ("NAG", see below) is a token; it is composed of a
364 A symbol token starts with a letter or digit character and is immediately
365 followed by a sequence of zero or more symbol continuation characters. These
369 for a variety of purposes. All characters in a symbol are significant. A
371 following the symbol character sequence. Currently, a symbol is limited to a
377 A PGN database file is a sequential collection of zero or more PGN games. An
378 empty file is a valid, although somewhat uninformative, PGN database.
382 that identifies the game by defining the values associated with a set of
391 The tag pair section is composed of a series of zero or more tag pairs.
393 A tag pair is composed of four consecutive tokens: a left bracket token, a
394 symbol token, a string token, and a right bracket token. The symbol token is
396 name. (There is a standard set of tag names and semantics described below.)
397 The same tag name should not appear more than once in a tag pair section.
405 any adjacent pair of tokens in a tag pair.
409 value and the right bracket, and there is a single space character between the
416 have a tag pair spanning more than a single line. Export format requires each
417 tag pair to appear left justified on a line by itself; a single empty line
420 Some tag values may be composed of a sequence of items. For example, a
421 consultation game may have more than one player for a given side. When this
424 otherwise appear in a string.
432 structure of a tag pair remains the same: left bracket, tag name, tag value,
438 There is a set of tags defined for mandatory use for archival storage of PGN
468 For PGN export format, a single blank line appears after the last of the tag
478 to help facilitate database scanning. If the name of the event is unknown, a
494 The Site tag value should include city and region names along with a standard
497 available. If the site of the event is unknown, a single question mark should
498 appear as the tag value. A comma may be used to separate a city from a region.
499 No comma is needed to separate a city or region from the IOC country code. A
500 later section of this document gives a list of three letter nation codes along
501 with a few additions for "locations" not covered by the IOC.
517 tag value field always uses a standard ten character format: "YYYY.MM.DD". The
518 first four characters are digits that give the year, the next character is a
520 character is a period, and the final two characters are digits that give the
535 The Round tag value gives the playing round for the game. In a match
536 competition, this value is the number of the game played. If the use of a
537 round number is inappropriate, then the field should be a single hyphen
538 character. If the round is unknown, a single question mark should appear as
542 rounds and sometimes even have conditional rounds. In these cases, a multipart
543 round identifier can be made from a sequence of integer round numbers separated
559 The names are given as they would appear in a telephone directory. The family
560 or last name appears first. If a first name or first initial is available, it
561 is separated from the family name by a comma and a space. Finally, one or more
562 middle initials may appear. (Wherever a comma appears, the very next character
563 should be a space. Wherever an initial appears, the very next character should
564 be a period.) If the name is unknown, a single question mark should appear as
571 also a computer program should have appropriate version information listed
627 optional annotations, and a single concluding game termination marker.
641 many tokens as possible are placed on a line with the remainder appearing on
644 a single empty line follows the last line of data to conclude the movetext
647 Neither the first or the last character on an export format PGN line is a
674 appearing immediately before a white move element and one for use appearing
675 immediately before a black move element. A white move number indication is
676 formed from the integer giving the fullmove number with a single period
680 All white move elements have a preceding move number indication. A black move
681 element has a preceding move number indication only in two cases: first, if
684 special case where a game starts from a position where Black is the active
693 SAN (Standard Algebraic Notation) is a representation standard for chess moves
709 SAN identifies each of the sixty four squares on the chessboard with a unique
710 two character name. The first character of a square identifier is the file of
711 the square; a file is a column of eight squares designated by a single lower
712 case letter from "a" (leftmost or queenside) up to and including "h" (rightmost
713 or kingside). The second character of a square identifier is the rank of the
714 square; a rank is a row of eight squares designated by a single digit from "1"
722 SAN identifies each piece by a single upper case letter. The standard English
726 The letter code for a pawn is not used for SAN moves in PGN export format
731 It is admittedly a bit chauvinistic to select English piece letters over those
732 from other languages. There is a slight justification in that English is a de
750 used, not the digit zero. The use of a zero character is not only incompatible
754 having all chess move symbols start with a letter; also, it follows the
760 with a promoted piece letter (indicating one of knight, bishop, rook, or queen)
786 a position with two white knights, one on square c3 and one on square g1 and a
788 both could legally move there, then a file disambiguation is needed; the
790 king were at square e1 and a black bishop were at square b4 with a vacant
797 If the move is a checking move, the plus sign "+" is appended as a suffix to
798 the basic SAN move notation; if the move is a checkmating move, the octothorpe
801 Neither the appearance nor the absence of either a check or checkmating
805 and file disabiguation described above. (Note that a difference in checking
806 status for the above may occur only in the case of a discovered check.)
812 described in a later section of this document.
833 movetext section of a PGN game. Import format is somewhat more relaxed and it
839 There are a number of suggested guidelines for use with implementing PGN reader
841 have a PGN reader apply various transformations to attempt to discover the move
854 When exported, a move suffix annotation is translated into the corresponding
855 Numeric Annotation Glyph as described in a later section of this document. For
862 An NAG (Numeric Annotation Glyph) is a movetext element that is used to
863 indicate a simple annotation in a language independent manner. An NAG is
864 formed from a dollar sign ("$") with a non-negative decimal integer suffix.
870 An RAV (Recursive Annotation Variation) is a sequence of movetext containing
874 prior to the RAV. Because the RAV is a recursive construct, it may be nested.
884 is a symbol that is one of the following four values: "1-0" (White wins), "0-1"
888 movetext of a game must match the value of the game's Result tag pair. (While
889 the marker appears as a string in the Result tag, it appears as a symbol
901 Note that if there is more than one player field in an instance of a player
904 "Jones:Smith:Zacharias" (a consultation game), then the WhiteTitle tag could
905 have a value of "IM:-:GM" if Jones was an International Master, Smith was
906 untitled, and Zacharias was a Grandmaster.
932 players. A value of "-" is used for a player without an electronic address.
938 "human" should be used for a person while the value "program" should be used
950 This uses a date value, similar to the Date tag field, that gives the starting
956 This uses a string value giving the name of the sponsor of the event.
961 This uses a string; this is used for the playing section of a tournament (e.g.,
967 This uses a string; this is used for the stage of a multistage event (e.g.,
973 This uses an integer; this identifies the board number in a team event and also
974 in a simultaneous exhibition.
985 This uses a string; this is used for the traditional opening name. This will
987 "v0" described in a later section of this document.
992 This uses a string; this is used to further refine the Opening tag. This will
994 "v1" described in a later section of this document.
999 This uses a string; this is used to further refine the Variation tag. This
1001 opcode "v2" described in a later section of this document.
1014 This uses a string of either the form "XDD" or the form "XDD/DD" where the "X"
1015 is a letter from "A" to "E" and the "D" positions are digits; this is used for
1017 This tag pair is associated with the use of the EPD opcode "eco" described in a
1023 This uses a string; this is used for an opening designation from the _New in
1025 "nic" described in a later section of this document.
1031 information associated with a game.
1036 This uses a time-of-day value in the form "HH:MM:SS"; similar to the Date tag
1062 This uses a list of one or more time control fields. Each field contains a
1070 The first kind is a single question mark ("?") which means that the time
1073 The second kind is a single hyphen ("-") which means that there was no time
1077 by a solidus ("/") character. The first integer is the number of moves in the
1078 period and the second is the number of seconds in the period. Thus, a time
1081 The fourth TimeControl field kind is used for a "sudden death" control period.
1082 It should only be used for the last descriptor in a TimeControl tag value. It
1083 is sometimes the only descriptor present. The format consists of a single
1084 integer that gives the number of seconds in the period. Thus, a blitz game
1085 would be represented with a TimeControl tag value of "300".
1088 It should only be used for the last descriptor in a TimeControl tag value and
1090 positive integers separated by a plus sign ("+") character. The first integer
1096 The sixth TimeControl field kind is used for a "sandclock" or "hourglass"
1097 control period. It should only be used for the last descriptor in a
1099 format consists of an asterisk ("*") immediately followed by a positive
1101 period. The time control is implemented as if a sandclock were set at the
1103 and the players invert the sandclock after each move with a time forfeit
1104 indicated by an empty upper chamber. Electronic implementation of a physical
1105 sandclock may be used. An example sandclock specification for a common three
1106 minute egg timer sandclock would have a tag value of "*180".
1121 A value of "1" indicates that the game started from a set-up position; this
1122 position is given in the "FEN" tag pair. This tag must appear for a game
1123 starting with a set-up position. If it appears with a tag value of "1", a FEN
1129 This tag uses a string that gives the Forsyth-Edwards Notation for the starting
1130 position used in the game. FEN is described in a later section of this
1131 document. If a SetUp tag appears with a tag value of "1", the FEN tag pair is
1137 There is a single tag that discusses the conclusion of the game.
1142 This takes a string that describes the reason for the conclusion of the game.
1156 * "normal": game terminated in a normal fashion.
1175 This tag uses a name or names in the format of the player name tags; this
1181 This uses a string that gives the playing mode of the game. Examples: "OTB"
1188 This tag takes a single integer that gives the number of ply (moves) in the
1194 NAG zero is used for a null annotation; it is provided for the convenience of
1195 software designers as a placeholder value and should probably not be used in
1207 nature; they are likely to be changed as a result of reviewer feedback.
1225 14 White has a slight advantage
1226 15 Black has a slight advantage
1227 16 White has a moderate advantage
1228 17 Black has a moderate advantage
1229 18 White has a decisive advantage
1230 19 Black has a decisive advantage
1231 20 White has a crushing advantage (Black should resign)
1232 21 Black has a crushing advantage (White should resign)
1235 24 White has a slight space advantage
1236 25 Black has a slight space advantage
1237 26 White has a moderate space advantage
1238 27 Black has a moderate space advantage
1239 28 White has a decisive space advantage
1240 29 Black has a decisive space advantage
1241 30 White has a slight time (development) advantage
1242 31 Black has a slight time (development) advantage
1243 32 White has a moderate time (development) advantage
1244 33 Black has a moderate time (development) advantage
1245 34 White has a decisive time (development) advantage
1246 35 Black has a decisive time (development) advantage
1249 38 White has a lasting initiative
1250 39 Black has a lasting initiative
1259 48 White has a slight center control advantage
1260 49 Black has a slight center control advantage
1261 50 White has a moderate center control advantage
1262 51 Black has a moderate center control advantage
1263 52 White has a decisive center control advantage
1264 53 Black has a decisive center control advantage
1265 54 White has a slight kingside control advantage
1266 55 Black has a slight kingside control advantage
1267 56 White has a moderate kingside control advantage
1268 57 Black has a moderate kingside control advantage
1269 58 White has a decisive kingside control advantage
1270 59 Black has a decisive kingside control advantage
1271 60 White has a slight queenside control advantage
1272 61 Black has a slight queenside control advantage
1273 62 White has a moderate queenside control advantage
1274 63 Black has a moderate queenside control advantage
1275 64 White has a decisive queenside control advantage
1276 65 Black has a decisive queenside control advantage
1277 66 White has a vulnerable first rank
1278 67 Black has a vulnerable first rank
1279 68 White has a well protected first rank
1280 69 Black has a well protected first rank
1281 70 White has a poorly protected king
1282 71 Black has a poorly protected king
1283 72 White has a well protected king
1284 73 Black has a well protected king
1285 74 White has a poorly placed king
1286 75 Black has a poorly placed king
1287 76 White has a well placed king
1288 77 Black has a well placed king
1289 78 White has a very weak pawn structure
1290 79 Black has a very weak pawn structure
1291 80 White has a moderately weak pawn structure
1292 81 Black has a moderately weak pawn structure
1293 82 White has a moderately strong pawn structure
1294 83 Black has a moderately strong pawn structure
1295 84 White has a very strong pawn structure
1296 85 Black has a very strong pawn structure
1370 11.2: File name formation for PGN data for a specific player
1372 PGN games for a specific player should have a file name consisting of the
1376 11.3: File name formation for PGN data for a specific event
1378 PGN games for a specific event should have a file name consisting of the
1386 games for a given year would have an eight character name in the format
1387 "YYYY.pgn". A file containing PGN data for a given month would have a ten
1388 character name in the format "YYYYMM.pgn". Finally, a file for PGN games for a
1389 single day would have a twelve character name in the format "YYYYMMDD.pgn".
1394 characters in a Date tag value will be treated as zero digits for collation
1395 within a file and also for file naming.
1399 for a given year would have a four character name in the format "YYYY";
1400 directories containing PGN files for a given month would have a six character
1410 * PGN/Events: directory of PGN files, each for a specific event
1430 * PGN/Players: directory of PGN files, each for a specific player
1445 There is a standard sorting order for PGN games within a file. This collation
1450 appear prior to games played at a later date. This field is sorted by
1462 character is ordered before a hyphen character.
1487 processing. These are described in a later section of this document.
1493 chess software that use the standard. If a particular vendor does not offer
1494 PGN compatibility, it is likely that a few letters to them along with a copy of
1501 are encouraged to first retrieve the file "pub/chess/ls-lR.gz" for a current
1508 provided the ftp site ftp.math.uni-hamburg.de; this carries a daily mirror of
1516 "SAN.tar.gz" (a gzip tar archive). This kit contains code for PGN import and
1529 graphical user interface for scanning PGN data files. This program includes a
1539 The program "mail2pgn" produces a PGN version of chess game data generated by
1548 There is a report that mail2pgn has been superseded by the newer program
1554 "XBoard" is a comprehensive chess utility running under the X Window System
1555 that provides a graphical user interface in a portable manner. A new version
1600 There is a report of a freeware program, "PGN2CA", that will convert PGN
1625 having BOOKUP export a database in EPD format, then having an analyst program
1626 annotate each EPD record with a numeric score, and then having BOOKUP import
1632 standard minimaxing. In any case, it's a good example of how different
1634 integrated by use of a common, non-proprietary standard. This allows for a new
1642 opcode in the EPD description in a later section of this document. To ensure
1680 The chess database "Deja Vu" from ChessWorks is a PGN compatible collection of
1694 "mail2pgn" and was needed due to a change in ICS recording format in late 1993.
1718 "Slappy the Database" is a commercial chess database and translation program
1719 scheduled for release no sooner than late 1994. It is a low cost utility with
1720 a simple character interface intended for those who want a supported product
1721 but who do not need (or cannot afford) a comprehensive, feature-laden program
1722 with a graphical user interface. Slappy's two most important features are its
1728 Slappy may also be useful to those who have a full feature program who also
1729 need to run time consuming chess database tasks on a spare computer.
1737 "CBASCII" is a general utility for converting chess data between ChessBase
1746 "ZZZZZZ" is a chessplaying program, complete with source, that also includes
1776 The ideas behind CHESSOP can be seen in CHESSOPN (alias CHESSOPG), a free
1777 version on the ICS server which has a reduced openings database (25,000
1785 The program "CAT2PGN" is a utility that translates data from the format used by
1793 The utility "pgn2opg" can be used to convert PGN files into a text format used
1806 The European site ftp.math.uni-hamburg.de is also reported to carry a regularly
1982 FEN is "Forsyth-Edwards Notation"; it is a standard for describing chess
1989 A text file composed exclusively of FEN data records should have a file name
1995 FEN is based on a 19th century standard for position recording designed by the
1996 Scotsman David Forsyth, a newspaper journalist. The original Forsyth standard
2002 16.1.2: Uses for a position notation
2004 Having a standard position notation is particularly important for chess
2007 tests for chessplaying programs, and by using a common position notation format
2008 many hours of tedious data entry can be saved. Additionally, a position
2020 These can all fit on a single text line in an easily read format. The length
2021 of a FEN position description varies somewhat according to the position. In
2027 printing ASCII characters. Adjacent fields are separated by a single ASCII
2035 rank. For each rank, the squares are specified from file a to file h. White
2039 count of contiguous empty squares along a rank. A solidus character "/" is
2046 White is to move; a lower case "b" is used if Black is the active player.
2054 the single character symbol "-" is used. Otherwise, a combination of from one
2068 passant target square then is represented by a lowercase file character
2069 immediately followed by a rank digit. Obviously, the rank digit will be "3"
2070 following a white pawn double advance (Black is the active color) or else be
2071 the digit "6" after a black pawn double advance (White being the active color).
2073 An en passant target square is given if and only if the last move was a pawn
2075 a square name even if there is no pawn of the opposing side that may
2081 The fifth field is a nonnegative integer representing the halfmove clock. This
2088 The sixth and last field is a positive integer that gives the fullmove number.
2089 This will have the value "1" for the first move of a game for both White and
2111 For two kings on their home squares and a white pawn on e2 (White to move) with
2120 EPD is "Extended Position Description"; it is a standard for describing chess
2130 A text file composed exclusively of EPD data records should have a file name
2156 and the en passant target square of a position. These can all fit on a single
2168 Adjacent data fields are separated by a single ASCII space character.
2175 rank. For each rank, the squares are specified from file a to file h. White
2179 count of contiguous empty squares along a rank. A solidus character "/" is
2186 White is to move; a lower case "b" is used if Black is the active player.
2194 the single character symbol "-" is used. Otherwise, a combination of from one
2208 passant target square then is represented by a lowercase file character
2209 immediately followed by a rank digit. Obviously, the rank digit will be "3"
2210 following a white pawn double advance (Black is the active color) or else be
2211 the digit "6" after a black pawn double advance (White being the active color).
2213 An en passant target square is given if and only if the last move was a pawn
2215 a square name even if there is no pawn of the opposing side that may
2222 is concluded by a semicolon.
2224 Multiple operations are separated by a single space character. If there is at
2226 (fourth) data field by a single space character.
2231 An opcode is an identifier that starts with a letter character and may be
2232 followed by up to fourteen more characters. Each additional character may be a
2233 letter or a digit or the underscore character.
2235 An operand is either a set of contiguous non-white space printing characters or
2236 a string. A string is a set of contiguous printing characters delimited by a
2240 If at least one operand is present in an operation, there is a single space
2242 in an operation, there is a single blank character between every two adjacent
2243 operands. If there are no operands, a semicolon character is appended to the
2247 Any given opcode appears at most once per EPD record. Multiple operations in a
2249 (mnemonics). However, a program reading EPD records may allow for operations
2262 should be represented using SAN. If a different representation is used, there
2267 require that an integer operand must be within a given range; the details are
2268 described in the opcode list given below. A negative integer is formed with a
2270 sign may be used for indicating a non-negative value, but such use is not
2274 Some opcodes may require that a floating point operand must be within a given
2276 point operand is constructed from an optional sign character ("+" or "-"), a
2277 digit sequence (with at least one digit), a radix point (always "."), and a
2284 starts with a lower case letter and is composed of only lower case letters,
2288 Opcode mnemonics used only by a single program or an experimental suite of
2291 When a such a "private" opcode be demonstrated to be widely useful, it should
2292 be brought into the official list (appearing below) in a lower case form.
2294 If a given program does not recognize a particular opcode, that operation is
2307 The opcode "acn" takes a single non-negative integer operand. It is used to
2309 be quite large for some extended searches and so use of (at least) a long (four
2315 The opcode "acs" takes a single non-negative integer operand. It is used to
2317 be quite large for some extended searches and so use of (at least) a long (four
2323 The opcode "am" indicates a set of zero or more moves, all immediately playable
2325 writer. Each operand is a SAN move; they appear in ASCII order.
2330 The opcode "bm" indicates a set of zero or more moves, all immediately playable
2332 writer. Each operand is a SAN move; they appear in ASCII order.
2337 The opcode "c0" (lower case letter "c", digit character zero) indicates a top
2339 ranked comments, each of which has a mnemonic formed from the lower case letter
2340 "c" followed by a single decimal digit. Each of these opcodes takes either a
2344 commentary for a complete game or game fragment. The usual processing of these
2347 1) At the beginning of a game (or game fragment), a move sequence scanning
2360 null. (This is the set "cN" though "c9".) Second, and only if a string
2368 units. It takes a single operand, an optionally signed integer that gives an
2370 player with the move. Positive values indicate a position favorable to the
2371 moving player while negative values indicate a position favorable to the
2373 value close to zero indicates a neutral positional evaluation.
2378 A value greater than 32000 indicates the availability of a forced mate to the
2380 evaluation from the value 32767. Thus, a winning mate in N fullmoves is a mate
2381 in ((2 * N) - 1) halfmoves (or ply) and has a corresponding centipawn
2382 evaluation of (32767 - ((2 * N) - 1)). For example, a mate on the move (mate
2383 in one) has a centipawn evaluation of 32766 while a mate in five has a
2386 A value less than -32000 indicates the availability of a forced mate to the
2388 evaluation from the value -32767 and then negating the result. Thus, a losing
2389 mate in N fullmoves is a mate in (2 * N) halfmoves (or ply) and has a
2390 corresponding centipawn evaluation of (-32767 + (2 * N)). For example, a mate
2391 after the move (losing mate in one) has a centipawn evaluation of -32765 while
2392 a losing mate in five has a centipawn evaluation of -32757.
2394 A value of -32767 indicates an illegal position. A stalemate position has a
2395 centipawn evaluation of zero as does a position drawn due to insufficient
2396 mating material. Any other position known to be a certain forced draw also has
2397 a centipawn evaluation of zero.
2404 takes a single operand which is a positive integer giving the fullmove count.
2405 For example, a position known to be a "mate in three" would have an operation
2412 16.2.5.8: Opcode "draw_accept": accept a draw offer
2414 The opcode "draw_accept" is used to indicate that a draw offer made after the
2419 16.2.5.9: Opcode "draw_claim": claim a draw
2421 The opcode "draw_claim" is used to indicate claim by the active player that a
2422 draw exists. The draw is claimed because of a third time repetition or because
2428 16.2.5.10: Opcode "draw_offer": offer a draw
2430 The opcode "draw_offer" is used to indicate that a draw is offered by the
2436 16.2.5.11: Opcode "draw_reject": reject a draw offer
2438 The opcode "draw_reject" is used to indicate that a draw offer made after the
2447 opcode takes either a single string operand (the ECO opening name) or no
2458 It always takes a single operand that is the positive integer value of the move
2473 The halfmove clock of a position is equal to the number of plies since the last
2475 draw rule. It always takes a single operand that is the non-negative integer
2489 The opcode "id" is used to provide a simple identifying label for the indicated
2490 position. It takes a single string operand.
2503 Chess_ taxonomy with the indicated position. The opcode takes either a single
2521 The "pm" opcode is used to provide a single predicted move for the indicated
2522 position. It has exactly one operand, a move playable from the position. This
2526 If a non-empty "pv" (predicted variation) line of play is also present in the
2530 The "pm" opcode is intended for use as a general "display hint" mechanism.
2535 The "pv" opcode is used to provide a predicted variation for the indicated
2536 position. It has zero or more operands which represent a sequence of moves
2540 If a "pm" (predicted move) operation is also present in the same EPD record,
2547 position. It takes a single, positive integer operand. Any position,
2549 at least one. A value of three indicates a candidate for a draw claim by the
2561 The "sm" opcode is used to provide a single supplied move for the indicated
2562 position. It has exactly one operand, a move playable from the position. This
2567 automatic play via a network. This includes correspondence play using e-mail
2574 games conducted via e-mail and similar means. This opcode takes a single
2575 operand that is a positive integer. It is used to select among various games
2599 The opcode "v0" (lower case letter "v", digit character zero) indicates a top
2601 ten ranked variation names, each of which has a mnemonic formed from the lower
2602 case letter "v" followed by a single decimal digit. Each of these opcodes
2603 takes either a single string operand or no operand at all.
2606 traditional variation names for a complete game or game fragment. The usual
2609 1) At the beginning of a game (or game fragment), a move sequence scanning
2622 set to null. (This is the set "vN" though "v9".) Second, and only if a string
2632 use piece letter codes common in their locales. This is not a problem as long
2636 For the above authors only, a list of alternative piece letter codes are
2704 The binary coded version of PGN is PGC (PGN Game Coding). PGC is a binary
2706 efficiency and program I/O. A file containing PGC data should have a name with
2707 a suffix of ".pgc".
2721 PGC data is composed of a sequence of PGC records. Each record is composed of
2722 a sequence of one or more bytes. The first byte is the PGN record marker and
2732 a byte are used. Longwords (eight contiguous bytes) are not used. Integer
2746 A chess move is represented using a move ordinal. This is a single unsigned
2751 order. Note that a seven bit ordinal, as used by some inferior representation
2761 set is a list of moves that are all playable from the current position.
2763 Move sequence data is represented using a length header followed by move
2764 ordinal data. The length header is an unsigned integer that may be a byte or a
2766 bytes. Most move sequences can be represented using just a byte header; these
2767 are called "mvseq-1" items. Move sequence data using a word header are called
2770 Move set data is represented using a length header followed by move ordinal
2771 data. The length header is an unsigned integer that is a byte. The integer
2773 sets are be represented using just a byte header; these are called "mvset-1"
2774 items. (Note the implied restriction that a move set can only have a maximum
2780 PGC string data is represented using a length header followed by bytes of
2781 character data. The length header is an unsigned integer that may be a byte, a
2782 word, or a doubleword. The integer gives the number, possibly zero, of
2783 following character bytes. Most strings can be represented using just a byte
2784 header; these are called "string-1" items. String data using a word header are
2785 called "string-2" items and string data using a doubleword header are called
2787 storage of a string as the length is explicitly given in the item header.
2799 Marker 0x01 is used to indicate a single complete game in reduced export
2800 format. This refers to a game that has only the Seven Tag Roster data, played
2827 Marker 0x02 is used to indicate a single tag pair. There are two items that
2837 Marker 0x03 is used to indicate a short move sequence. There is one item that
2845 Marker 0x04 is used to indicate a long move sequence. There is one item that
2853 Marker 0x05 is used to indicate the beginning of data for a game. It has no
2854 associated items; it is a complete record by itself. Instead, it marks the
2855 beginning of PGC records used to describe a game. All records up to the
2858 permitted to appear within a general game begin/end record pair. The general
2860 cases where the latter is too restrictive to contain the data for a game.)
2865 Marker 0x06 is used to indicate the end of data for a game. It has no
2866 associated items; it is a complete record by itself. Instead, it marks the end
2867 of PGC records used to describe a game. All records after the corresponding
2874 Marker 0x07 is used to indicate the presence of a simple NAG (Numeric
2875 Annotation Glyph). This is an annotation marker that has only a short type
2885 Variation). It has no associated items; it is a complete record by itself.
2886 Instead, it marks the beginning of PGC records used to describe a recursive
2887 annotation. It is considered an opening bracket for a later rav-end record;
2895 Variation). It has no associated items; it is a complete record by itself.
2896 Instead, it marks the end of PGC records used to describe a recursive
2897 annotation. It is considered a closing bracket for an earlier rav-begin
2904 Marker 0x0a is used to indicate the presence of an escape string. This is a
2908 is the case with the PGN percent sign escape, the use of a PGC escape-string