I read about the chess engine algorithms and came up with a question. If, for example roughly all (disregarding alpha-beta pruning) possible 20 moves variations are calculated, why does a chess engine not consider a piece exchange on move 20 winning? It seems to me that to an evaluation function the final position will seem like one player is just up a piece. How do they solve this problem?


1 Answer 1


Chess engines will always try to extend the search by a few moves, so a position is only evaluated if it is considered "quiet". This is called Quiescence Search, and the problem you describe that it is trying to prevent is called the "Horizon effect".

So before evaluating a position, if there are captures, checks and so on in the position, then the search is first extended by those moves.

  • Due to the Halting Problem it seems like a weakness whereby one could detain a chess engine by pursuing a line that is very "noisy" for many moves, thereby making it waste time getting into deeper plys.
    – Michael
    Aug 22, 2020 at 17:00
  • One might suspect that "very noisy" situations often (seem to?) resolve fairly quickly? Aug 22, 2020 at 17:46
  • Well time spent is an issue (that page I linked to says that 50% - 90% of total nodes searched are nodes added for quiescence search!) but I have no idea why the halting problem would matter. It always halts, the game is finite. Aug 22, 2020 at 17:47
  • This answer could be improved by including the definitions of "quiet" and the "Horizon effect" in the answer itself, since those are a core part of the answer.
    – NotThatGuy
    Aug 23, 2020 at 2:35
  • 2
    It has nothing really to do with the halting problem. As for trying to "confuse" the chess engine, to properly do that you would need to be able to match it's calculating depth...
    – Erik
    Aug 23, 2020 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.