Minimax is an algorithm used to determine the score in a zero-sum game after a certain number of moves, with best play according to an evaluation function.

The algorithm can be explained like this: In a one-ply search, where only move sequences with length one are examined, the side to move (max player) can simply look at the evaluation after playing all possible moves. The move with the best evaluation is chosen. But for a two-ply search, when the opponent also moves, things become more complicated. The opponent (min player) also chooses the move that gets the best score. Therefore, the score of each move is now the score of the worst that the opponent can do.

Jaap van den Herik's thesis (1983) ^{[2]} contains a detailed account of the known publications on that topic. It concludes that although John von Neumann is usually associated with that concept (1928) ^{[3]} , primacy probably belongs to Émile Borel. Further there is a conceivable claim that the first to credit should go to Charles Babbage^{[4]}. The original minimax as defined by Von Neumann is based on exact values from game-terminal positions, whereas the minimax search suggested by Norbert Wiener^{[5]} is based on heuristic evaluations from positions a few moves distant, and far from the end of the game.

int maxi(int depth ){if( depth ==0)return evaluate();int max =-oo;for( all moves){
score = mini( depth -1);if( score > max )
max = score;}return max;}int mini(int depth ){if( depth ==0)return-evaluate();int min =+oo;for( all moves){
score = maxi( depth -1);if( score < min )
min = score;}return min;}

Negamax

Usually the Negamax algorithm is used for simplicity. This means that the evaluation of a position is equivalent to the negation of the evaluation from the opponent's viewpoint. This is because of the zero-sum property of chess: one side's win is the other side's loss.

James R. Slagle (1963). Game Trees, M & N Minimaxing, and the M & N alpha-beta procedure. Artificial Intelligence Group Report 3, UCRL-4671, University of California

Donald Michie (1966). Game Playing and Game Learning Automata. Advances in Programming and Non-Numerical Computation, Leslie Fox (ed.), pp. 183-200. Oxford, Pergamon. » Includes Appendix: Rules of SOMAC by John Maynard Smith, introduces Expectiminimax tree^{[7]}

^Don Beal (1999). The Nature of MINIMAX Search. Ph.D. thesis, ISBN 90-62-16-6348, pp. 2, refers Philip Morrison and Emily Morrison (1961). Charles Babbage and his Calculating Engines. Dover Publ. New York

^Alexander Reinefeld (2005). Die Entwicklung der Spielprogrammierung: Von John von Neumann bis zu den hochparallelen Schachmaschinen. slides as pdf, Themen der Informatik im historischen Kontext Ringvorlesung an der HU Berlin, 02.06.2005 (English paper, German title)

Home * Search * MinimaxMinimaxis an algorithm used to determine the score in a zero-sum game after a certain number of moves, with best play according to an evaluation function.The algorithm can be explained like this: In a one-ply search, where only move sequences with length one are examined, the side to move (max player) can simply look at the evaluation after playing all possible moves. The move with the best evaluation is chosen. But for a two-ply search, when the opponent also moves, things become more complicated. The opponent (min player) also chooses the move that gets the best score. Therefore, the score of each move is now the score of the worst that the opponent can do.

Minimax Dadamax in Person, 1919-1920

^{[1]}## Table of Contents

## History

Jaap van den Herik's thesis (1983)^{[2]}contains a detailed account of the known publications on that topic. It concludes that although John von Neumann is usually associated with that concept (1928)^{[3]}, primacy probably belongs to Émile Borel. Further there is a conceivable claim that the first to credit should go to Charles Babbage^{[4]}. The original minimax as defined by Von Neumann is based on exact values from game-terminal positions, whereas the minimax search suggested by Norbert Wiener^{[5]}is based on heuristic evaluations from positions a few moves distant, and far from the end of the game.## Implementation

Below the pseudo code for an indirect recursive depth-first search. For clarity move making and unmaking before and after the recursive call is omitted.## Negamax

Usually the Negamax algorithm is used for simplicity. This means that the evaluation of a position is equivalent to the negation of the evaluation from the opponent's viewpoint. This is because of the zero-sum property of chess: one side's win is the other side's loss.## See also

## Search

## People

## Selected Publications

## 1920 ...

1921).La théorie du jeu et les équations intégrales à noyau symétrique. Comptes Rendus de Académie des Sciences, Vol. 173, pp. 1304-1308, English translation by Leonard J. Savage (1953).The Theory of Play and Integral Equations with Skew Symmetric Kernels.1928).Zur Theorie der Gesellschaftsspiele. Berlin^{[6]}## 1940 ...

1944).Theory of Games and Economic Behavior. Princeton University Press, Princeton, NJ.1948).Cybernetics or Control and Communication in the Animal and the Machine- MIT Press, Cambridge, MA.## 1950 ...

1950).Programming a Computer for Playing Chess, Philosophical Magazine, Ser.7, Vol. 41, No. 314 - March 19501950).Elementary Proof of a Minimax Theorem due to von Neumann. inHarold W. Kuhn and Albert W. Tucker (eds) (

1950).Contributions to the Theory of Games I. Princeton University Press1953).Discussion of the Early History of the Theory of Games, with Special Reference to the Minimax Theorem. Econometrica, Vol. 211953).The Theory of Play and Integral Equations with Skew Symmetric Kernels. Econometrica, Vol. 21, pp. 101-115, English translation of Émile Borel (1921).La théorie du jeu et les équations intégrales à noyau symétrique.1956).An analog of the minimax theorem for vector payoffs. Pacific Journal of Mathematics, Vol. 6, No, 1## 1960 ...

1963).Game Trees, M & N Minimaxing, and the M & N alpha-beta procedure.Artificial Intelligence Group Report 3, UCRL-4671, University of California1966).Game Playing and Game Learning Automata.Advances in Programming and Non-Numerical Computation, Leslie Fox (ed.), pp. 183-200. Oxford, Pergamon. » Includes Appendix:Rules of SOMACby John Maynard Smith, introduces Expectiminimax tree^{[7]}1968).Experiments With a Multipurpose, Theorem-Proving Heuristic Program. Journal of the ACM, Vol. 15, No. 11969).Experiments With Some Programs That Search Game Trees. Journal of the ACM, Vol 16, No. 2, pdf## 1970 ...

1970).Experiments with the M & N Tree-Searching Program. Communications of the ACM, Vol. 13, No. 3, pp. 147-154.1972).Games Playing with Computers.## 1980 ...

1982).Error Analysis of the Minimax Principle. Advances in Computer Chess 31987).Game Tree Searching by Min/Max Approximation. Artificial Intelligence Vol. 34, 1, pdf 1995## 1990 ...

1990).On Minimax Game Tree Search Pathology and Node-value Dependence. TR90-24, University of Alberta, pdf1993).A Bibliography on Minimax Trees. ACM SIGACT News, Vol. 24, No. 41994).Evolving Neural Networks to focus Minimax Search. AAAI-94, pdf » Othello1995).A Survey on Minimax Trees and Associated Algorithms.Minimax and Its Applications. Kluwer Academic Publishers1996).Best-first minimax search. Artificial Intelligence, Vol. 84, Nos 1-2 » Best-First1996).Game Theory, On-line Prediction and Boosting. COLT 1996, pdf1999).The Nature of MINIMAX Search. Ph.D. thesis## 2000 ...

2001).Minimax Game Tree Searching. Encyclopedia of Optimization, Springer2001).John von Neumann’s Conception of the Minimax Theorem: A Journey Through Different Mathematical Contexts. Archive for History of Exact Sciences, Vol. 56, Springer2004).Rediscovering *-Minimax Search. CG 2004, pdf2005).Why Minimax Works: An Alternative Explanation. IJCAI 2005 » Search Pathology2009).Minimax Game Tree Searching. Encyclopedia of Optimization, Springer## 2010 ...

2014).Interest Search - Another way to do Minimax. AI Factory, Summer 2014## Forum Posts

## External Links

## References

1983).Computerschaak, Schaakwereld en Kunstmatige Intelligentie. Ph.D. thesis, Delft University of Technology. Academic Service, The Hague. ISBN 90 62 33 093 2 (Dutch)1928).Zur Theorie der Gesellschaftsspiele. Berlin1999).The Nature of MINIMAX Search. Ph.D. thesis, ISBN 90-62-16-6348, pp. 2, refers Philip Morrison and Emily Morrison (1961).Charles Babbage and his Calculating Engines. Dover Publ. New York1948).Cybernetics or Control and Communication in the Animal and the Machine- MIT Press, Cambridge, MA.2005).Die Entwicklung der Spielprogrammierung: Von John von Neumann bis zu den hochparallelen Schachmaschinen. slides as pdf, Themen der Informatik im historischen Kontext Ringvorlesung an der HU Berlin, 02.06.2005 (English paper, German title)## What links here?

Up one level