0

I asked the same question on Stockfish's forum.

Black to move in the classic scholar's mate position. mate in 1. Engine produce erroneous results?

position fen rnbqkbnr/pppp1ppp/8/4p3/6P1/5P2/PPPPP2P/RNBQKBNR b KQkq -

eval

Total Evaluation: -0.85 (white side)

Same position, except black checkmated white. White to move:

position fen rnb1kbnr/pppp1ppp/8/4p3/6Pq/5P2/PPPPP2P/RNBQKBNR w KQkq -

eval

Debug error! abort() has been called

Here is another position that crashes:

1b1B1k2/8/2B1p1p1/3n1p2/4KP2/6P1/8/8 w
eval

Go seems to work properly, showing that its mate in 1, and checkmate. However eval is not showing the correct numbers.

Or am I misunderstanding something here?

6
  • 1
    Your fens are invalid. Look at it again, you need the 50 move counter.
    – SmallChess
    Jan 21 '17 at 6:49
  • Even with 50 move counter it still doesnt work. Jan 21 '17 at 7:28
  • 1
    I've voted to close the question because I've answered the question but in the comments the OP insisted and clearly had little idea on what he was doing. In particular, he was trying to make static evaluation work which is not possible. Search engine needs to think. There is no chance this question can be answered, you just can't analyze with just a static evaluator.
    – SmallChess
    Jan 22 '17 at 7:48
  • If I knew exactly what I was doing, I wouldn't be asking a question now would I? Jan 22 '17 at 17:22
  • You need to search, most likely more than a second. Forget eval, it is not designed for evaluating a FEN. I know you have million positions, but that doesn't change that you still have to search. You could search with multi-core, rent some clusters on Amazon to speed up.
    – SmallChess
    Jan 23 '17 at 5:13
0

Everything works perfectly.

  • You should add 50 move counter to your FEN, but this is not the biggest issue.
  • The eval command returns a static evaluation of your position. It doesn't start the search, that's why Stockfish gave you back the results immediately.

Try this:

ucinewgame
position fen rnbqkbnr/pppp1ppp/8/4p3/6P1/5P2/PPPPP2P/RNBQKBNR b KQkq - 0 1
go movetime 1000

The engine gives you back mate in one:

info depth 126 seldepth 2 multipv 1 score mate 1 nodes 3781 nps 945250 tbhits 0 time 4 pv d8h4
12
  • Ok, I need to store the score with FEN... If i dont use EVAL, I cant get score. Using GO will return a long list of string. Jan 21 '17 at 16:37
  • I've also said that GO is working. But EVAL is not. EVAL crashes, and gives wrong numbers. What does static evaluation mean? Its either mate in 1 or its not. Jan 21 '17 at 17:26
  • 1
    In this case, static means it just evaluates the position without generating any moves.
    – Herb
    Jan 21 '17 at 17:36
  • I see... well what should I do? I have a FEN file of a few thousand positions. And I need to get the score for each of the position... and store it in CSV format. Jan 21 '17 at 17:50
  • @Telenoobies You need to parse the info depth lines. Please take a look at the UCI protocol. The score is just score mate 1 in this example.
    – SmallChess
    Jan 21 '17 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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