How to deduce the side affected by mate evaluatiion

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?


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.

链接地址: http://www.djcxy.com/p/84658.html

上一篇: d棋盘的识别

下一篇: 如何推断受配偶评价影响的一面