How do I create a FEN string?

  • #61

    JCapanegra, yes I understand FEN strings & PGN files pretty well by now but it wasn't clear what you meant by 'nothing in the middle'. I wasn't sure if you thought the game should have continued or not.

  • #62

    Sorry Stephen.... I mean just this:

    "7k/p1r2b2/5q2/1p1p1pR1/5P2/P7/1P2Q2P/1K4R1 w - -  32"

    "7k/p1r2b2/5q2/1p1p1p1R/5P2/P7/1P2Q2P/1K4R1 b - -  32"

    "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -  1"

    "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3  1"


    instead of this:

    "7k/p1r2b2/5q2/1p1p1pR1/5P2/P7/1P2Q2P/1K4R1 w - -  32"

    "7k/p1r2b2/5q2/1p1p1p1R/5P2/P7/1P2Q2P/1K4R1 b - -  32"


    "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -  1" 

    "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3  1"


    Its seems stupid difference, but pgntofen shows as the 1st one and is better to my purpose.

    Sorry.... no important. 

  • #63

    That's clearer now!   Smile

  • #64
    [COMMENT DELETED]
  • #65

    Hi, when creating a FEN strings. Can I indicated that the position is at a certain move number ?

    Say, white to play at move 34 ? 

  • #66
    SaxJazz wrote:

    Hi, when creating a FEN strings. Can I indicated that the position is at a certain move number ?

    Say, white to play at move 34 ? 

    Sure. Here's an example FEN:

    r1bqk2r/p1ppbppp/2n2n2/Pp2p3/4P3/2N2N2/1PPP1PPP/R1BQKB1R w KQkq b6 0 6

     

    In this example, the fullmove number is the last number in the FEN string. Both sides still have castling rights, and Black has just played 5...b7b5. Since White can capture en passant on the next move, there is an active en passant square on b6. The zero (the next to last number) is the halfmove clock, which indicates the number of halfmoves (ply) since the last pawn advance or capturing move. (Because Black has just moved a pawn, the halfmove clock is at 0.)

     

    In this example, if both sides had lost castling rights, you would substitute a single dash for "KQkq", and if there was no possibility of an en passant capture on the next move, you would substitute a second dash for "b6".

or Join

Online Now