Essentially, do Chess Engines acknowledge that their opponents might make "flawed" moves? Or do they always assume absolutely perfect play.
More specifically, if an engine has a choice between 2 moves and one of them is:
- Mate in 5, with perfect play, all of which is completely obvious
and the other is
- Mate in 4 ... but only if the opponent does something superficially counter-intuitive. And if they do the superficially obvious thing then you can actually escape the Mating sequence into a not-directly Mated position
If you assume perfect play, then both positions are a loss, and I assume that engines are "taught" to pick the longest game if all games are lost.
But I would argue that if you believe the game is lost either way, you might want to pick the line with highest chance of an error, instead?
Do engines do that?
How does one [teach the enginge] what the chance of error is?
Exactly the same way you teach it every other thing ... data. Feed it 100M games and let it work out what kinds of errors are more/less common. Hell ... if you give it the player's rankings it can probably figure out classes of error by ranking range, and estimate the range of its opponent on the fly.