Explain the minimax algorithm along with the different terms.

Minimax algorithm is a backtracking algorithm used for decision making in game theory. This algorithm provides the optimal moves for a player by assuming that another player is also playing optimally.

This algorithm is based on two players, one is called MAX, and the other is called the MIN.

Following terminologies that are used in the Minimax Algorithm:

  • Game tree: A tree structure with all possible moves.
  • Initial State: The initial state of the board.
  • Terminal State: Position of the board where the game finishes.
  • Utility Function: The function that assigns a numeric value for the outcome of the game.