]> code.delx.au - gnu-emacs-elpa/blob - doc/EPD.txt
Except for when making moves interactively (with chess-display-manual-move),
[gnu-emacs-elpa] / doc / EPD.txt
1 EPD_Spec: Extended Position Description Specification
2
3 Revised: 1995.11.26
4
5 Technical contact: sje@mv.mv.com (Steven J. Edwards)
6
7 1: Introduction
8
9 EPD is "Extended Position Description". It is a standard for describing
10 chess positions along with an extended set of structured attribute
11 values using the ASCII character set. It is intended for data and
12 command interchange among chessplaying programs. It is also intended
13 for the representation of portable opening library repositories and for
14 problem test suites.
15
16 EPD is an open standard and is freely available for use by both research
17 and commercial programs without charge. The only requirement for use is
18 that any proposed extensions be coordinated through the technical
19 contact given at the start of this document.
20
21 A single EPD record uses one text line of variable length composed of
22 four data fields followed by zero or more operations. A text file
23 composed exclusively of EPD data records should have a file name with
24 the suffix ".epd".
25
26 2: History
27
28 EPD was created in 1993 and is based in part on the earlier FEN standard
29 (Forsyth-Edwards Notation) for representing chess positions. Compared
30 to FEN, EPD has added extensions for use with opening library
31 preparation and also for general data and command interchange among
32 advanced chess programs. EPD was developed by John Stanback and Steven
33 Edwards; its first implementation was in Stanback's commercial
34 chessplaying program Zarkov and its second implementation was in
35 Edwards' research chessplaying program Spector. So many programs have
36 since adopted EPD that no one knows the exact sequence thereafter.
37
38 EPD is employed for storing test suites for chessplaying programs and
39 for recording the results of programs running these test suites.
40 Example test suites are available for researchers via anonymous ftp from
41 the chess.onenet.net site in the pub/chess/Tests directory. The ASCII
42 text file pub/chess/Tests/Manifest gives descriptions of the contents of
43 the various test suite files.
44
45 EPD is used to provide a linkage mechanism between chessplaying programs
46 and position database programs to support the automated direction of
47 analysis generation.
48
49 3: EPD tools and applications
50
51 To encourage development of EPD capable applications, a free EPD tool
52 kit is available for program authors working with the ANSI C language.
53 To further encourage usage of EPD, a number of free applications are
54 also available.
55
56 3.1: The EPD Kit
57
58 Work is currently in progress on developing an EPD Kit. This tool kit
59 is a collection of portable ANSI C source code files that provide
60 routines to create and manipulate EPD data for arbitrarily complex
61 records. It is designed to handle all common EPD related tasks so as to
62 assist chess program developers with EPD implementation. A secondary
63 goal is to ensure that every implementation of EPD processing have the
64 same set of operational semantics.
65
66 The EPD Kit will be made freely available to all chess software authors
67 without charge and can be used in both research and commercial
68 applications. As with EPD itself, the only requirement for use is that
69 any proposed extensions be coordinated through the technical contact
70 given at the start of this document.
71
72 3.2: Argus, the automated tournament referee
73
74 Work is currently in progress on developing Argus, an automated
75 tournament referee program for computer chess events. Argus uses IP
76 (Internet Protocol) communications to act as a mediator for multiple
77 pairs of chessplaying programs and to provide an interactive interface
78 for a human tournament supervisor. Argus uses the EPD Kit along with
79 other routines to perform the following tasks:
80
81 1) Starting chessplaying programs (IP clients) with proper
82 initialization data;
83
84 2) Relaying position/move data (using EPD) from each program to its
85 opponent;
86
87 3) Providing all chess clock data as part of the relay process;
88
89 4) Record all games using PGN (Portable Game Notation) to assist in the
90 production of the tournament final report;
91
92 5) Record all moves and other transmitted data in log files for later
93 analysis;
94
95 6) Detect and report time forfeit conditions;
96
97 7) Mediate draw offers and responses between each pair of opponents;
98
99 8) Recognize and handle game termination conditions due to draws,
100 resignations, time forfeits, and checkmates;
101
102 9) Allow for chessplaying program restart and game resumption as
103 directed by the human supervisor;
104
105 10) Allow for a second instance of itself to operate in observer mode to
106 be ready to take over in case of primary machine failure;
107
108 11) Support display of games in progress for the benefit of the human
109 supervisor and for the general viewing audience.
110
111 In its usual configuration, Argus runs on an IP network that connects it
112 with all of the participating machines. It acts like a Unix style
113 server using TCP/IP; the chessplaying programs connect to Argus as
114 TCP/IP clients. Unlike a typical Unix style server, it runs in the
115 foreground instead of the background when operated by a human
116 supervisor.
117
118 One variant mode of operation allows for Argus to be started by the host
119 system and run in the background. This use is intended for events where
120 human supervision is not required. Any operating information usually
121 provided manually may instead be supplied by configuration files.
122
123 Another variant mode of operation allows for Argus to mediate
124 communication between a single pair of chessplaying programs using
125 regular (unstructured) bidirectional asynchronous serial communication
126 instead of IP. While less reliable than IP operation, unstructured
127 serial communication can be used on common inexpensive hardware
128 platforms that lack IP support. An example would be to use common PC
129 machines with each chessplaying program running on a separate machine
130 and a third machine running Argus in serial mode. Each of the two
131 machines with chessplaying programs connect to the Argus machine via a
132 null modem cable. Note that the Argus machine needs two free serial
133 ports while each of the chessplaying machines needs only a single free
134 serial port.
135 The Argus program will be made freely available to all chess software
136 authors without charge and can be used in both research and commercial
137 applications. As with EPD itself, the only requirement for use is that
138 any proposed extensions be coordinated through the technical contact
139 given at the start of this document.
140
141 3.3: Gastric, an EPD based report generator
142
143 Work is in progress on Gastric, an application that reads EPD files and
144 produces statistical reports. The main use of Gastric is to assist in
145 the process of benchmarking chessplaying program performance on EPD test
146 suites. The resulting reports contain summaries of raw performance,
147 identification of solved/missed problems, distribution information for
148 node count, time consumption, and other items. Advanced functions of
149 Gastric may be used to produce comparative analysis of different
150 programs or different versions of the same program. Some work is also
151 planned to allow Gastric output to be used as feedback into
152 self-adjusting chessplaying programs.
153
154 The Gastric program will be made freely available to all chess software
155 authors without charge and can be used in both research and commercial
156 applications. As with EPD itself, the only requirement for use is that
157 any proposed extensions be coordinated through the technical contact
158 given at the start of this document.
159
160 4: The four EPD data fields
161
162 Each EPD record contains four data filed that describe the current
163 position. From left to right starting at the beginning of the record,
164 these are the piece placement, the active color, the castling
165 availability, and the en passant target square of a position. These can
166 all fit on a single text line in an easily read format. The length of
167 an EPD position description varies somewhat according to the position
168 and any associated operations. In some cases, the description could be
169 eighty or more characters in length and so may not fit conveniently on
170 some displays. However, most EPD records pass among programs only and
171 so are not usually seen by program users.
172
173 Note: due to the likelihood of future expansion of EPD, implementors are
174 encouraged to have their programs handle EPD text lines of up to 4096
175 characters long including the traditional ASCII NUL character as a
176 terminator. This is an increase from the earlier suggestion of a
177 maximum length of 1024 characters. Depending on the host operating
178 system, the external representation of EPD records will include one or
179 more bytes to indicate the end of a line. These do not count against
180 the length limit as the internal representation of an EPD text record is
181 stripped of end of line bytes and instead is terminated by the
182 traditional ASCII NUL character.
183
184 Each of the four EPD data fields are composed only of non-blank printing
185 ASCII characters. Adjacent data fields are separated by a single ASCII
186 space character.
187
188 4.1: Piece placement data
189
190 The first field represents the placement of the pieces on the board.
191 The board contents are specified starting with the eighth rank and
192 ending with the first rank. For each rank, the squares are specified
193 from file a to file h. White pieces are identified by uppercase SAN
194 (Standard Algebraic Notation) piece letters ("PNBRQK") and black pieces
195 are identified by lowercase SAN piece letters ("pnbrqk"). Empty squares
196 are represented by the digits one through eight; the digit used
197 represents the count of contiguous empty squares along a rank. The
198 contents of all eight squares on each rank must be specified; therefore,
199 the count of piece letters plus the sum of the vacant square counts must
200 always equal eight. The solidus character "/" (forward slash) is used
201 to separate data of adjacent ranks. There is no leading or trailing
202 solidus in the piece placement data; hence there are exactly seven of
203 solidus characters in the placement field.
204
205 The piece placement data for the starting array is:
206
207 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
208
209 4.2: Active color
210
211 The second field represents the active color. A lower case "w" is used
212 if White is to move; a lower case "b" is used if Black is the active
213 player.
214
215 The piece placement and active color data for the starting array is:
216
217 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w
218
219 4.3: Castling availability
220
221 The third field represents castling availability. This indicates
222 potential future castling that may or may not be possible at the moment
223 due to blocking pieces or enemy attacks. If there is no castling
224 availability for either side, the single character symbol "-" is used.
225 Otherwise, a combination of from one to four characters are present. If
226 White has kingside castling availability, the uppercase letter "K"
227 appears. If White has queenside castling availability, the uppercase
228 letter "Q" appears. If Black has kingside castling availability, the
229 lowercase letter "k" appears. If Black has queenside castling
230 availability, then the lowercase letter "q" appears. Those letters
231 which appear will be ordered first uppercase before lowercase and second
232 kingside before queenside. There is no white space between the letters.
233
234 The piece placement, active color, and castling availability data for
235 the starting array is:
236
237 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
238
239 4.4: En passant target square
240
241 The fourth field is the en passant target square. If there is no en
242 passant target square then the single character symbol "-" appears. If
243 there is an en passant target square then is represented by a lowercase
244 file character (one of "abcdefgh") immediately followed by a rank digit.
245 Obviously, the rank digit will be "3" following a white pawn double
246 advance (Black is the active color) or else be the digit "6" after a
247 black pawn double advance (White being the active color).
248
249 An en passant target square is given if and only if the last move was a
250 pawn advance of two squares. Therefore, an en passant target square
251 field may have a square name even if there is no pawn of the opposing
252 side that may immediately execute the en passant capture.
253
254 The piece placement, active color, castling availability, and en passant
255 target square data for the starting array is:
256
257 rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -
258
259 5: Operations
260
261 An EPD operation is composed of an opcode followed by zero or more
262 operands and is concluded by a semicolon.
263
264 Multiple operations are separated by a single space character. If there
265 is at least one operation present in an EPD line, it is separated from
266 the last (fourth) data field by a single space character.
267
268 5.1: General format of opcodes and operands
269
270 An opcode is an identifier that starts with a letter character and may
271 be followed by up to fourteen more characters. Each additional
272 character may be a letter or a digit or the underscore character.
273 Traditionally, no uppercase letters are used in opcode names that are to
274 be used by more than one program.
275
276 An operand is either a set of contiguous non-white space printing
277 characters or a string. A string is a set of contiguous printing
278 characters delimited by a quote (ASCII code: 34 decimal, 0x22
279 hexadecimal) character at each end. A string value must have less than
280 256 bytes of data. This count does not include the traditional ASCII
281 NUL character terminator.
282
283 If at least one operand is present in an operation, there is a single
284 space between the opcode and the first operand. If more than one
285 operand is present in an operation, there is a single blank character
286 between every two adjacent operands. If there are no operands, a
287 semicolon character is appended to the opcode to mark the end of the
288 operation. If any operands appear, the last operand has an appended
289 semicolon that marks the end of the operation.
290
291 Any given opcode appears at most once per EPD record. Multiple
292 operations in a single EPD record should appear in ASCII order of their
293 opcode names (mnemonics). However, a program reading EPD records may
294 allow for operations not in ASCII order by opcode mnemonics; the
295 semantics are the same in either case.
296
297 Some opcodes that allow for more than one operand may have special
298 ordering requirements for the operands. For example, the "pv"
299 (predicted variation) opcode requires its operands (moves) to appear in
300 the order in which they would be played. Most other opcodes that allow
301 for more than one operand should have operands appearing in ASCII order.
302 An example of the latter set is the "bm" (best move[s]) opcode; its
303 operands are moves that are all immediately playable from the current
304 position.
305
306 5.2: Operand basetypes
307
308 Operand values are represented using a variety of basetypes.
309
310 5.2.1: Identifier basetype
311
312 Some opcodes require one of more operands that are identifiers. An
313 identifier is an unquoted sequence of one to fifteen characters. The
314 characters are selected from the upper and lower case letters, the ten
315 digits, and the underscore character. Most identifiers that may appear
316 in EPD are taken from predefined sets as explained in the sections
317 covering opcode semantics.
318
319 Identifiers are most often used to select one value from a list of
320 possible values for a general attribute. They are also used to
321 represent PGN tag attributes.
322
323 5.2.2: Chess move basetype
324
325 Some opcodes require one or more operands that are chess moves. These
326 moves should be represented using SAN (Standard Algebraic Notation). If
327 a different representation is used, there is no guarantee that the EPD
328 will be read correctly during subsequent processing. In particular, EDN
329 (English Descriptive Notation), CCN (Computer Coordinate Notation), and
330 LAN (Long Algebraic Notation) are explicitly not supported.
331
332 Chess moves are used most often in single operand operations to select
333 one move from the available moves. They are also used in multiple
334 operand operations to define a set of moves (all taken from available
335 moves) and in multiple operand operations to express a sequence of moves
336 (taken from moves available at each point in a forward sequence of
337 play).
338
339 Note that some chess moves also qualify as identifiers. However, the
340 semantics of a particular opcode dictate the exact basetype
341 interpretation of its operands, so there is no ambiguity.
342
343 5.2.3: Integer basetype
344
345 Some opcodes require one or more operands that are integers. Some
346 opcodes may require that an integer operand must be within a given
347 range; the details are described in the opcode list given below. A
348 negative integer is formed with a hyphen (minus sign) preceding the
349 integer digit sequence. An optional plus sign may be used for
350 indicating a non-negative value, but such use is not required and is
351 discouraged. Support for integers in the range -2147483648 to
352 2147483647 (32 bit two's complement signed extrema) is required.
353
354 Integers are used to represent centipawn scores and also for various
355 counts, limits, and totals.
356
357 5.2.4: Floating basetype
358
359 Some opcodes require one or more operands that are floating point
360 numbers. Some opcodes may require that a floating point operand must be
361 within a given range; the details are described in the opcode list given
362 below. A floating point operand is constructed from an optional sign
363 character ("+" or "-"), a digit sequence (with at least one digit), a
364 radix point (always "."), and a final digit sequence (with at least one
365 digit). There is currently no provision for scientific representation
366 of numeric values.
367
368 The floating basetype in not in current use.
369
370 5.2.5: Date basetype
371
372 Some opcodes require one or more operands that represent dates. These
373 are given in a special date format composed of ten characters. The
374 first four characters are digits that give the year (0001-9999), the
375 fifth character is a period, the sixth and seventh characters are digits
376 that give the month number (01-12), the eighth character is a period,
377 and the ninth and tenth characters are digits that give the day number
378 in the month (01-31).
379
380 The date basetype is used to specify date values in timestamps.
381
382 5.2.6: Time of day basetype
383
384 Some opcodes require one or more operands that represent a time of day.
385 These are given in a special time of day format composed of eight
386 characters. The first two characters are digits that give the hour
387 (00-23), the third character is a colon, the fourth and fifth characters
388 are digits that give the minute (00-59), the sixth character is a colon,
389 and the seventh and eighth characters are digits that give the second
390 (00-59).
391
392 The time of day basetype is used to specify time of day values in
393 timestamps.
394
395 5.2.7: Clock basetype
396
397 Some opcodes require one or more operands that represent a total amount
398 of time as would be measured by a traditional digital clock. These are
399 given in a special clock format composed of 12 characters. The first
400 three characters are digits giving a count of days (000-999), the fourth
401 character is a colon, the fifth and sixth characters are digits giving a
402 count of hours (00-23), the seventh character is a colon, the eighth and
403 ninth characters are digits giving a count of minutes (00-59), the tenth
404 character is a colon, and the eleventh and twelfth characters are digits
405 giving a count of seconds (00-59).
406
407 The clock basetype is used to specify clock values for chess clock
408 information. It is not used to measure time consumption for a search;
409 an integer count of seconds is used instead.
410
411 5.3: Opcode mnemonics
412
413 An opcode mnemonic used for archival storage and for interprogram
414 communication starts with a lower case letter and is composed of only
415 lower case letters, digits, and the underscore character (i.e., no upper
416 case letters). Mnemonics are all at least two characters long.
417
418 Opcode mnemonics used only by a single program or an experimental suite
419 of programs should start with an upper case letter. This is so they may
420 be easily distinguished should they be inadvertently be encountered by
421 other programs. When a such a "private" opcode be demonstrated to be
422 widely useful, it should be brought into the official list (appearing
423 below) in a lower case form.
424
425 If a given program does not recognize a particular opcode, that
426 operation is simply ignored; it is not signaled as an error.
427
428 6: Opcode list
429
430 The opcodes are listed here in ASCII order of their mnemonics.
431 Suggestions for new opcodes should be sent to the technical contact
432 listed near the start of this document.
433
434 6.1: Opcode "acn": analysis count: nodes
435
436 The opcode "acn" takes a single non-negative integer operand. It is
437 used to represent the number of nodes examined in an analysis or search.
438 Note that the value may be quite large for some extended searches and so
439 use of a long (four byte) representation is suggested.
440
441 6.2: Opcode "acs": analysis count: seconds
442
443 The opcode "acs" takes a single non-negative integer operand. It is
444 used to represent the number of seconds used for an analysis or search.
445 Note that the value may be quite large for some extended searches and so
446 use of a long (four byte) representation is suggested. Also note that
447 the special clock format is not used for this operand. Some systems can
448 distinguish between elapsed time and processor time; in such cases, the
449 processor time should be used as its value is usually more indicative of
450 search effort than wall clock time.
451
452 6.3: Opcode "am": avoid move(s)
453
454 The opcode "am" indicates a set of zero or more moves, all immediately
455 playable from the current position, that are to be avoided as a search
456 result. Each operand is a SAN move; they appear in ASCII order.
457
458 6.4: Opcode "bm": best move(s)
459
460 The opcode "bm" indicates a set of zero or more moves, all immediately
461 playable from the current position, that are judged to the best
462 available by the EPD writer and so each is allowable as a search result.
463 Each operand is a SAN move; they appear in ASCII order.
464
465 6.5: Opcode "c0": comment (primary, also "c1" though "c9")
466
467 The opcode "c0" (lower case letter "c", digit character zero) indicates
468 a top level comment that applies to the given position. It is the first
469 of ten ranked comments, each of which has a mnemonic formed from the
470 lower case letter "c" followed by a single decimal digit. Each of these
471 opcodes takes either a single string operand or no operand at all.
472
473 This ten member comment family of opcodes is intended for use as
474 descriptive commentary for a complete game or game fragment. The usual
475 processing of these opcodes are as follows:
476
477 1) At the beginning of a game (or game fragment), a move sequence
478 scanning program initializes each element of its set of ten comment
479 string registers to be null.
480
481 2) As the EPD record for each position in the game is processed, the
482 comment operations are interpreted from left to right. (Actually, all
483 operations in an EPD record are interpreted from left to right.)
484 Because operations appear in ASCII order according to their opcode
485 mnemonics, opcode "c0" (if present) will be handled prior to all other
486 opcodes, then opcode "c1" (if present), and so forth until opcode "c9"
487 (if present).
488
489 3) The processing of opcode "cN" (0 <= N <= 9) involves two steps.
490 First, all comment string registers with an index equal to or greater
491 than N are set to null. (This is the set "cN" though "c9".) Second,
492 and only if a string operand is present, the value of the corresponding
493 comment string register is set equal to the string operand.
494
495 6.6: Opcode "cc": chess clock values
496
497 The opcode "cc" is used to indicate the amount of time used for each
498 side at the time of the writing of the opcode to the EPD record. This
499 opcode always takes two values. Both values are in clock format. The
500 first is the amount of time consumed by White and the second is the
501 amount of time consumed by Black. Note that these values are not simple
502 integers. Also, there is no provision for recording at a resolution of
503 less than one second.
504
505 This opcode is most commonly used by a mediation program as a source of
506 impartial time information for a pair of opposing players.
507
508 6.7: Opcode "ce": centipawn evaluation
509
510 The opcode "ce" indicates the evaluation of the indicated position in
511 centipawn units. It takes a single operand, an optionally signed
512 integer that gives an evaluation of the position from the viewpoint of
513 the active player; i.e., the player with the move. Positive values
514 indicate a position favorable to the moving player while negative values
515 indicate a position favorable to the passive player; i.e., the player
516 without the move. A centipawn evaluation value close to zero indicates
517 a neutral positional evaluation.
518
519 Values are restricted to integers that are equal to or greater than
520 -32768 and
521 are less than or equal to 32766.
522
523 A value greater than 32000 indicates the availability of a forced mate
524 to the active player. The number of plies until mate is given by
525 subtracting the evaluation from the value 32767. Thus, a winning mate
526 in N fullmoves is a mate in ((2 * N) - 1) halfmoves (or ply) and has a
527 corresponding centipawn evaluation of (32767 - ((2 * N) - 1)). For
528 example, a mate on the move (mate in one) has a centipawn evaluation of
529 32766 while a mate in five has a centipawn evaluation of 32758.
530
531 A value less than -32000 indicates the availability of a forced mate to
532 the passive player. The number of plies until mate is given by
533 subtracting the evaluation from the value -32767 and then negating the
534 result. Thus, a losing mate in N fullmoves is a mate in (2 * N)
535 halfmoves (or ply) and has a corresponding centipawn evaluation of
536 (-32767 + (2 * N)). For example, a mate after the move (losing mate in
537 one) has a centipawn evaluation of -32765 while a losing mate in five
538 has a centipawn evaluation of -32757.
539
540 A value of -32767 indicates that the side to move is checkmated. A
541 value of -32768 indicates an illegal position. A stalemate position has
542 a centipawn evaluation of zero as does a position drawn due to
543 insufficient mating material. Any other position known to be a certain
544 forced draw also has a centipawn evaluation of zero.
545
546 6.8: Opcode "dm": direct mate fullmove count
547
548 The "dm" opcode is used to indicate the number of fullmoves until
549 checkmate is to be delivered by the active color for the indicated
550 position. It always takes a single operand which is a positive integer
551 giving the fullmove count. For example, a position known to be a "mate
552 in three" would have an operation of "dm 3;" to indicate this.
553
554 This opcode is intended for use with problem sets composed of positions
555 requiring direct mate answers as solutions.
556
557 6.9: Opcode "draw_accept": accept a draw offer
558
559 The opcode "draw_accept" is used to indicate that a draw offer made
560 after the move that lead to the indicated position is accepted by the
561 active player. This opcode takes no operands.
562
563 The "draw_accept" opcode should not appear on the same EPD record as a
564 "draw_reject" opcode.
565
566 6.10: Opcode "draw_claim": claim a draw
567
568 The opcode "draw_claim" is used to indicate claim by the active player
569 that a draw exists. The draw is claimed because of a third time
570 repetition or because of the fifty move rule or because of insufficient
571 mating material. A supplied move (see the opcode "sm") is also required
572 to appear as part of the same EPD record. The "draw_claim" opcode takes
573 no operands.
574
575 The "draw_claim" opcode should not appear on the same EPD record as a
576 "draw_offer" opcode.
577
578 6.11: Opcode "draw_offer": offer a draw
579
580 The opcode "draw_offer" is used to indicate that a draw is offered by
581 the active player. A supplied move (see the opcode "sm") is also
582 required to appear as part of the same EPD record; this move is
583 considered played from the indicated position. The "draw_offer" opcode
584 takes no operands.
585
586 The "draw_offer" opcode should not appear on the same EPD record as a
587 "draw_claim" opcode.
588
589 6.12: Opcode "draw_reject": reject a draw offer
590
591 The opcode "draw_reject" is used to indicate that a draw offer made
592 after the move that lead to the indicated position is rejected by the
593 active player. This opcode takes no operands.
594
595 The "draw_reject" opcode should not appear on the same EPD record as a
596 "draw_accept" opcode.
597
598 6.13: Opcode "eco": _Encyclopedia of Chess Openings_ opening code
599
600 The opcode "eco" is used to associate an opening designation from the
601 _Encyclopedia of Chess Openings_ taxonomy with the indicated position.
602 The opcode takes either a single string operand (the ECO opening name)
603 or no operand at all. If an operand is present, its value is associated
604 with an "ECO" string register of the scanning program. If there is no
605 operand, the ECO string register of the scanning program is set to null.
606
607 The usage is similar to that of the "ECO" tag pair of the PGN standard.
608
609 6.14: Opcode "fmvn": fullmove number
610
611 The opcode "fmvn" represents the fullmove number associated with the
612 position. It always takes a single operand that is the positive integer
613 value of the move number. The value of the fullmove number for the
614 starting array is one.
615
616 This opcode is used to explicitly represent the fullmove number in EPD
617 that is present by default in FEN as the sixth field. Fullmove number
618 information is usually omitted from EPD because it does not affect move
619 generation (commonly needed for EPD-using tasks) but it does affect game
620 notation (commonly needed for FEN-using tasks). Because of the desire
621 for space optimization for large EPD files, fullmove numbers were
622 dropped from EPD's parent FEN. The halfmove clock information was
623 similarly dropped.
624
625 6.15: Opcode "hmvc": halfmove clock
626
627 The opcode "hmvc" represents the halfmove clock associated with the
628 position. The halfmove clock of a position is equal to the number of
629 plies since the last pawn move or capture. This information is used to
630 implement the fifty move draw rule. It always takes a single operand
631 that is the non-negative integer value of the halfmove clock. The value
632 of the halfmove clock for the starting array is zero.
633
634 This opcode is used to explicitly represent the halfmove clock in EPD
635 that is present by default in FEN as the fifth field. Halfmove clock
636 information is usually omitted from EPD because it does not affect move
637 generation (commonly needed for EPD-using tasks) but it does affect game
638 termination issues (commonly needed for FEN-using tasks). Because of
639 the desire for space optimization for large EPD files, halfmove clock
640 values were dropped from EPD's parent FEN. The fullmove number
641 information was similarly dropped.
642
643 6.16: Opcode "id": position identification
644
645 The opcode "id" is used to provide a simple identification label for the
646 indicated position. It takes a single string operand.
647
648 This opcode is intended for use with test suites used for measuring
649 chessplaying program strength. An example "id" operand for the seven
650 hundred fifty seventh position of the one thousand one problems in
651 Reinfeld's _1001 Winning Chess Sacrifices and Combinations_ would be
652 "WCSAC.0757" while the fifteenth position in the twenty four problem
653 Bratko-Kopec test suite would have an "id" operand of "BK.15".
654
655 6.17: Opcode "nic": _New In Chess_ opening code
656
657 The opcode "nic" is used to associate an opening designation from the
658 _New In Chess_ taxonomy with the indicated position. The opcode takes
659 either a single string operand (the NIC code for the opening) or no
660 operand at all. If an operand is present, its value is associated with
661 an "NIC" string register of the scanning program. If there is no
662 operand, the NIC string register of the scanning program is set to null.
663
664 The usage is similar to that of the "NIC" tag pair of the PGN standard.
665
666 6.18: Opcode "noop": no operation
667
668 The "noop" opcode is used to indicate no operation. It takes zero or
669 more operands, each of which may be of any type. The operation involves
670 no processing. It is intended for use by developers for program testing
671 purposes.
672
673 6.19: Opcode "pm": predicted move
674
675 The "pm" opcode is used to provide a single predicted move for the
676 indicated position. It has exactly one operand, a move playable from
677 the position. This move is judged by the EPD writer to represent the
678 best move available to the active player.
679
680 If a non-empty "pv" (predicted variation) line of play is also present
681 in the same EPD record, the first move of the predicted variation is the
682 same as the predicted move.
683
684 The "pm" opcode is intended for use as a general "display hint"
685 mechanism.
686
687 6.20: Opcode "ptp": PGN tag pair
688
689 The "ptp" opcode is used to record a PGN tag pair. It always takes an
690 even number of operands. For each pair of operands (from left to
691 right), the first operand in the pair is always an identifier and is
692 interpreted as the name of a PGN tag; the second operand in the pair is
693 always a string and is the value associated with the tag given by the
694 first operand.
695
696 Any given PGN tag name should only appear once as a tag identifier
697 operand in a "ptp" operation.
698
699 6.21: Opcode "pv": predicted variation
700
701 The "pv" opcode is used to provide a predicted variation for the
702 indicated position. It has zero or more operands which represent a
703 sequence of moves playable from the position. This sequence is judged
704 by the EPD writer to represent the best play available.
705
706 If a "pm" (predicted move) operation is also present in the same EPD
707 record, the predicted move is the same as the first move of the
708 predicted variation.
709
710 6.22: Opcode "rc": repetition count
711
712 The "rc" opcode is used to indicate the number of occurrences of the
713 indicated position. It takes a single, positive integer operand. Any
714 position, including the initial starting position, is considered to have
715 an "rc" value of at least one. A value of three indicates a candidate
716 for a draw claim by the position repetition rule.
717
718 6.23: Opcode "refcom": referee command
719
720 The "refcom" opcode is used to represent a command from a referee
721 program to a client program during automated competition. It takes a
722 single identifier operand which is to be interpreted as a command by the
723 receiving program. Note that as the operand is an identifier and not a
724 string value, it is not enclosed in quote characters.
725
726 There are seven available operand values: conclude, disconnect, execute,
727 fault, inform, reset, and respond.
728
729 Further details of "refcom" usage are given in the section on referee
730 semantics later in this document.
731
732 6.24: Opcode "refreq": referee request
733
734 The "refreq" opcode is used to represent a request from a client program
735 to the referee program during automated competition. It takes a single
736 identifier operand which is to be interpreted as a request to the
737 referee from a client program. Note that as the operand is an
738 identifier and not a string value, it is not enclosed in quote
739 characters.
740
741 There are four available operand values: fault, reply, sign_off, and
742 sign_on.
743
744 Further details of "refreq" usage are given in the section on referee
745 semantics later in this document.
746
747 6.25: Opcode "resign": game resignation
748
749 The opcode "resign" is used to indicate that the active player has
750 resigned the game. This opcode takes no operands.
751
752 The "resign" opcode should not appear on the same EPD record with any of
753 the following opcodes: "draw_accept", "draw_claim", "draw_decline', and
754 "draw_offer".
755
756 6.26: Opcode "sm": supplied move
757
758 The "sm" opcode is used to provide a single supplied move for the
759 indicated position. It has exactly one operand, a move playable from
760 the position. This move is the move to be played from the position.
761
762 If a "sv" (supplied variation) operation is present on the same record
763 and has at least one operand, then its first operand must match the
764 single operand of the "sm" opcode.
765
766 The "sm" opcode is intended for use to communicate the most recent
767 played move in an active game. It is used to communicate moves between
768 programs in automatic play via a network. This includes correspondence
769 play using e-mail and also programs acting as network front ends to
770 human players.
771
772 6.27: Opcode "sv": supplied variation
773
774 The "sv" opcode is used to provide zero or more supplied moves for the
775 indicated position. The operands are a move sequence playable from the
776 position.
777
778 If an "sm" (supplied move) operation is also present on the same record
779 and the "sv" operation has at least one operand, then the "sm" operand
780 must match the first operand of the "sv" operation.
781
782 6.28: Opcode "tcgs": telecommunication: game selector
783
784 The "tcgs" opcode is one of the telecommunication family of opcodes used
785 for games conducted via e-mail and similar means. This opcode takes a
786 single operand that is a positive integer. It is used to select among
787 various games in progress between the same sender and receiver.
788
789 Details of e-mail implementation await further development.
790
791 6.29: Opcode "tcri": telecommunication: receiver identification
792
793 The "tcri" opcode is one of the telecommunication family of opcodes used
794 for games conducted via e-mail and similar means. This opcode takes two
795 order dependent string operands. The first operand is the e-mail
796 address of the receiver of the EPD record. The second operand is the
797 name of the player (program or human) at the address who is the actual
798 receiver of the EPD record.
799
800 Details of e-mail implementation await further development.
801
802 6.30: Opcode "tcsi": telecommunication: sender identification
803
804 The "tcsi" opcode is one of the telecommunication family of opcodes used
805 for games conducted via e-mail and similar means. This opcode takes two
806 order dependent string operands. The first operand is the e-mail
807 address of the sender of the EPD record. The second operand is the name
808 of the player (program or human) at the address who is the actual sender
809 of the EPD record.
810
811 Details of e-mail implementation await further development.
812
813 6.31: Opcode "ts": timestamp
814
815 The "ts" opcode is used to record a timestamp value. It takes two
816 operands. The first operand is in date format and the second operand is
817 in time of day format. The interpretation of the combined operand values
818 gives the time of the last modification of the EPD record. The
819 timestamp is interpreted to be in UTC (Universal Coordinated Time,
820 formerly known as GMT).
821
822 6.32: Opcode "v0": variation name (primary, also "v1" though "v9")
823
824 The opcode "v0" (lower case letter "v", digit character zero) indicates
825 a top level variation name that applies to the given position. It is
826 the first of ten ranked variation names, each of which has a mnemonic
827 formed from the lower case letter "v" followed by a single decimal
828 digit. Each of these opcodes takes either a single string operand or no
829 operand at all.
830
831 This ten member variation name family of opcodes is intended for use as
832 traditional variation names for a complete game or game fragment. The
833 usual processing of these opcodes are as follows:
834
835 1) At the beginning of a game (or game fragment), a move sequence
836 scanning program initializes each element of its set of ten variation
837 name string registers to be null.
838
839 2) As the EPD record for each position in the game is processed, the
840 variation name operations are interpreted from left to right.
841 (Actually, all operations in an EPD record are interpreted from left to
842 right.) Because operations appear in ASCII order according to their
843 opcode mnemonics, opcode "v0" (if present) will be handled prior to all
844 other opcodes, then opcode "v1" (if present), and so forth until opcode
845 "v9" (if present).
846
847 3) The processing of opcode "vN" (0 <= N <= 9) involves two steps.
848 First, all variation name string registers with an index equal to or
849 greater than N are set to null. (This is the set "vN" though "v9".)
850 Second, and only if a string operand is present, the value of the
851 corresponding variation name string register is set equal to the string
852 operand.
853
854 7: EPD processing verbs
855
856 An EPD processing verb is a command to an EPD capable program used to
857 direct processing of one or more EPD files. Standardization of verb
858 semantics among EPD capable programs is important to helping reduce
859 confusion among program users and to better insure overall
860 interoperatibilty.
861
862 Each EPD processing verb that requires the reading of EPD records has a
863 specific set of required opcodes that must be on each input record.
864 Each EPD processing verb that requires the writing of EPD records has a
865 specific set of required opcodes that must be on each output record.
866 Some EPD processing verbs imply both reading and writing EPD records;
867 these will have requirements for both input and output opcode sets.
868
869 The names of the EPD processing verbs in this section are for use for
870 specification purposes only. Program authors are free to select
871 different names as appropriate for the needs of a program's user
872 interface.
873
874 7.1: EPD verb: pfdn (process file: data normalization)
875
876 The "pfdn" (process file: data normalization) verb reads an EPD input
877 file and produces a normalized copy of the data on as the EPD output
878 file. The output file retains the record ordering of the input file.
879 The noramlization is used to produce a canonical representation of the
880 EPD. The input records are also checked for legality. There is no
881 minimum set of operations requires on the input records. For each input
882 record, all of the operations present are reproduced in the
883 corresponding output record.
884
885 The normalization of each EPD record consists of the following actions:
886
887 1) Any leading whitespace characters are removed.
888
889 2) Any trailing whitespace characters are removed.
890
891 3) Any unneeded whitespace characters used as data separators are
892 removed; a single blank is used to separate adjacent fields, adjacent
893 operations, and adjacent operands. Also, a single blank character is
894 used to separate the fourth position data field (the en passant target
895 square indication) from the first operation (if present).
896
897 4) Operations are reordered in increasing ASCII order by opcode
898 mnemonic.
899
900 5) Operands for each opcode that does not require a special order of
901 interpretation are reordered in increasing ASCII order by external
902 representation.
903
904 Data normalization is useful for making a canonical version from data
905 produced by programs or other sources that do not completely conform to
906 the lexigraphical and ordering rules of the EPD standard. It also helps
907 when comparing two EPD files from different sources on a line by line
908 basis; the non-semantic differences are removed so that different text
909 lines indicate true semantic difference.
910
911 7.2: EPD verb: pfga (process file: general analysis)
912
913 The "pfga" (process file: general analysis) verb is used to instruct a
914 chessplaying program to perform an analysis for each EPD input record
915 and produce an EPD output file containing this analysis. The output
916 file retains the record ordering of the input file. The current
917 position given by each input record is not changed; it is copied to the
918 output.
919
920 Each input EPD record receives the same analysis effort. The level of
921 effort is indicated as a command (separate from EPD) to the analysis
922 program prior to the start of the EPD processing. Usually, the level is
923 given as a time limit or depth limit per each position. The limit can
924 be either a hard limit or a soft limit. A hard limit represents an
925 absolute maximum effort per position, while a soft limit allows the
926 program to spend more or less effort per position. The hard limit
927 interpretation is preferred for comparing programs. The soft limit
928 interpretation is used to help test time allocation strategy where a
929 program can choose to take more or less time depending on the complexity
930 of a position.
931
932 Each EPD output record is a copy of the corresponding EPD input record
933 with new analysis added as a result of the verb processing.
934
935 There is no minimum set of operations required for the EPD input
936 records.
937
938 Each output EPD record must contain:
939
940 1) A "pv" (predicted variation) operation. The operands of this form a
941 sequence of chess moves to be played from the given position. The
942 length of this may vary from record to record due to the level of
943 anaylsis effort and the complexity of each position. However, unless the
944 current position represents a checkmate or stalemate for the side to
945 move, the pv operation must include at least one move. If the current
946 position represents a checkmate or stalemate for the side to move, then
947 the pv operation still appears, but has no operands.
948
949 2) A "ce" (centipawn evaluation) operation. The value of its operand is
950 the value in hundredths of a pawn of the current position. Note that
951 the evaluation is assigned to the position before the predicted move (or
952 any other move) is made. Thus, a positive centipawn score indicates an
953 advantage for the side to move in the current position while a negative
954 score indicates a disadvantage for the side to move.
955
956 Each output EPD record may also contain:
957
958 1) A "pm" (predicted move) operation, unless the current position
959 represents a checkmate or stalemate for the side to move. (If the side
960 to move has no moves, then the "pm" operation will not appear.) The
961 single operand of the "pm" opcode must be the same as the first operand
962 of the "pv" sequence.
963
964 2) A "sm" (supplied move) operation, unless the current position
965 represents a checkmate or stalemate for the side to move. (If the side
966 to move has no moves, then the "sm" operation will not appear.) The
967 single operand of the "sm" opcode must be the same as the first operand
968 of the "pv" sequence.
969
970 3) An "acn" (analysis count: nodes) operation. The single operand is
971 the number of nodes visited in the analysis search for the position.
972
973 4) An "acs" (analysis count: seconds) operation. The single operand is
974 the number of seconds used for the analysis search for the position.
975
976 7.3: EPD verb: pfms (process file: mate search)
977
978 The "pfms" verb is used to conduct searches for forced checkmating
979 sequences. The length of the forced mate sequence is provided (outside
980 of EPD) to the program prior to the beginning of "pfms" processing. The
981 length is specified using a fullmove count. For example, a fullmove
982 mate length of three would instruct the program to search for all mates
983 in three. An analysis program reads and input EPD file and looks for
984 forced mates in each position where no forced mate of equal or lesser
985 length has been recorded. The output file retains the record ordering
986 of the input file.
987
988 The action of the "pfms" command on each record is governed by the
989 pre-specified fullmove count and, if present on the record, the value of
990 the "dm" (direct mate fullmove count) operand. A particular record will
991 be subject to a search for a forced mate if either:
992
993 1) There is no "dm" operation on the input record, or
994
995 2) The value of the "dm" operand on the input record is greater than the
996 value of the pre-specified fullmove analysis length.
997
998 If the analysis program finds a forced mate, it produces two additional
999 operations on the corresponding output EPD record:
1000
1001 1) A "dm" operation with an operand equal to the pre-specified fullmove
1002 mate length.
1003
1004 2) A "pm" operation with the first move of the mating sequence as its
1005 operand. If two or more such moves exist, the program selects the first
1006 one it located to appear as the "pm" operand.
1007
1008 The idea is that a set of positions can be repeatedly scanned by a mate
1009 finding program with the fullmove analysis depth starting with a value
1010 of one and being increased by one with each pass. For any given pass,
1011 the positions solved by an earlier pass are skipped.
1012
1013 The output EPD records may also contain other (optional) information
1014 such as "acn", "acs", and "pv" operations.
1015
1016 7.4: EPD verb: pfop (process file: operation purge)
1017
1018 The "pfop" verb is used to purge a particular operation from each of the
1019 records in an EPD file that contain the operation. The output file
1020 retains the record ordering of the input file. Prior to processing, the
1021 opcode of the operation to be purged is specified.
1022
1023 The records of the input file are copied to the output file. If the
1024 pre-specified operation is present on a record, the operation is removed
1025 prior to copying the record to the output.
1026
1027 7.5: EPD verb: pfts (process file: target search)
1028
1029 The "pfts" (process file: target search) verb is similar to the "pfga"
1030 (process file: general analysis) verb in that each position on the EPD
1031 input file is subject to a general analysis. The difference is that
1032 each input record contains a set of target moves and a set of avoidance
1033 moves. Either of these two sets, but not both, may be empty. The set
1034 of avoidance moves is given by the operands of a "am" opcode (if
1035 present). The set of target moves is given by the operands of a "bm"
1036 opcode (if present).
1037
1038 Prior to processing the target search, the program is given a search
1039 effort limit such as a limit on the amount of search time or search
1040 nodes per position. The "pfts" verb causes each input EPD record to be
1041 read, subjected to analysis, and then written to output file with the
1042 predicted move attached with the "pm" opcode. (No "pm" operation is
1043 added is the current position is a checkmate or stalemate of the side to
1044 play.)
1045
1046 The output EPD records may also contain other (optional) information
1047 such as "acn", "acs", and "pv" operations.
1048
1049 8: EPD referee semantics
1050
1051 Communication between a chessplaying program and a referee program is
1052 performed by exchanging EPD records. Each EPD record emitted by a
1053 chessplaying program to be received by the referee has a "refreq" EPD
1054 opcode with an operand that describes the request. Each EPD record
1055 emitted by a referee to be received by a chessplaying program has a
1056 "refcom" EPD opcode with an operand that describes the command.
1057
1058 The usual operation sequence in a referee mediated event is as follows:
1059
1060 1) The referee server program is started and the human event supervisor
1061 provides it with any necessary tournament information including the
1062 names of the chessplaying programs, the name of the event, and various
1063 other data.
1064
1065 2) The referee program completes its initialization by performing
1066 pairing operations as required.
1067
1068 3) Once the server has its initial data, it then opens a socket and
1069 binds it to the appropriate port. It then starts listening for input
1070 from clients. For a serial implementation, an analogous function is
1071 performed.
1072
1073 4) The competing chessplaying programs (clients) are started (if not
1074 already running) and are given the name of the referee host machine
1075 along with the port number. For a serial implementation, an analogous
1076 function is performed.
1077
1078 5) Each client program transmits an EPD record to the referee requesting
1079 registration. This causes each client to be signed on to the referee.
1080
1081 6) The referee program replies to each client signing on with an EPD
1082 record commanding a reset operation to set up for a new game.
1083
1084 7) The referee program sends an EPD record to each client informing each
1085 client about the values for each of the tag values for the PGN Seven Tag
1086 Format.
1087
1088 8) For each client on the move, the referee will send an EPD record
1089 commanding a response. This causes each receiving client to calculate a
1090 move. If there has been a prior move, it along with the position from
1091 which the move is played is sent. If there has been no prior move, the
1092 current position is sent but no move is included.
1093
1094 9) For each client receiving a command to respond, the current position
1095 indicated by the record is set as the current position in the receiving
1096 program. (It should already be the current position in the receiver.)
1097 If a supplied move was given, it is executed on the current position.
1098 Finally, the receiving program calculates a move.
1099
1100 10) As each program on the move completes its calculation, it sends a
1101 reply to the referee which includes the result of the calculation. The
1102 position sent back on the reply is the result of applying the move
1103 received on the referee record to the position on the same received
1104 record. If a move was produced as the result of the calculation, it is
1105 also sent. (A move will not be produced or sent if the receving client
1106 was checkmated, or if it was stalemated, of if it resigns, or claims a
1107 draw due to insufficient material.)
1108
1109 11) As the referee receives a reply from a client, it produces a respond
1110 command record to the client's opponent. (This step will be skipped if
1111 an end of game condition is detected and no further moves need to be
1112 communicated.)
1113
1114 12) The referee continues with the respond/reply cycle for each pair of
1115 opponent clients until the game concludes for that pair.
1116
1117 13) For each game conclusion, the referee sends a conclude command to
1118 each of the clients involved.
1119
1120 14) When a client is to be removed from competition, it sends a sign off
1121 request. This eliminates that program from being paired until it
1122 re-registers with a sign on request.
1123
1124 15) When the referree server is to be removed from network operations,
1125 it will send a disconnect command to each client that is currently
1126 signed on to the referee.
1127
1128 8.1: Referee commands (client directives)
1129
1130 The referee communicates the command of interest as the single operand
1131 of the "refcom" opcode. The refcom opcode will be on each record sent
1132 by the referee. Each possible refcom operand is sent as an identifier
1133 (and not as a string).
1134
1135 EPD records sent by the referee will include check clock data as
1136 appropriate. Whenever a client program receives a record with the "cc"
1137 (chess clock) opcode, the client should set the values of its internal
1138 clocks to the values specified by the cc operands. Note that the clock
1139 values for both White and Black are present in a cc operation.
1140
1141 All EPD records carry the four data fields describing the current
1142 position. In most cases, this position should also be the current
1143 position of the receiving client. If the position sent by the referee
1144 matches the client's current position, then the client can assume that
1145 all of the game history leading to the current position is valid. Thus,
1146 every client keeps track of the game history internally and uses this to
1147 detect repetition draws and so there is no need for each EPD record to
1148 contain a complete copy of the game history.
1149
1150 If the position sent by the referee does not match the receiving
1151 program's current position, then the receiving program must set its
1152 current position to be the same as the one it received. Unless an
1153 explicit game history move sequence is also sent on the same EPD record,
1154 the receiving program is to assume that the new (different) position
1155 received has no game history. In this case the receiving program cannot
1156 check for repetition of positions prior to the new position as there
1157 aren't any previous positions in the game.
1158
1159 Each client is expected to maintain its own copy of the halfmove clock
1160 (plies since last irreversible move; starts at zero for the initial
1161 position) and the fullmove number (which has a value of one for the
1162 initial position). If the referee sends a halfmove clock value or a
1163 fullmove number which is different from that kept by the program, then
1164 the receiving program is to treat it as a new position and clear any
1165 game history. As noted above, a halfmove clock is sent using the "hmvc"
1166 opcode and a fullmove number is sent using a "fmvn" opcode.
1167
1168 If a supplied move (always using the "sm" opcode) is sent by the
1169 referee, the receiving program must execute this move on the current
1170 position. This is done after the program's current position is set to
1171 the position sent by the referee (remember that the two will usually
1172 match). The resulting position becomes the new current position. This
1173 new current position is used for all further calculations. The new
1174 current position is also the position to be sent to the referee if a
1175 move response is commanded. When a client program produces a move to be
1176 played, it uses the sm opcode with its operand being the supplied move.
1177 The position sent is alwasy the position from which the supplied move is
1178 to be played. Thus, the semantics of the current position and the
1179 supplied move are symmetric with respect to the client and the server.
1180
1181 8.1.1: Referee command: conclude
1182
1183 The "conclude" refcom operand instructs the client to conclude the
1184 current game in progress. The position sent is the final position of
1185 the game. There is no supplied move sent. No further EPD records
1186 concerning the game will be sent by the referee. The client should
1187 perform any end of game activity required for its normal operation. No
1188 response from the client is made.
1189
1190 To allow for client game conclusion processing time, the referee will
1191 avoid sending any more EPD records to a client concluding a game for a
1192 time period set by the human supervisor. The default delay will be five
1193 seconds.
1194
1195 8.1.2: Referee command: disconnect
1196
1197 The "disconnect" refcom operand instructs the client that the referee is
1198 terminating service operations. The client should close its
1199 communication channel with the server. This command is sent at the end
1200 of an event or whenever the referee is to be brought down for some
1201 reason. No further EPD records will be sent until the server is cycled.
1202 It provides an opportunity for a client to gracefully disconnect from
1203 network operations with the server. No supplied move is sent. The
1204 position sent is irrelevant. No response from the client is made.
1205
1206 8.1.3: Referee command: execute
1207
1208 The "execute" refcom operand instructs the client to set up a position.
1209 If a move is supplied (it usually is), then that move is executed from
1210 the position. The sent position will usually be the receiver's current
1211 position. This command is used only to play through the initial
1212 sequence of moves from a game to support a restart capability. No
1213 response is made by the receiver.
1214
1215 8.1.4: Referee command: fault
1216
1217 The "fault" refcom operand is used to indicate that the referee has
1218 detected an unrecoverable fault. The reciever should signal for human
1219 intervention to assist with corrective action. The human supervisor
1220 will be notified by the referee regarding the nature of the fault. No
1221 response is made by the receiver.
1222
1223 A future version of the referee protocol will support some form of
1224 automated fault recovery.
1225
1226 8.1.5: Referee command: inform
1227
1228 The "inform" refcom operand is used to convey PGN tag pair data to the
1229 receiver. The "ptp" opcode will carry the PGN tag data to be set on the
1230 receiving client. This command may be sent at any time. It will
1231 usually be sent prior to the first move of a game. It will also be sent
1232 after the last move of a game to communicate the result of the game via
1233 the PGN "Result" tag pair. No response is made by the receiver.
1234
1235 The main purpose for the inform referee command is to be able to
1236 communcate tag pair data to a client without having to send a move or
1237 other command. Note that the ptp opcode may also appear on EPD records
1238 from the referee that are not inform commands; its operands are
1239 processed in the same way.
1240
1241 The usual information sent includes the values for the Seven Tag Roster.
1242 The PGN tag names are "Event", "Site", "Date", "Round", "White",
1243 "Black", and "Result".
1244
1245 Future versions of the referee will likely send more than just the Seven
1246 Tag Roster of PGN tag pairs. One probable addition will be to send the
1247 "TimeControl" tag pair prior to the start of a game; this will allow a
1248 receiving program to have its time control parameters set automatically
1249 rather than manually.
1250
1251 8.1.6: Referee command: reset
1252
1253 The "reset" refcom operand is used to command the receiving client to
1254 set up for a new game. Any previous information about a game in
1255 progress is deleted. This command will be sent to mark the beginning of
1256 a game. It will also be sent if there is a need to abort the game
1257 currently in progress. No response is made by the receiver.
1258
1259 To allow for client reset processing time, the referee will avoid
1260 sending any more EPD records to a resetting client for a time period set
1261 by the human supervisor. The default delay will be five seconds.
1262
1263 8.1.7: Referee command: respond
1264
1265 The "respond" refcom operand is used to command the receiving client to
1266 respond to the move (if any) played by its opponent. The position to
1267 use for calculation is the position sent which is modified by a supplied
1268 move (if present; uses the "sm" opcode). The client program calculates
1269 a response and sends it to the referee using the "reply" operand of the
1270 "refreq" opcode.
1271
1272 8.2: Referee requests (server directives)
1273
1274 The referee communicates the command of interest as the single operand
1275 of the "refcom" opcode. The refcom opcode will be on each record sent
1276 by the referee. Each possible refcom operand is sent as an identifier
1277 (and not as a string).
1278
1279 8.2.1: Referee request: fault
1280
1281 The "fault" refreq operand is used to indicate that the client has
1282 detected an unrecoverable fault. The receiver should signal for human
1283 intervention to assist with corrective action. The human supervisor
1284 will be notified by the referee regarding the nature of the fault. No
1285 response is made by the referee.
1286
1287 A future version of the referee protocol will support some form of
1288 automated fault recovery.
1289
1290 8.2.2: Referee request: reply
1291
1292 The "reply" refreq operand is used to carry a reply by the client
1293 program. Usually, a move (the client's reply) is included as the
1294 operand of the "sm" opcode.
1295
1296 8.2.3: Referee request: sign_off
1297
1298 The "sign_off" refreq operand is used to indicate that the client
1299 program is signing off from the referee connection and no further
1300 operations will be made on the communication channel. The channel in
1301 use is then closed by both the referee and the client.
1302
1303 A new connection must be established and a new "sign_on" referee request
1304 needs to be made for further referee operations with the client.
1305
1306 8.2.4: Referee request: sign_on
1307
1308 The "sign_on" refreq operand is used to indicate that the client program
1309 is signing on to the referee connection. This request is required
1310 before any further operations can be made on the communication channel.
1311 The channel in use remains open until it is closed by either side.
1312
1313 9: EPD report generation semantics
1314
1315 [TBD]
1316
1317 EPD_Spec: EOF