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.
49 questions
1
vote
0
answers
32
views
Chess FEN/EPD/PGN mirroring?
I am looking for a tool which is able to automatically convert a chess FEN/EPD/PGN file with 100+ positions into
a) a file with the same positions but different side to move, or
b) a file with the ...
3
votes
1
answer
234
views
Converting image to FEN programmatically
I'm wanting to create a little screenshot tool that takes a screenshot and outputs an FEN to the clipboard. I was hoping to use chessvision.ai, but it does not seem to have an API that allows me to ...
1
vote
2
answers
153
views
Changing the FEN position color
How would I write a function that would change the color to play of the given position and be consistent with?
Example FEN:
input:rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 1
output:...
4
votes
2
answers
246
views
Is there open source sophisticated FEN validator?
I was looking for a sophisticated open source validator on github, but what I find so far are rudimentary regex based validators.
By "sophisticated", I mean ability to perform validation ...
3
votes
0
answers
38
views
How do I get a text response from 4kit Nalimov endgame tablebase
I am trying to get a simple text response from 4kit Nalimov endgame tablebase, using an URL and asking for the answer to a FEN string.
2
votes
1
answer
890
views
Weird Stockfish UCI output for d2d4 before and after
I am currently trying to code a training tool and am a bit confused by what Stockfish returns.
Before doing d2d4 it states that this move will have a 56 centipawn advantage for White - which is what I ...
1
vote
1
answer
429
views
Programming FEN diagrams
I'm thinking about creating ANKI flashcards deck with my games positions as a training tool. Is there a way to programmatically (can be whatever programming language, I'll figure it out) generate ...
1
vote
2
answers
643
views
How do you input FEN into Lucas Chess?
How can I input a position into Lucas Chess, in order to view the underlying engine's analysis through Lucas Chess's GUI? The position would be specified in FEN.
Under its menu Tools->PGN, Lucas ...
5
votes
2
answers
6k
views
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 ...
3
votes
1
answer
1k
views
Can all UCI engines output a FEN for the current position or is it just StockFish?
I know in StockFish if you type "d" you get an ascii view of the board and a FEN string for the current state. Is there any command in other UCI engines such as Rybka 4 that will output a ...
2
votes
0
answers
187
views
Copy/paste games from Chess StackExchange to lichess.org [closed]
When I encounter an interesting question on Chess StackExchange, I would like to import that game to http://lichess.org, to be able to analyze it with Stockfish. When I use the "Copy game" ...
1
vote
2
answers
896
views
Software for reading multiple FEN positions
I have started playing around with SCID and Arena to analyze my games and store interesting screenshots. I recently heard about the FEN notation which makes it convenient to describe chess positions (...
1
vote
2
answers
631
views
Is it preferable to pass a FEN notation or list of moves to a chess engine?
I am actually programming a chess UI and I'd like to communicate with a chess engine using UCI protocol. After reading the protocol specifications, I am not sure how to use the position command. For ...
5
votes
1
answer
283
views
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 ...
11
votes
2
answers
3k
views
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 ...
5
votes
2
answers
6k
views
How can I convert screenshot capture into FEN to analyse on Windows 10+? [duplicate]
I want to analyze position presented on meeting, web page or video but problem is that I have not FEN to start such analysis. It need manual work to do it.
I want to capture screenshot than convert it ...
2
votes
1
answer
110
views
What do the numbers mean at the end of predicted variation opcode in and EPD entry?
I'm writing an EPD (Extended Position Description) parser and I have a doubt about what numbers means at end of "predicted variation" opcode.
Look the follow EPD sample:
rq2r1k1/5pp1/p7/4bNP1/1p2P2P/...
3
votes
2
answers
522
views
A script that can create a chess tree from an EPD file
Is there any script (any language) that can make a chess tree from an EPD file? Or what algorithm (any example) should be use to create it on my own?
I am looking for one like the Chessbase opening ...
3
votes
1
answer
156
views
How to detect invalid pawn structures (not based on opponent material) for FEN valdation?
I'm going to further expand a FEN validation function I have been working on for some time to include illegal pawn formations such that:
... for example white pawns could
never be on a2, a3, and ...
-1
votes
1
answer
233
views
Chess FEN winner
I'm new to Chess FEN notation and I'm making an online chess game, but I have one problem, I need to check after every new move if there is a winner and which one is a winner.
Can I extract that ...
6
votes
2
answers
2k
views
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 ...
3
votes
1
answer
883
views
Why is en passant possibility recorded in FEN regardless of whether there is a pawn ready to make the capture?
If a pawn has just moved two squares ahead, one records the square right behind it in the part of FEN for recording en passant possibility, regardless of whether there is a pawn of the opposite color ...
20
votes
6
answers
35k
views
Chess Problem Database with PGN or FEN
Is there a database of chess problems that have the game or positions PGN and or FEN?
4
votes
1
answer
2k
views
How the engine can detect the 3-fold repetition using FEN input? [duplicate]
When I run the engine (UCI interface), I usually feed the last position from the game using position fen ... command and get the best move back. The FEN encodes the possibility of the castlings, en ...
5
votes
1
answer
1k
views
How does X-FEN (Chess960 FEN) differentiate from traditional FEN notation?
I understand that a modified version of FEN notation is needed to properly record a Chess960 game.
I know that en passant is only slightly different, (an en passant possibility is only recorded if ...
0
votes
1
answer
1k
views
Can one import FENs of positions involving checkmate into Droidfish?
I recently copied the following curious position (from this answer) to clipboard, and tried pasting it in Droidfish.
3b1q1q/1N2PRQ1/rR3KBr/B4PP1/2Pk1r1b/1P2P1N1/2P2P2/8 w - - 0 1
However, the ...
3
votes
4
answers
1k
views
FEN inverter website/page?
This board shows the black pieces on the bottom, but the white pieces are supposed to be there; I accidentally set up the board so that white's pieces are on the black side. I am looking to flip the ...
-2
votes
1
answer
193
views
FEN notation problem
See image: Why does this FEN code display incorrectly (it should describe the Portsmouth gambit)?
13
votes
1
answer
7k
views
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?
...
3
votes
1
answer
328
views
pgn-extract suppress output
I installed pgn-extract_17.38 and want to suppress the output of
$ FEN=$(echo "1.d4 Nf6 2.Nf3 e6 3. *" | pgn-extract -F)
Processing stdin
1 game matched out of 1.
I read about suppressing methods ...
2
votes
2
answers
614
views
Engine output: FEN string when blundering
What is the best way to go through a database of my games and have the computer generate a FEN string as well as the next move any time I make an error greater than, say, a minor piece loss?
I've ...
1
vote
2
answers
466
views
How to determine checkmated positions using DOS/CMD, from numerous FEN/EPD chess positions?
I have a collection of checkmated chess positions, in FEN/EPD format.
Most of the time, each of these positions contains some useless pieces, that I really want to remove, in the aim of getting ...
4
votes
1
answer
2k
views
Is there a master list of FEN chess positions for advanced beginner/intermediate?
I'm an advanced beginner. I don't have internet access as much as I like to, so I'd much rather have a series of chess position FENs that I can put into some free chess engine and then try to play ...
17
votes
3
answers
2k
views
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 ...
12
votes
7
answers
11k
views
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 ...
1
vote
1
answer
115
views
Online program for FEN recalculation
I am looking for any online tools that can recalculate the the FEN values based on the current FEN and a given step. Are there any such tools or should I write one on my own.
4
votes
2
answers
6k
views
Chess Engine API
I am writing a C# 3D chess game in Unity. I am looking for a chess engine that can
Take in an FEN string
Return the best move to make given this FEN
Check if the board given this FEN is in checkmate
...
11
votes
2
answers
3k
views
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) ...
3
votes
4
answers
3k
views
How do I create pgn files visually?
I'm looking for a way to create PGN files visually - so I don't want to type in the position and the moves manually, but I want to set up an initial position on a board, play some moves and then ...
3
votes
1
answer
436
views
Do better board representations than the standard one exist?
Consider the classical representation of the state of a chess game. I'll draw the board:
R BK BNR
PPPP PP
N Q
PP
p
np p
ppp pp
r bkqbnr
Here is its move list:
d5 d5
c4 c6
Nf3 e6
...
8
votes
5
answers
2k
views
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 ...
6
votes
5
answers
5k
views
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 ...
0
votes
2
answers
624
views
Numerical FEN writing
What is the most compressed way to "write" a chessboard as an integer considering en passant and castling as always possible no matter what.
1
vote
1
answer
280
views
Fen - Check if King is on e1/e8
Is there some easy way to check whether the black king is on e8 or the white king is on e1, when using fen?
Here the black and white king are on d1/8 r2k3r/3q4/8/8/8/8/8/R1QK2RR
Here both are on the ...
9
votes
2
answers
2k
views
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 ...
10
votes
2
answers
3k
views
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:
...
5
votes
1
answer
351
views
Why isn't the active color allowed to be in check in a FEN legal position?
The title says it. Reading up on how to describe the position of a board, all of the requirements make sense (like two kings not being on adjacent squares and so on) except for the active color being ...
24
votes
7
answers
9k
views
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 ...
16
votes
3
answers
3k
views
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 ...