# Are there chess programs that have a notion of a chaotic or volatile position?

I would like to know what are some quantitative criteria to characterize chaotic or volatile positions, and if there are engines or other programs that implement such criteria. One application I have in mind is extracting such positions from games for the purpose of calculation training. For example, finding positions in which one move leads to chaos on the board. Another would be to implement engine settings where the engine prefers to go into chaotic lines.

I thought of some characterizations.

1. Let us say we analyze the game tree to k plies to evaluate a given position P, and arrive at an evaluation eval(P,k). Now we look at the subtree in which all nodes have an evaluation close to eval(P,k). If this subtree is large, then the position would be difficult for humans to analyze. A drawback of this definition is that such a criterion may also include many quiet positions.
2. Volatility: if the sequence eval(P,k), k = 0,1,2,... shows a lot of fluctuation, then it means the position is quite volatile.
3. Both sides on attack, e.g., multiple pieces on both sides attacked, both kings vulnerable, etc.

The second criterion is certainly interesting, but would also like to also incorporate something like 1 and 3. What are some other quantitative criteria?

I call this complicated position something that is difficult for humans to analyze. But we have to classify it because one position can be complicated to a weaker player but not for a stronger player.

I have tried your listed #2 and #3.

Other ideas:

• Count the number of pins - pins can make the position difficult to evaluate, not just the absolute pin but other pins like a black queen will be captured by a white bishop if the black knight moves. The greater the number of pins the more complicated the position can become.

• Presence of queen - when there is queen on the board it is difficult to evaluate because queen has a high mobility. Humans have to check every square the queen can move to get a complete analysis.

• High number of legal moves for both sides - When position is dynamic humans have to evaluate most of them to not miss some tactics.

• Presence of 2 or more important features - When humans are faced with 2 or more features like we have a good passer but our king is under attack, this would contribute to complications because we have to calculate defense and find ways to push our passer safely. We can use a weaker and stronger engine to evaluate such position. If score of weaker engine is high positive (it sees that the passer is good) while the score of stronger engine is just about equal (the king attack is deadly if not addressed) then this position can be complicated.

• Use multipv greater than or equal to 2 - the presence of 2 or more good looking moves but only one is good can make the position complicated to a human. Use a weaker engine to generate 2 or more best moves, if it sees that there are 2 best moves and the stronger engine multipv analysis shows there is only 1 best move then this can be a candidate for a complicated position.

• Try the stockfish engine, it has eval command where it will list static evaluations like passer, mobility and others. This static info together with the shallow, deep and multipv searches info can be used to calculate complicated position.

• These are very interesting ideas. In particular, I had not thought about using two or more engines and using their disagreement as a criterion for a complicated position. Regarding your first point about pins, instead of focusing on just pins, why not simply consider 'a piece x moving makes piece y vulnerable', which would capture pins as well. Finally, are there engines that use such criteria internally, e.g., to decide the depth of analysis in some variations? Jul 24, 2022 at 0:14

Many engines (those with handcrafted eval at least) do this actually, but it might not be what you're looking for. The way they do it is via contempt, which uses the amount of material on the board remaining as a proxy for the complexity of the position. If the engine is playing a much-weaker opponent, then it's possible to increase contempt, which makes the engine avoid trades.