A chess engine selects the best move to do given a board configuration. There are several ways to achieve it, despite the common sense, the most used and studied is the simplest: exhaustive search.
Exhaustive Search
In fact, most of deterministic games with two players (chess, checkers, go, etc...) can ...