QueenAlice.com


Username:

Password:

Remember me



Forgot Password?
Registration FREE!





Topic: fen explained
Back to Forum Index
Back to Forums List


Author

Message
phystutordotcomUnited States flag
[Guide] FEN Notation I googled fen and copied this
FEN Notation basics: A FEN-notation is a single string that holds all the information about a position. That is piece placement, side to move, castling rights, en passant square, number of half-moves (moves by one side) since last capture or pawn move (to keep track of 50 move rule), and total number of full moves (moves by both sides). In that order.

The starting position is described with FEN-notation as:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1And here's how to read it:

We start with the black pieces (8th rank, in lower-case for black), then '/' to move to the next rank (the 7th), there we have the black pawns, then next rank where we have no pieces so we put the number 8 (as in eight empty squares).

Then comes 3 more empty ranks, then the white pawns and pieces (in upper-case for white).

Next character 'w' determines it's white turn to move.

KQkq is for castling rights (K - white can castle kingside, Q - white can castle queenside, and same for black in lower-case). If noone can castle we put a dash '-'.

Then comes the en passant square, since there is no en passants available in the starting position we have '-' there. There can only be one en passant square in any given position (there's only one pawn move at a time that can result in the square).

Then comes the half-moves since last capture or pawn move, and finally the total of full-moves (starting at 1 and incremented every time black moves).

A few examples:


k7/8/8/4N3/8/8/8/3K4 b - - 13 56Notice how neither side has castling rights. The black king is placed in the corner so we write 'k7' for black king and 7 empty squares, while the white knight is in the middle of the rank so we write '4N3' for four empty squares, white knight, and 3 empty squares.





rnbqkbnr/pp2pppp/8/2ppP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3The black pawn has just moved two squares, so there is an en passant available on d6.










Don't mind the formatting, I'm sure it looks horrible on some web browsers. (I noticed the last characters on the second FEN example got cut off on mine)

Why do we want it, and why now?: We will need an easy way of seeing what our engine is doing. Sure we could write some ASCII presentation of the board, or even a graphical interface (I will not touch that subject here), but why spend the time when we can create a very easy and effective feature, that we for sure will be using later anyways.

At this stage we have no (easy) way of seeing how the application perceives

whyBishNew Zealand flag

Why do we want it, and why now?: We will need an easy way of seeing what our engine is doing

What are you on about?
There is a standard API for chess engines, and any engine that implements this widely used API can be viewed with any viewer that uses this API. If you use a viewer you don't even need to bother with FEN.

phystutordotcomUnited States flag
I dont know what API is. I want players to pracice endgames with me. If they only practice the endgames I want to pratice they will lose interest. I cant advise them on all the different viewers they may have. I am hoping they might modify the fen's that I post and challange me. Just knowing who is on move would help them. they might want to try on of the endings with a pawn on square closer or farther from promoting.

also it is easier to type fen directly than to use a viewer and import the position to open games. But some might disagree.

However you are right, anyone who uses chess base can set up a position i chess base and copy the fen to the position box when the challange me.

whyBishNew Zealand flag
If that's all you need then most chess programs you can just paste fen into, no need to learn to read it.

phystutordotcomUnited States flag
I have played 539 games that did not start at the original position. It is faster to enter the fen directly. I have also used fen in the articles forum and when sending private messages

equusEngland flag
And in case anyone wondered, FEN stands for, 'Forsyth-Edwards Notation', (which I also got from Google).


©2004-2024 Queen Alice Internet Chess Club
All rights reserved.