Forsyth notation

Sort:
grover-dill
What does  KQkq-0 1 at the end mean


rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
LAexpress12

both sides may castle? idk

artfizz

A FEN record contains six fields. The separator between fields is a space. The fields are:

  1. 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. Following the Standard Algebraic Notation (SAN), 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").[1] 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.
  2. Active color. "w" means white moves next, "b" means black.
  3. 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).
  4. 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.[2]
  5. Halfmove clock: This is the number of halfmoves since the last pawn advance or capture. This is used to determine if a draw can be claimed under the fifty-move rule.
  6. Fullmove number: The number of the full move. It starts at 1, and is incremented after Black's move.

http://en.wikipedia.org/wiki/Forsyth–Edwards_Notation

 

grover-dill

If the small "w" means its white's turn to move then what is the point of  - 0 1 Must be something I'm missing.  If it was late in the game could the -  0 1 then be something like  38  37. As in 38 half moves for white and 37 for black?  I now understand the KQkq part.

artfizz

The "-" is the en passant indicator - showing whether an ep move is possible and if so, where.

The '0' could be any number - unconnected with the move number. If it is 100 or greater, then a 50-move-rule draw is available.

The '1' is counting full moves - so it doesn't tell you which colour's move it is.

grover-dill
[COMMENT DELETED]
artfizz

This is my understanding of the Wiki description, in a worked example.

1
2
3
4
5
6
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
w
KQkq
-
0
1

 

 

50-move-rule counter (5th field)

Move number (6th field)

Before first move

0

1

Both sides move pawns for 5 moves

0

6

Both sides just move knights for the next 40 moves

80

46

Both sides capture

0

47

grover-dill

Ah! HA  so " 1 " would show you how far your are from 50 move draw. so it could be 10 , 42  , or 49 then 50. Please tell me I finally got it right

artfizz
scut_fargus wrote:

Ah! HA  so " 1 " would show you how far your are from 50 move draw. so it could be 10 , 42  , or 49 then 50. Please tell me I finally got it right


The counter can reach 100 - not just 50. It's counting HALF moves.

The fifty-move rule in chess states that a player can claim a draw if no capture has been made and no pawn has been moved in the last fifty consecutive moves (fifty moves by each side). http://en.wikipedia.org/wiki/Fifty-move_rule 

You got it (more than 50%) right.

grover-dill

Thank you Mr Fizz you have went above and beyon the call of duty. and hopefully have taught many more then I in this thread

artfizz
scut_fargus wrote:

Thank you Mr Fizz you have went above and beyon the call of duty. and hopefully have taught many more then I in this thread


You're welcome. I often wondered how it was encoded - but never got round to looking it up.