appengine.ai
Published in

appengine.ai

Maximum and Minimum Concepts in AI

Minimax algorithms in AI making the game theory more fun.

Minimum and Maximum algorithms in Artificial Intelligence are all about decision making. When there is any gain it is referred to as maximum — to maximize the minimum gain. This concept is mostly used in game theory, statistics, and philosophy. It is used in decision making and game theory because minimum and maximum is a backtracking algorithm. As it is used in playing games in AI, it uses recursion through game theory. The maximizer tries to get the highest score possible while the minimizer tries to get the lowest possible score. It performs intense research for the investigation of the complete game tree. Here it goes down till the final node of the tree and then backtracks the tree as recursion. With this kind of good features, it becomes extremely important for AI Startups to deliver good quality products.

Example

To understand it working better let's see an example of a two-player game, which is used to represent the game tree. As we know minimum and maximum is backtracking algorithm. Here as two players are going to play the game one shall be the maximum and the other minimum. They are going to be opponents of each other. As we know it performs intense research for the investigation for the game tree. It shall go down to the final node of the tree and then backtrack the tree as recursion. Pseudocode for minimum and maximum

function minimax(node, depth, maximizingPlayer)is

if depth ==0 or node is a terminal node then

return static evaluation of node

if MaximizingPlayer then // for maximizer player

maxEav= -infinity

for each child of node do

eva= minimax(child, depth-1, false)

maxEva= max(maxEva,eva) //gives Maximum of the values

return maxEva

else //for Minimizer player

minEva= +infinity

For each child of node do

eva= minimax(child, depth-1, true)

minEva=min(minEva, eva) //gives minimum of the values

Return minEva

Source: https://www.javatpoint.com/mini-max-algorithm-in-ai:

--

--

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