used to describe current position
in url
/ is encoded as %2F
fen strings have six different fields separated by a space character.
1. Piece Placement
It starts describing the content of each square, beginning from the eighth rank(row) and ending with the first. For each rank, squares begin from the first file and go to the eighth.
Empty squares are denoted by numbers from one to eight, depending on how many empty squares are between two pieces
PNBRQK = white piece pawn,knight,bishop,rook,queen,king
pnbrqk = black piece same
starting game
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN
2. Active Color
who moves next w or b
3. Castling Rights
Uppercase letters come first to indicate White's castling availability, followed by lowercase letters for Black's.
k q or - kingside,queenside or no castle
4. Possible En Passant Targets
If a pawn has moved two squares immediately FEN string adds the square behind the pawn in algebraic notation in its fourth field.
5. Halfmove Clock
how many moves both players have made since the last pawn advance or piece capture—known by chess programmers as the number of halfmoves
This field is useful to enforce the 50-move draw rule. When this counter reaches 100 (allowing each player to make 50 moves), the game ends in a draw.
6. Fullmove Number
The sixth and last field of the FEN code shows the number of completed turns in the game. This number is incremented by one every time Black moves. Chess programmers call this a fullmove.
src
https://www.chess.com/terms/fen-chess
https://en.wikipedia.org/wiki/Forsyth–Edwards_Notation
https://www.w3schools.com/tags/ref_urlencode.asp
https://thechessworld.com/articles/general-information/chess-notation-the-complete-guide/
Comments
Post a Comment