© epikur draft version 0.4
Realtime chess notation aka FENr
FENr is Realtime chess notation equivalent of normal chess FEN notation.
FEN reference: http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation
With FENr you will be able to save the current board position of a realtime chess game.
For info about Realtime chess, see Realtime chess - Game objective and gameplay
The notation is similar to the FEN notation.
A FENr "record" defines a particular game position, all in one text line and using only the ASCII character set.
A FENr record contains five fields. The separator between fields is a space. The fields are:
- Piece placement (from white's perspective). Each rank is described, starting with rank 8 and ending with rank 1; within each rank, the contents of each square are described from file a through file h. Each piece is identified by a single letter taken from the standard English names (pawn = "P", knight = "N", bishop = "B", rook = "R", queen = "Q" and king = "K"). White pieces are designated using upper-case letters ("PNBRQK") while Black take lowercase ("pnbrqk"). Blank squares are noted using digits 1 through 8 (the number of blank squares), and "/" separate ranks.
- Castling availability. If neither side can castle, this is "–". Otherwise, this has one or more letters: "K" (White can castle kingside), "Q" (White can castle queenside), "k" (Black can castle kingside), and/or "q" (Black can castle queenside).
- En passant target square in algebraic notation. If there's no en passant target square, this is "–". If a pawn has just made a 2-square move, this is the position "behind" the pawn. This is recorded regardless of whether there is a pawn in position to make an en passant capture.
- Time passed without a piece taken in milliseconds. This is used to determine if a draw can be claimed under the 5 minute rule.
- Time passed in milliseconds.
FENr data abstract:
time passed without piece taken
The precision is scaled to milliseconds.
i.e. time values used here are in milliseconds.
Notice: 1 second = 1000 milliseconds.
A piece position has additional states in realtime chess.
- It can have a delay marker.
- It is moving.
A piece with a delay marker
It is notated with a fixed size of 6 letters.
The uppercase prefix letter D followed by a piece identifier, then a 4 digit number ranging from 0000 - 9999.
The value is the time of delay duration in milliseconds.
i.e. at time value 0000 the delay marker is full, and at 9999 the delay marker is gone the next 1 millisecond.
A Black pawn with full delay marker is notated as: Dp0000
A White rook with half size delay marker is notated as: DR5000
It is notated with a fixed size of 8 letters.
The uppercase prefix letter M followed by a piece identifier
Next are 2 letters telling where it is moving from
The last data are 4 digit numbers. Current time passed minus the time the piece started to move.
I.e. The value is the time duration until it is fully arrived at the destination in milliseconds.
Notice: The destination field is given in the order of the pieces position data.
For an example, see the chess screenshot below.
A White rook moving from a1, where it is 2.5 fields away to the destination is notated as: MRa12500
A Black pawn moving from b7, where it is 0.5 fields away to the destination is notated as: Mpb70500
FENr data abstract:
time passed without piece taken
FENr data example:
r2Mqe70500k2r/pb1n2bp/1pp2n2/3p1pp1/MQd10450P1PpDP10002/2P1P1P1/PB1NN1BP/R3K1DR50001 kQq f3 14200 14200
I have outlined some colors in the pieces position.
The FENr pieces position look alot like the FEN data.
The difference in this example is outlined in the colors
The red colored text is the black queen moving from e7 to d8, it will arrive in 0.5 seconds
We know it is moving to d8, because the position data starts with r2Mqe70500.
This says there is a black rook at a8, then 2 empty spaces at b8 and c8.
The green colored text is the white queen moving from d1 to a4, it will arrive in 0.45 seconds
The blue colored text is a white pawn at f4 with delay marker at 90%, i.e. 1 second has passed since arrived.
The orange colored text is a white rook at g1 with delay marker at 50%, i.e. 5 seconds has passed since arrived.
The castling data kQq says, White has possible Queen site castling, and Black has both sides castling possibilites.
Notice the Black Queen is moving to d8, and therefore Black can't at the moment castle Queen site.
But it is still possible when the moved is allowed.
The enpassant data f3, says black has possible enpassant attack at f3.
Notice: black has enpassant attack at rank 3, and white has at rank 6.
The last two data which are both 14200, says timeline is 14 seconds and 200 milliseconds and none pieces have been taken yet.
Why this notation form?
- It is very similar to the FEN structure
- The position data is readable by humans
- The additional info: moving piece and delay marker, have a prefix letter and fixed number of letters, which makes it easy to parse
- The precision is scaled to milliseconds, i.e. time values used here are in milliseconds
The FENr notation is for a normal two player realtime chess game where:
The requirements for this is for ensuring 1 millisecond precision.
- A move from a field to the next field takes at most 1 second, i.e. 1000 milliseconds
- The delay marker duration takes at most 10 seconds when it is full, i.e. 10000 milliseconds