Chess UCI get position as FEN

257 Views Asked by At

Trying to code a chess engine for the first time. I have connected my engine to the cutechess GUI cutechess. Currently my engine is receiving the current position from cutechess as something like: position startpos moves e2e4...etc

But looking at this from the UCI protocol:

enter image description here

I think my engine should have the option to receive the current position as a FEN string from cutechess GUI instead of position startpos moves e2e4...etc.

Debug Log:

  • ChessBot(0): uciok
  • ChessBot(0): isready
  • ChessBot(0): readyok
  • ChessBot(0): ucinewgame
  • ChessBot(0): position startpos
  • ChessBot(0): position startpos moves f2f3
  • ChessBot(0): isready
  • ChessBot(0): readyok
  • ChessBot(0): go wtime 300000 btime 300000 movestogo 40
  • ChessBot(0): bestmove e7e5

Instead of my engine receiving: position startpos moves f2f3

How do I instead receive position fen (fenstring)?

UCI protocol: UCI Protocol

0

There are 0 best solutions below