Minimax is often illustrated with a tree,but I know that it can be implemented without the tree !However,I can not figure out how to do it without the tree!Can you clarify it for me?
-
1Related: http://stackoverflow.com/a/11704019/951890 – Vaughn Cato Jan 10 '16 at 14:58
-
I don't know the definition of minimax exactly but I think that it depends on the problem whether you can simplify it. I also think that it often uses recursive calls instead of building the tree explicitly. – JojOatXGME Jan 10 '16 at 15:02
-
minimax is designed for exploring state space, which **always** can be represented as a directed graph, thus can be also considered as a tree (simply forgetting about collision detection), thus **minimax always works on the tree**, even if you do not explicitly implement it – lejlot Jan 11 '16 at 23:25
2 Answers
Minimax by definition always works like a tree, no matter how you implement it. How you visualise it is another story.
Usually, Minimax is implemented recursively (which can be best visualised using a tree) or iteratively, which still goes through the nodes of a minimax tree, just with another approach.

- 1,273
- 1
- 11
- 25
As pointed out in the first comment, minimax is formally defined on a tree structure but for many practical applications it's not necessary to formally compute over the entire tree, and even the game tree structure does not need to be known beforehand- if the possible next moves and termination (game over) states are known, the tree can be built as the algorithm runs. For non-reversible games (like tic tac toe) duplicate states at different points of the tree have the same partial subtrees; hence the only structure that needs to be learned is the value of each state, calculated by minimax; these values can be cached as well for reuse during the algorithm.
By the way, one interesting and popular application of this 'non-explicit tree structure' use of minimax is Generative Adversarial Networks:
From the abstract
..a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G. The training procedure for G is to maximize the probability of D making a mistake. This framework corresponds to a minimax two-player game.

- 31
- 4