Idea that brings us closer to measuring the difficulty of moves
... context is for kingsIntro
One of the big issues of software is understanding human chess. I am not going to reiterate why that is, other than that brains and computer engines have a fundamentally different architecture, so they can't "get" each other.
However, I've just thought of a metric that could, if properly implemented, reach that holly grail of computer chess algorithms: determining when a move would be difficult for a human.
Counting contexts.
Computers have no problem switching contexts. They can save the old one or discard it altogether and start from scratch at any time. Humans are the opposite, they stick to a context tooth and nail using all of their resources to make it work, even against all of the odds. My idea is that a move is more humanly difficult as the number of different contexts that must be taken into account increases.
Example: one capture of a pawn that is defended by three other pieces, while each capture path ends in defeat for the other side. Computers see that immediately, as they can fully explore the first few ply and actually "solve" the position. Humans need to switch from the context of one piece to the context of the other. Obvious computer move, difficult for humans.
Another example: you prepared one sneaky pawn move that will seemingly attack something, but in fact opens the way for a capture of an undefended bishop. The opponent hangs a queen and king fork, but you still capture the bishop, because making the other move would involve abandoning your (working) plan and finding a new one.
Yet another example: CCT (Checks, Captures, Threats) and any other mnemonic system for training humans to play chess. This is basically an external context, something the human has been trained to do and it is difficult to untrain on the spot when the position requires it. That's why @tpr insists a brilliant move has to be quiet, because otherwise it just falls under obvious training systems that make it clear. This is more subjective, and that's a very big problem for algorithms, as this depends on the training of the particular human the engine is analyzing.
Even something like a tactic depending on a very long acting piece, like a fianchettoed bishop, may be difficult for humans if their attention is focused on another part of the screen.
Other unsuccessful ideas
Before this, I've had some other ideas that were similar, but turned out wrong or incomplete.
One particular type of attempt, by the likes of Maia and Noctie, is to try to train an AI to act like a human in chess. It's not going so well, because humans are both very slow and very complex, limited in some parts and extremely capable in others, also biased in all kinds of weird ways that make little sense. I also tried to simulate a human, but to no good results.
Another idea was to look at the board from the standpoint of the pieces. Groundview, so to speak. That would make knights completely blind most of the time, rooks not participate until the pawn in front of them goes away and so on. It was not a fruitful idea.
So if you can't make a machine to play like a human, make it NOT play like a human. The opposite of the first idea, still not good.
Humans do follow the principles of chess, or at least they should. One could say that moves not following or openly breaking those principles are difficult for a human. But then there are so many people who play without any concern for any principle.
Another thought was trying to determine the area in which the player is focused and consider difficult moves that require attention elsewhere. This feels promising, but very hard to achieve.
What is context?
The idea of counting the different contexts that lead to victory, as well as the ones that do not, feels like a really promising one. Unfortunately you cannot use board positions and centipawn evaluations to do this. Such an algorithm requires the entire multipv engine analysis for the position. Yet, having that, one can calculate the paths of victory and defeat, analyze each one for plausibility and determine that a winning move that leads to multiple ways of winning and improbable ways of losing.
I still don't have a clear image on how to define these contexts, only that there should be different types of them, but once defined, they can be carefully and objectively counted. A difficult move would have multiple winning contexts and few losing ones. An easy move would have few or just one winning context and no losing ones. Something like that.
Conclusion
While still nebulous in my head, I have some initial ideas. It's mostly about an overall view of paths to victory that are simultaneously required to lead there. I don't know, maybe you guys come up with some more ideas. I've said my piece.
