Talk:Minimax/Archive 2

Another Wiki page that is effectively worthless
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)

error in pseudocode
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)

pseudocode suggestion
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)


 * 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)


 * 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)


 * I also agree and have made the change back to minimax code. GamePlayerAI (talk) 15:19, 3 October 2013 (UTC)

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

Clarity in example
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)

When minimax fails
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)