Is there a way to ask stockfish from the command line if a position is "quiet"? I am running a script like stockfish_fen.sh to return the analysis, but I would like to also know if stockfish considers this position to be of positional or tactical nature.
Welcome to SE :)– feritMar 21, 2016 at 3:12
2As others said the answer is no, and I'm not sure how in the first place you would define "quiet" so that is can be implemented algorithmically. But one idea might be to turn up the number of lines shown to 3 or 4 and look at the gradient of the evaluation from best to worst. A rapid change suggests forcing lines and other fun things going on while a flat distribution suggests quieter, less immediately critical things are happening. Far, far, far from full proof but might be of some use.– Ian BushMar 21, 2016 at 7:38
Yes that might be a decent proxy. I had imagined that there would be some logic in the code already to prevent horizon effects. Maybe I'll snoop around the code base and try to reformulate the question more precisely.– Peter CottonMar 22, 2016 at 0:49
I don't think there is anything like that, and it'll never be implemented.
If you insist, you may want to look at how Stockfish does quiescence search. A "tactical" position would mean a dozen of long series of recursive calls. A "quiet" position would mean otherwise. However, this is a very dirty trick which might not work very well, you'd also need to do some programming.
There're other ideas, such as looking at the average branch factor, number of captures in the principal variation, the distribution of the scores... None of which is absolutely satisfactory.
Stockfish supports an
eval command which dumps the static positional evaluation (not in a format that is meant for computer parsing, but it's still doable). You can parse the output of that, and then do a
go depth 1. If the results differ by more than say half a pawn, the position is not quiet.
An alternative may be to look at the
pv line returned by
go depth 1. If it is longer than 1 move, the line is not quiet.
No, there is not. This page describes commands: http://support.stockfishchess.org/kb/advanced-topics/uci-protocol
Also you can get information about Stockfish, with these commands, if you are on Linux:
stockfish --help man stockfish