1. Overview
A kifu file is a text mode file, and consists of
(1) the names of the players
(2) the starting board (including mochigoma (pieces in hand) and
the mark of the next player)
(3) move and time spent
(4) comments
The order (1) through (3) may not change. (1) through (3) can be omitted. It is possible to show many kifu or boards using the special line (slash)
/ (one slash only)
as a separator.
2. Pieces
Piece names: FU (Pawn), KY (Lance), KE (Knight), GI (Silver),
KI (Gold), KA (Bishop), HI (Rook), OU (King), TO (Promoted Pawn),
NY (P-Lance), NK (P-Knight), NG (P-Silver), UM (P-Bishop), RY
(P-Rook).
Position "11" (1a) through "99" (9i). "00"
shows piece in hand.
"+" and "-" show that the piece belongs to
sente (black, the first player) or gote (white, the second player)
respectively.
3. Names of the Players
"N+" followed by the name of sente. "N-" followed by the name of gote. These are one line each, and may be omitted.
Examples:
N+Tanigawa N-Habu
4. Starting Board
(1) "PI" means the initial hirate location of pieces. Removed pieces (for handicap) follow "PI".
Example:
PI82HI22KA Two pieces (Rook and Bishop) handicap.
(2) "P" and rank number (1-9) followed by nine marks (a mark consists of "+" or "-" and piece name for a piece belonging to sente or gote or " * " for none) show the piece located in numbered ranks.
Examples:
P1-KY-KE-GI-KI-OU-KI-GI-KE-KY P2 * -HI * * * * * -KA *
(3) "P" followed by "+" or "-"
and many locations and piece names shows the pieces in those locations.
"00" shows piece in hand.
"00" followed by "AL" means all pieces other
than those above.
Examples:
P-22KA P+99KY89KE P+00KI00FU P-00AL
(4) Turn
"+" and "-" mean sente's and gote's turns
respectively.
A turn must take one line and follow the "P" line(s).
The turn must be given.
N.B. Do not use (1) and (2) at the same time.
5. Move and Time Spent
A move must take one line. The time spent must be on the next line.
(1) Ordinary move
"+" or "-" (sente or gote) followed by the original location, the location after the move, and the piece name after the move.
Example:
+2726FU
(2) Special moves
resign: %TORYO
take back: %MATTA
interruption: %CHUDAN
repetition: %SENNICHITE
draw: %JISHOGI
error: %ERROR
declare win: %KACHI
(3) Time spent
"T" followed by the number of seconds taken. This may be omitted.
6. Comments
A line starting with "'" (single quote) is a comment line.
7. Multi-Statement
The separator is ",".
8. The last four characters of the file name must be ".csa".
9. Example of a Kifu File
'----------"example.csa"---------- 'Player names N+Tanigawa N-Habu 'Hirate P1-KY-KE-GI-KI-OU-KI-GI-KE-KY P2 * -HI * * * * * -KA * P3-FU-FU-FU-FU-FU-FU-FU-FU-FU P4 * * * * * * * * * P5 * * * * * * * * * P6 * * * * * * * * * P7+FU+FU+FU+FU+FU+FU+FU+FU+FU P8 * +KA * * * * * +HI * P9+KY+KE+GI+KI+OU+KI+GI+KE+KY 'Sente's turn + 'Move and time spent +2726FU T12 -3334FU T6 %CHUDAN