Questions tagged [fen]

Forsyth-Edwards Notation (FEN) is a standard notation for recording a particular chess position, including the location of pieces, which side is to move, what castling rights are available, etc.

Forsyth-Edwards Notation (FEN) is a standard notation for recording a particular chess position, including the location of pieces, which side is to move, what castling rights are available, etc. It originated with the 19th Century journalist David Forsyth, and was later extended for digital use by Steven J. Edwards.

43 questions
23
votes
7 answers

How do you know when a FEN position is legal?

I am making a research on validating FEN positions, at first it is obvious the basics things to look for, such as checking if there are only two kings and making sure the rows or columns add up and those kinds of things. But what other checks should…
ajax333221
  • 3,188
  • 23
  • 44
17
votes
3 answers

High-quality (not bitmap) diagram software

I'm looking for software that can take FEN and generate a high-quality diagram, in PDF, Postscript, Windows metafile, or something else that will look good at 1200x1200 dpi or better. I thought the various chess engines would do it, but their…
Andrew Lazarus
  • 537
  • 4
  • 13
16
votes
3 answers

Open source chess playing or pgn viewing libraries

Is anyone familiar with any open source chess libraries in any language that can do any of the following: parse PGNs and/or FENs calculate valid chess moves based on position process an entire chess game EDIT: Sorry, I should be more clear. I'm…
James Tomasino
  • 2,265
  • 19
  • 20
15
votes
5 answers

Chess Problem Database with PGN or FEN

Is there a database of chess probpems that have the game or positions PGN and or FEN?
Ludwig
  • 161
  • 1
  • 1
  • 4
13
votes
1 answer

Stockfish evaluation of a position from PGN

I am trying to get Stockfish's evaluation of a board position(which is in PGN format) using command line.I know it accepts board position in FEN format, but is there any way i can provide PGN format? If no, how can i convert PGN format to FEN? Is…
John
  • 233
  • 2
  • 5
13
votes
7 answers

How can I scan a chessboard and obtain its FEN?

I am planning to create a chess puzzle book for beginners. Diagrams need to be published in the book. Right now I have all the materials in PDF. But I need a software to create diagrams for a particular chess position. Is there any way to scan chess…
Unni Krishnan
  • 131
  • 1
  • 3
10
votes
2 answers

Endgame FEN generator

is it possible to generate FEN strings for endgames based on specific criteria: n-pieces, w/d/l, and side to move? So say I wanted all FEN strings for King plus Rook vs King plus Pawn (KPKR) endgames, where it is white to move, and white draws with…
Dan Forbes
  • 316
  • 2
  • 8
10
votes
2 answers

Differences between FEN and EPD?

I just read the description of FEN (Forsyth–Edwards Notation) and EPD (Extended Position Description), I have a basic idea of what they are, but I still have some points that are not entirely clear: What are the main differences between those…
ajax333221
  • 3,188
  • 23
  • 44
9
votes
2 answers

Longest possible FEN

What is the longest possible FEN? The reason for that question is, that I am designing a PGN viewer (again), and I have noticed that the FEN is dependent on the width of the board (the FEN test area is placed below). So the following number of…
mliebelt
  • 487
  • 2
  • 12
9
votes
2 answers

Question on FEN and castling

I was reading about FEN notation, and noticed the following line in the relevant Wikipedia article: If neither side can castle, this is "-". Otherwise, this has one or more letters: "K" (White can castle kingside), "Q" (White can castle queenside),…
SL2
  • 209
  • 1
  • 4
8
votes
5 answers

Alternatives to the FEN notation

Apart from the FEN notation, are there other even more compact known chess-position notations? One that would of course also entail castling rights, and en passant possibilities. One really missing bit in the FEN is the fact that it carries no…
user098876
  • 183
  • 4
6
votes
2 answers

What's the point of the full move counter in FEN?

For what do you need to know the number of full moves? You still can't recreate every move in the game with FEN anyways, so I don't see the point of the full move counter. Is there any rule that depends on it?
Mattias
  • 163
  • 3
5
votes
5 answers

Software to create FEN notation?

I am new to FEN notation. I understand its importance for describing position of pieces on board. I also understand FEN notations after reading about it in Wikipedia. However, it is a time taking procedure to write it down manually. I am looking for…
KurioZ7
  • 193
  • 1
  • 3
5
votes
2 answers

Quick method for generating FEN strings from PGN using Python Chess

Is there a fast way to generate FEN strings for every move in a PGN? I'm generating an opening book using the Lichess elite database and Python Chess, but Python Chess is taking a surprisingly long time to analyze games and generate FEN strings for…
MattY
  • 153
  • 1
  • 4
5
votes
1 answer

Probability of given position/piece configuration

I'm currently working on an image based FEN generator. I found a paper doing the same and they have used Stockfish to calculate the most probable piece configurations. Now I wonder if Stockfish has this functionality or if they implemented it on…
1
2 3