Please tell me how I should apply minimax algorithm to the array $$ 15, 12, 14, 16, 11, 13$$ and make a tree?(I understand how minimax algorithm works but I can't apply it to an array)
closed as unclear what you're asking by Evil, Discrete lizard♦, Apass.Jack, xskxzr, David Richerby Jan 15 at 15:12
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Minimax is actually applied on a 2D matrix like:
3 5 6 13 8 7 9 2 4 6 4 12 15 16 10
Generally, you have a choice to do, let say it corresponds to one of the columns in the exemple (5 choices). And there is an unpredictable choice (random, opponent choice ...), the row in the example (3 choices). Minimax minimizes the risks by assuming this unpredictable choice will be the worst for you.
In the example, you first compute the minimum on all colums:
3 5 2 4 6
So you finally pick the 5th choice, which guarantees at least 6.
In your problem you have 1 dimension, then minimax has no sense on it. Or you can degenerate it saying there is no unpredictable variable and just pick the maximum.