How to get static evaluation from Stockfish in case that a king is in check? I am working on a program that should recognize the difference between human and computer players. For this purpose, I need some parameters. A part of them would be the individual values of the static position evaluations.
In Stockfish you can get these values with the command EVAL. However, if I call EVAL while one of the kings is in check, I don't get a rating. Instead, I only get the info &quot;none (in check)&quot;


Does somebody know why this is the case? In my opinion, that doesn't make sense as long as it's not a checkmate or stalemate. How can you get around this?
If a king is in check, that's a major thing. There are likely to be few legal replies for the engine to consider. It's also unlikely (although possible) that there would be a large chain of checks from both sides. And it's very unlikely that you'd want to immediately prune the check; they're almost always worth at least considering.
When the engine is evaluating lots of positions, it therefore makes sense for it to not waste time evaluating the check position itself. Instead it's quicker to look ahead to how the check is resolved.