Yes, broadly speaking, all chess mistakes can indeed be categorized under either "allowing something" or "missing something".
"Allowing something" would refer to errors where a player makes a move that allows their opponent to gain an advantage, such as leaving a piece undefended, making a move that allows for a checkmate in the next few moves, or unnecessarily sacrificing a piece.
"Missing something" would refer to errors where a player fails to recognize or capitalize on an opportunity. For example, missing a chance to checkmate, not capturing an undefended piece, or failing to see a beneficial strategic move.
As an algorithm base structure, this can be quite useful. Here's a simple way to do it:
- For each possible move, calculate the potential outcomes a few moves ahead (the number of moves ahead depending on the computing power available). This includes positions, points, and threats.
- For each outcome, evaluate if it fits under "allowing something" or "missing something". This can be done by checking if any own pieces are left undefended, checking if the move allows any harmful moves for the opponent, or checking if the move misses any beneficial moves.
- Rank the moves based on the evaluations. A move that allows something harmful or misses something beneficial should be ranked lower than a move that does not.
- The algorithm then chooses the highest-ranked move.
This is a very simplified version of how such an algorithm could work and real-world chess engines use far more complex methods, but it gives a basic idea of how "allowing something" and "missing something" can be used as a base structure for a chess algorithm.