Talk:Minimax

message: I strongly believe that the negamax pseudocode has an error. When exiting at a terminal node, this possibly happens at a depth <> 0. Then, the returning heuristic value should have a minus, if depth is an odd number.
The correct algorithm at that point, in my opinion, is that:
if node is a terminal node or depth <= 0:
        return the heuristic value of node
if  depth = 0:
        return the heuristic value of node
if node is a terminal node
       if (depth is a even number):
                return the heuristic value of node
        else            
                 return (-1) * the heuristic value of node  — Preceding unsigned comment added by 155.207.112.128 (talk) 09:42, 23 August 2011 (UTC)
thread_title:  error in pseudocode 

message: The line 
alpha = node.player==1 and math.max(alpha,score) or math.min(alpha,score)
should be
alpha = (node.player==1) ? math.max(alpha,score) : math.min(alpha,score)
shouldn't it?
Thanks!  — Preceding unsigned comment added by 87.64.143.40 (talk) 23:21, 2 August 2011 (UTC)
thread_title: Error in the pseudocode?

message: This is a minor point, but the phrase "since it is not computationally possible to look ahead as far as the completion of the game" should really read "it is not feasible" or "the time it would require to look ahead as far as the completion of the game but would be far longer than the lifetime of the universe" or "since it is intractable to look ahead as far as the completion of the game"
It is very much possible to the only limiting factors are time and memory
----
I'm not sure if you can make a generic statement that alpha-beta cuts the ply by half. It's just an empirical observation. I remember reading two-thirds somewhere.
----
Polished up the English a  bit. Took out the hypothetical statement about the absence of an algorithm that would be able to analyse chess.
But I'm afraid that this needs more polishing, especially of some statements that seem wrong to me:
A minmax algorithm would not decide infinity to a node if the game is not decided, right?
A ply is a move of one player, so we should say the lookahead or number of plies.
I did not change this because my AI knowledge might be outdated, any expert advice available?
Robert Dober 2003-07-05 MEDST
----
I cut this bit out and will leave in here:
Article originally from FOLDOC; copied with permission. Feel free to update as needed.
--/Mat 05:00, 6 Apr 2004 (UTC)
thread_title:  discussion 

message: As an amateur popping in, I can't even begin to understand the math here.  Is this a concept that would only be referred to by specialists, or is it possible to add a more extensive plain English section to this article?  (A good place to start might be, what do these equations do?  How would they be used?)  --Dvyost 04:44, 28 October 2005 (UTC)
thread_title:  Non-specialist reading 

message: I think there's more than one use of the term 'minimax' in mathematics, and consequently there should possibly be a disambig page. I've never heard of the game theory usage of the term, but there's another important usage in relation to the approximation of continuous functions with polynomials. I'm not completely familiar with this so I won't explain it myself, but 'Chebyshev Polynomials' by J.C. Mason and D.C. Handscomb has a fairly good explanation, in particular the use of Chebyshev polynomials (first kind and others) and approximating functions with Chebyshev series on the minimax norm.
Bird of paradox 05:50, 29 October 2005 (UTC)
replies: text: I agree. This page should be titled Minimax (decision theory). In other math related applications minimax usually refers to an optimization approach minimizing the max error (both continuous and discrete applications actually), as opposed to the squared or absolute error for example. The total error is written something like sum(error^infinity), if I recall. keith 21:48, 24 February 2006 (UTC)
thread_title:  Minimax approximations of continuous functions 

message: * games where at least one of the players doesn't seem to play rationally (such as when a non-zero-sum game is converted to a zero-sum game by adding "nature": we can often predict exactly what nature would do. Nature hardly ever acts like a "rational" Homo economicus.)
* infinite games
Are there any other cases where minimax is non-optimal?
--DavidCary 07:15, 20 November 2005 (UTC)
replies: text: Prisoner's dilemma for one --D Anthony Patriarche, BSc (talk) 21:58, 26 April 2020 (UTC)
thread_title:  cases where minimax does *not* give the optimal strategy 

message: Something should be said of John Rawls on the page. Maximin, at least, is tossed around in philosophical parley to refer to his theory of ethics/justice. --JMD (talk • contribs) 05:48, 27 July 2006 (UTC)
replies: text: I agree.  I linked to this article from the mention in Theory of Justice. OckRaz (talk) 12:21, 14 December 2007 (UTC)
replies: text: I have found (in my personal experience) that for at least the last half decade some philosophers have been using 'maximin' as shorthand for Rawls' Difference Principle.  The first time that I came accross this, I found it confusing.  I hope that the article as it now stands will help others who are in a similar situation.  My only concern is that they'd have to look for minimax rather than maximin.  If I can figure out how to redirect from the latter to the former, then I will do that too. OckRaz (talk) 13:10, 14 December 2007 (UTC)
thread_title:  Rawls? 

message: If this is a theory someone had to invent it. Anyone know who? -Ravedave (help name my baby) 17:45, 25 August 2006 (UTC)
replies: text: von Neumann and Morgenstern, for starters. Needs a history section; who developed it when; why -- e.g. minimax played an  important role in WWII strategy. The whole article seems way out of balance & non-encyclopedic to me; all tech talk with a lot of repetition, no history, applications other than pure game theory, no examples where minimax fails & other context, critical reception…. --D Anthony Patriarche, BSc (talk) 22:18, 26 April 2020 (UTC)
thread_title:  Who invented? 

message: Two possible origins of the term "minimax" are given in the text (as of 2006/10/1).  Which one is the right one?
"Minimax (sometimes minmax) is a method in decision theory for minimizing the maximum possible loss"
"(A is called the maximizing player and B is called the minimizing player), hence it is called the minimax algorithm."
Eric Le Bigot
:Seems to me like they are both the explanation. --Zvika 09:14, 14 October 2006 (UTC)
thread_title:  Origin of "minimax"? 

message: The article as it stands accurately reflects my understanding of what "minimax" means.  However, there appears to be a folk misuse of the term amongst RPG and MMO players in which it refers simply to minimizing less important character stats (e.g., Charisma) in favor of maximizing more directly-applicable combat stats (Strength, Dexterity)  when the option to manually adjust those stats exists.  Should there maybe be an acknowledgement of this misuse in the article?  It seems pretty common. El Mariachi 09:36, 16 November 2006 (UTC)
replies: text: I think this use you present is fairly minor compared with the mathematical usage of the term and would hinder the article flow if it appears as a different section. I would be willing to consider a  template pointing to a separate article, if you think there's enough content in the alternate use to warrant an article. --Zvika 20:00, 20 November 2006 (UTC)
replies: text: Definitely not worth a separate article.  How about a one-sentence parenthetical acknowledgement at the end?  I'm just concerned that people who are only familiar with the gaming usage will read this entry and think the term has any proper relation. El Mariachi 00:04, 23 November 2006 (UTC)
replies: text: Again, I have never encountered this use, but if you are sure it really is a common term, then all right, be bold and put it in. --Zvika 14:21, 23 November 2006 (UTC)
replies: text: This is generally referred to as min/maxing in gaming circles. I have never heard it called minimax or anything like that. 124.168.107.81 (talk) 05:11, 12 June 2008 (UTC)
replies: text: It seems likely enough that someone might wind up here by accident what with "game" and "minimax". (I have heard "minimax" in RPG context, though much less than min-max, they really blur into each other.) I think the  bit at the top of the article is perfect. Cretog8 (talk) 05:30, 12 June 2008 (UTC)
thread_title:  Folk usage in gaming? 

message: I have redirected Bottleneck programming to this article. However, I found no much context relevant to bottleneck programming.
What I know is that Minimax Programming is also called bottleneck programming. Any hints?
A reference on minimax programming is:
@ARTICLE{ahuja1985mlp,
  author = {AHUJA, RK},
  title = ,
  journal = {Operations research letters},
  year = {1985},
  volume = {4},
  pages = {131--134},
  number = {3},
  publisher = {Elsevier}
}
Sdudah 04:45, 15 January 2007 (UTC)
thread_title:  Bottleneck programming 

message: Instead of pictures of the equations, can somebody who knows LaTeX please write those formulas to make them more legible (and better looking).--Keynes.john.maynard 20:56, 20 April 2007 (UTC)
replies: text: The formulas are written in Latex and rendered as images when you view the page. --Zvika 08:04, 21 April 2007 (UTC)
thread_title:  LaTeX 

message: for faster parse ::
  max(a,b) == min(-a,-b)
based on code from negamax
  function minimax(node, depth)
    if node is a terminal node or depth = CutoffDepth
        return the heuristic value of node
    let α := -∞                                   (* set to min, so that max is found *)
    foreach child of node                         (* evaluate *)
        α := max(α, -minimax(child, depth+1))
    return α
it isn't going to be oldschool if else minimax then, is it. but isn't it better ? given min(a,b)=max(-a,-b) fact
---- ca1 16:19, 3 April 2008 (UTC)
replies: text: It probably won't result in faster code, considering the cost of having two times as many function calls. But it is a nice idea and simplifies the pseudocode. However, I think what you mean is max(a,b) = -min(-a,-b). I changed the text accordingly. --Zvika (talk) 05:28, 4 April 2008 (UTC)
replies: text: This is not minimax, this is negamax, and while the algorithims return the same result, and performs equivalent computation, this is not the actual minimax algorithm.  Additionally, it must be noted that for Negamax, the heuristic depends on the current player to move (it must be negated when current player is Min), while in Minimax it does not.  Also, Negamax must be severely altered when turns are not guaranteed to alternate.  As such, I believe this pseudocode should be labeled as negamax, or reverted to actual minimax code. 131.151.90.233 (talk) 19:18, 20 March 2009 (UTC)
replies: text: I also agree and have made the change back to minimax code. GamePlayerAI (talk) 15:19, 3 October 2013 (UTC)
thread_title:  pseudocode suggestion 

message: Yes the pseduo-code may work but it isn't useable.  It returns alpha, not the move that the artificial intelligence should make.  Below is better pseduo-code that returns the move that the AI should make.  It is taken from page 208 from the book "Algorithms in a Nutshell" http://oreilly.com/catalog/9780596516246
Pseudo-code: http://cardforge.googlecode.com/files/minimax.GIF
Mtgrares (talk) 20:37, 19 November 2009 (UTC)
thread_title: Better Pseudo-code that returns the best move for the AI

message: In section 1.2 it's written: "if the choices are A1 and B1 then B pays 5 to A", but when I look at the payoff matrix, the cell A1,B1 has the value +3, so B should pay 3 to A, isn't it?  —Preceding unsigned comment added by 201.80.137.106 (talk) 15:14, 22 March 2010 (UTC)
thread_title:  wrong example? section 1.2 

message: The example (as of writing this) looks like this:
===Example===
            	B chooses B1              	B chooses B2              	B chooses B3
A chooses A1	    +3	    −2	    +2
A chooses A2	    −1	     0	    +4
A chooses A3	    −4	    −3	    +1
The following example of a zero-sum game, where A and B make simultaneous moves, illustrates minimax solutions. Suppose each player has three choices and consider the payoff matrix for A displayed at right. Assume the payoff matrix for B is the same matrix with the signs reversed (i.e. if the choices are A1 and B1 then B pays 3 to A). Then, the minimax choice for A is A2 since the worst possible result is then having to pay 1, while the simple minimax choice for B is B2 since the worst possible result is then no payment.  However, this solution is not stable, since if B believes A will choose A2 then B will choose B1 to gain 1; then if A believes B will choose B1 then A will choose A1 to gain 3; and then B will choose B2; and eventually both players will realize the difficulty of making a choice. So a more stable strategy is needed.
Some choices are dominated by others and can be eliminated: A will not choose A3 since either A1 or A2 will produce a better result, no matter what B chooses; B will not choose B2 since B3 will produce a better result, no matter what A chooses.
A can avoid having to make an expected payment of more than 1/3 by choosing A1 with probability 1/6 and A2 with probability 5/6, no matter what B chooses.  B can ensure an expected gain of at least 1/3 by using a randomized strategy of choosing B1 with probability 1/3 and B2 with probability 2/3, no matter what A chooses.  These mixed minimax strategies are now stable and cannot be improved.
Shouldn't the part where it says: 
:Some choices are dominated by others and can be eliminated: A will not choose A3 since either A1 or A2 will produce a better result, no matter what B chooses; B will not choose B2 since B3 will produce a better result, no matter what A chooses.
Shouldn't B never choose B3, because it will always produce the BEST result for A?  If B wants to win, he should always choose B1 or B2, as explained in the next paragraph.
CaseyE3100 (talk) 18:07, 24 December 2010 (UTC)
thread_title:  Flawed Example 

message: B chooses B1              	B chooses B2              	B chooses B3
A chooses A1	    +3	    −2	    +2
A chooses A2	    −1	     0	    +4
A chooses A3	    −4	    −3	    +1
The following example of a zero-sum game, where A and B make simultaneous moves, illustrates minimax solutions. Suppose each player has three choices and consider the payoff matrix for A displayed at right. Assume the payoff matrix for B is the same matrix with the signs reversed (i.e. if the choices are A1 and B1 then B pays 3 to A). Then, the minimax choice for A is A2 since the worst possible result is then having to pay 1, while the simple minimax choice for B is B2 since the worst possible result is then no payment.  However, this solution is not stable, since if B believes A will choose A2 then B will choose B1 to gain 1; then if A believes B will choose B1 then A will choose A1 to gain 3; and then B will choose B2; and eventually both players will realize the difficulty of making a choice. So a more stable strategy is needed.
Some choices are dominated by others and can be eliminated: A will not choose A3 since either A1 or A2 will produce a better result, no matter what B chooses; B will not choose B2 since B3 will produce a better result, no matter what A chooses.
A can avoid having to make an expected payment of more than 1/3 by choosing A1 with probability 1/6 and A2 with probability 5/6, no matter what B chooses.  B can ensure an expected gain of at least 1/3 by using a randomized strategy of choosing B1 with probability 1/3 and B2 with probability 2/3, no matter what A chooses.  These mixed minimax strategies are now stable and cannot be improved.
Shouldn't the part where it says: 
:Some choices are dominated by others and can be eliminated: A will not choose A3 since either A1 or A2 will produce a better result, no matter what B chooses; B will not choose B2 since B3 will produce a better result, no matter what A chooses.
Shouldn't B never choose B3, because it will always produce the BEST result for A?  If B wants to win, he should always choose B1 or B2, as explained in the next paragraph.
CaseyE3100 (talk) 18:07, 24 December 2010 (UTC)
thread_title: Example

message: The block that is called "Lua Example" has no description. Is it how to build the tree or traverse the tree. No code comments and a reader is just supposed to work it out for themselves. Thus, why bother inserting the block at all.
And as to the other text. It is written by someone who understands the method/algorithm but has no ability in passing on this knowledge to other readers.
Another effectively worthless piece of technical description.  — Preceding unsigned comment added by 81.187.174.42 (talk) 16:02, 9 August 2011 (UTC)
thread_title:  Another Wiki page that is effectively worthless 

message: This term is also used in graph theory, e.g. .  — Preceding unsigned comment added by Subcelestial (talk • contribs) 22:09, 22 February 2015 (UTC)
thread_title:  Graph theory 

message: The first example uses the word "choices" in a way that looks a lot like it should be "options". The word "choice" in the context of selections is ambiguous. When you say the player "has three choices" it could mean "has three options" or "makes three selections". It's too early in the morning for me to read the whole thing, but if someone familiar with it could clarify it that would be grand. 67.168.176.62 (talk) 15:30, 27 February 2016 (UTC)
thread_title:  Clarity in example 

message: This article would be considerably improved by a section on games/situations where minimax fails to give a good strategy, e.g. the prisoner's dilemma.  As first aid I have added a See Also wikilink to Tit for Tat, the alternative strategy that is preferred in the prisoner's dilemma & many other games and interactions. --D Anthony Patriarche (talk) 05:16, 28 September 2018 (UTC)
thread_title:  When minimax fails 

message: The equation puts both a min and a max in one line. The pseudocode does one or the other in each recursion. While the pseudocode might "work" in practice, perhaps there should be a mention about how the recursion depth differs be a factor of 2 between the pure math and the pseudocode. 75.164.46.94 (talk) 00:14, 13 October 2022 (UTC)
thread_title:  Pseudocode does not corresponds to equation in terms of recursion depth 

message: An editor has identified a potential problem with the redirect :Planet Fun and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 November 14#Planet Fun until a consensus is reached, and readers of this page are welcome to contribute to the discussion.  Liz Read! Talk! 22:51, 14 November 2022 (UTC)
thread_title:  "Planet Fun" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]]