Do you know how IBM's Deep Blue chess computer controversially beat champion, Gary Kasparov in 1997? It's a search algorithm called min-max. This article describes how it works at a high-level.
Adversarial search is characterized by opposition or conflict. These problems require us to anticipate, understand, and counteract the actions of an opponent in pursuit of a goal. In chess, we must react to the moves made by an opponent while carrying out your own strategy.
Examples of adversarial problems include two-player turn-based games such as Tic-Tac-Toe and Connect Four. Players take turns for the opportunity to change the state of the environment of the game to their favour.
A set of rules dictates how the environment may be changed and what the winning and end states are. The min-max algorithm uses a heuristic score to make decisions. This score is defined by a crafted heuristic and is not learned by the algorithm.
Assume that we have a heuristic that provides a score in which positive numbers are better than negative numbers. More about heuristics here: https://rhurbans.com/using-heuristics-for-intelligence/