Would there happen to exist a tool (or a better way) that could get me from a FEN + a move to an updated FEN?
I was also thinking maybe just something that converts a PGN to an array of FEN's.
Then I could just turn the FEN + move into an array with starting position = FEN and a move list with the one move. Array would then be two FEN's, the last of which I wanted.
Utility that converts FEN+move -> new FEN
Moderator: Ras
-
- Posts: 4848
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Utility that converts FEN+move -> new FEN
I can't understand that, describe more, give an example.titanD wrote:Would there happen to exist a tool (or a better way) that could get me from a FEN + a move to an updated FEN?
Let me think from your added description.
There is a tool called pgn2fen. This tool can also turn pgn to epd.I was also thinking maybe just something that converts a PGN to an array of FEN's.
I can't understand this.Then I could just turn the FEN + move into an array with starting position = FEN and a move list with the one move. Array would then be two FEN's, the last of which I wanted.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Utility that converts FEN+move -> new FEN
Sjaakii can do this easily if you're willing to run it on its own (for instance in a terminal).titanD wrote:Would there happen to exist a tool (or a better way) that could get me from a FEN + a move to an updated FEN?
Given this input:
Code: Select all
xboard
force setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -
e4
fen
Code: Select all
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1
Code: Select all
$sjaakii < fenmove2fen.in | tail -n1
One comment: as you can see from the FEN, Sjaakii sets the en-passant field "e3", even if the en-passant capture isn't actually legal. Strictly speaking this violates the FEN specification, but this ought to be harmless.
-
- Posts: 28382
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Utility that converts FEN+move -> new FEN
It all depends in which format you have the FEN + move. The standard format for storing moves is of course PGN. If you would have a file with such 1-move games, you could use it as a list of opening lines in WinBoard, for playing a match between two Resign engines (which resign as soon as they have to think up a move), and set WinBoard to save the final position of each game to a file.
The minimal requirement so that WinBoard still recognizes the input as a PGN game would be the FEN tag plus a move. Like
[FEN "1k6/7R/1K6/8/8/8/8/8 w - - 0 1"] h7h8
I am not sure I included the Resign engine in the WinBoard install, however. (I use it myself to extract starting positions from opening books.)
The minimal requirement so that WinBoard still recognizes the input as a PGN game would be the FEN tag plus a move. Like
[FEN "1k6/7R/1K6/8/8/8/8/8 w - - 0 1"] h7h8
I am not sure I included the Resign engine in the WinBoard install, however. (I use it myself to extract starting positions from opening books.)