0

I have a GUI communicating with a uci chess engine (Stockfish 8). The problem is that when the engine finds a mate, it only sends output containing ". . . score mate 1 nodes 4677 . . .". I can deduce this means there is mate in one move (#1). But, unlike cp evaluation, I don't see negative sign when it is Black that can mate. So, how do I know if it is White or Black that can mate?

ABCD
  • 7,914
  • 9
  • 54
  • 90
codebro
  • 25
  • 9

1 Answers1

2

No. You'll get a negative sign when the player to move gets checkmated. Try it yourself:

position fen 7k/6q1/6q1/8/8/8/8/7K w - -
go infinite

You'll get:

info depth 127 seldepth 3 multipv 1 score mate -1 nodes 273 nps 39000 tbhits 0 time 7 pv h1h2 g7h6

Do you see the "mate -1"? The sign is relative to the player to move in the root position.

ABCD
  • 7,914
  • 9
  • 54
  • 90