When I ask for the best move for this FEN:

1rbq1rk1/b4p2/p2p3p/3Bp3/P3P3/2P4P/R2Q1PP1/4K2R w -- - 0 30

[FEN "1rbq1rk1/b4p2/p2p3p/3Bp3/P3P3/2P4P/R2Q1PP1/4K2R w - - 0 30"]

Stockfish (via Python) replies

e1e2

which is a losing move, since there's a free pawn on the 6th rank that the white queen can take. Instead, Stockfish wants me to move the white king for some bizarre reason.

Why does it do this?

I suspect it may have something to do with the ending to the FEN, namely the part where it says

-- - 0 30

I wrote the first part of the FEN by hand, and it is correct, but I didn't know what move it was or how to describe castling, so I just made up the "-- - 0 30" part. Is that the reason Stockfish gives this confusing answer?

You have a bug in your script. Try it on Stockfish yourself:

position fen 1rbq1rk1/b4p2/p2p3p/3Bp3/P3P3/2P4P/R2Q1PP1/4K2R w - - 0 1
go movetime 1000

bestmove d2h6 ponder c8e6

How many nodes have you given Stockfish to think?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.