Most 2-player games need to have an in-built AI to play against when there is only a single player. A general algorithm that is widely used in most strategy games is called the Minimax Algorithm.

What is the Minimax Algorithm?

The minimax algorithm is a decision-making algorithm used to determine the most optimal move of a player in a two-player game against their opponent. Games are non-cooperative in nature like Chess, Go, etc.

The minimax algorithm is an example of artificial intelligence which does not use machine learning. The minimax algorithm is simply a recursive backtracking algorithm that uses the…

Shreya Sridhar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store