Finding Threats and Piece Manoeuvres with Engines
How helpful are the mainlines of Stockfish to explain the ideas behind moves?
One of the most frustrating things about looking at chess engines is that they can't tell you the idea behind moves. Often knowing the best move isn't very helpful when you don't understand the ideas behind it.
There could be many possible reasons for playing a certain move so it's difficult to programmatically explain every move. But I think that many moves can be explained be threats (either creating or preventing them) and piece manoeuvres. So I focused on detecting these kind of moves with engines first.
Piece Manoeuvres
While looking at threats can be very insightful, there’re many positions where it won't be very helpful. Quiet positions are by definition absent of threats, so looking for threats won't explain the moves played. But finding piece manoeuvres might be more insightful.
To find manoeuvres, I looked if the best engine line consists of moving one piece multiple times in a row. Then one can look for the square where the piece will eventually end up on, instead of focusing on the individual moves.
One very typical piece manoeuvre happens in many lines of the Ruy Lopez:
The most common move in this position is 1.Nbd2. It might not be clear at first what the knight is doing on d2. But the idea is clear when one sees that the final square is either e3 or g3.
The main problem with this approach is that engines often prevent strong manoeuvres even at the cost of material. One extreme case is the classic example from Short-Timman, 1991
Conclusion
I thought that the engine would show classic king manoeuvre Kh2-g3-f4-g5 in this position, but that wasn’t the case. Stockfish wanted to play 31.Kh2 Ra8 32.Kg3 Qxd7, giving up the queen to prevent mate. Since this stops the king manoeuvre, it doesn’t show up that the king is heading for h6. The manoeuvre is the winning idea, but Stockfish prevents it from happening.
Explaining ideas with just engine moves turned out to be more difficult than I had expected. While finding immediate threats is simple and works quite well, it's harder to get deeper ideas out of engine lines.
The main problem is that engines often see that a certain plan is very strong and try to prevent it, often at the cost of material. If one could force the engine to play "human" moves for the other side, the ideas might show up more clearly. But classifying moves as human is even more difficult.
I'd be very interesting to hear if you have any thoughts about addressing the problems I've mentioned.