Minimax algorithm

The perfect play for deterministic complete-information games: Choose move to position (one of the immediate tree nodes) with the highest minimax value, i.e. the best achievable payoff against the best opponent play.