0

The question is as the title suggest.

I know that minimax algorithm does this for 2-people game (assume we want to maximize A's profit): when it is A’s turn, we take the max of the child values because we are maximizing A's profit, and when it is B’s turn, we take the min of the child values because we want to minimize B's profit.

However, I don't think the above logic proves that every sub-problem, the strategy is the most optimal in minimax algorithm. Any hints or solutions to the question I proposed? If the above logic does, then could you elaborate on it?

LarsChung
  • 703
  • 5
  • 10
  • 24

2 Answers2

2

The claim minimax has is: Minimax is giving optimal strategy if the other player is also using the same strategy.

Base: For a leaf in the game tree - there is only one strategy, which minimax obviously chooses, and it is optimal - since it is the only one.
Hypothesis: minimax chooses optimal strategy for a game of depth d.
Proof:

Let us look on a game of depth d+1. There are obviously 2 possible scenarios:

  1. It is out turn - this is max phase. In this case, out of all possible moves we can do - minimax recursively evaluates the min-max value for each such strategy, and gives us the optimal result for a 'sub-game', where we have chosen this move. Each of these subgames is of depth d, and from induction hypothesis, it is optimal.
    Since this is max phase - the min-max algorithm chooses the max, which is the optimal solution for us.
  2. It is opponent's turn - this is min phase. Similarly to the above logic, minimax splits the case to all possible moves the opponent can do, and evaluates their outcome. From Induction-Hypothesis, evaluations are optimal, and we choose the minimal from them - which will be what the opponent would have chosen, and is optimal strategy for him (and assume the opponent chooses optimally for every step of the way) - thus the opponent chooses the minimal evaluation, which minimize our profit, and thus maximize his profit.

QED

Based on it, you can conclude another claim of minimax - the value returned by the strategy is not less than what you will actually get (regardless of the oppnent's strategy). This can be proven by induction very similarly to the above one.

Guidelines:

Base: One strategy only, and you are returning it, when the 'tree' is actually a leaf.
Claim: value returned by minimax for game of depth d is a lower bound to all games played from this level, where you chose according to minimax, and no restriction on the opponent.
Proof:

Let's look at game of depth d+1.

  1. If it is your turn, you chose the max out of all leaves, since you have the choice here. Each of the leaf guarantees you (induciton hypothesis) at least some value, and by choosing the max of them - you also guarantee the chosen value.
  2. If it is the opponent's turn - you have no control on the choice. You can only be sure that he will chose some move, no idea which. However, for all possible move - you get a new 'subgame' of depth d, where the induction hypothesis hold. The opponent can choose any one of these moves, so you can guarantee that after this move, you will have a value of at least min{game after opponent move}, which is exactly what the min phase return.

QED.

amit
  • 175,853
  • 27
  • 231
  • 333
  • The assumption you're making there is a big one. If the other player isn't *also* using minimax, you are not guaranteed an optimal strategy. – Sneftel Apr 13 '14 at 10:07
  • @Sneftel Minimax is optimal in case the other player also uses minimax stratgey, this was the claim I was trying to prove, let me clarify it in the answer. – amit Apr 13 '14 at 10:12
  • So minimax only gives optimal strategy at any given sub-problems if opponent is using minimax as well. So in other words, if we don't know opponent's algorithm, then we can't necessarily say minimax will give optimal strategy at any given sub-problems. – LarsChung Apr 13 '14 at 10:41
1

You can't prove that minimax maximizes the player's profit, because minimax does not attempt to maximize the player's profit.

What minimax does is to minimize the player's possible loss; that is, its decisions are conservative, and assume the worst case scenario (optimal play by the other player). Try proving that one; you'll find it much more straightforward.

Sneftel
  • 40,271
  • 12
  • 71
  • 104
  • Excellent point about minimax here is that minimax actually tries to prevent taking bad decisions than taking good decisions hence it will be never be proved optimal but will provide "not bad" solutions which if you get enough depth will be closer to optimal. – Vikram Bhat Apr 13 '14 at 10:41
  • So what algorithm would you use to maximize the result in a 1v1 game in a zero-sum game when you don't know the opponent's algorithm? – LarsChung Apr 13 '14 at 10:45
  • 1
    There is none. Consider a two move game, where player 1 picks "Draw" or "No Draw". If he picks "Draw", the score is 0. if he picks "No Draw", player 2 picks "1 Wins" (score 1) or "2 Wins" (score -1). Obviously minimax will pick "Draw" for player 1. But if player 2's strategy was not optimal play, "No Draw" might be a better strategy for player 1. In other words, you can't generally guarantee optimality without making assumptions about the other player's strategy. – Sneftel Apr 13 '14 at 10:48
  • @LarsChung You cannot because if the game is truely a game then there is no way you can get optimum solution without considering opponents move and if there are lot to possibility for opponents move then it will take lot of time to get all game states possible and select optimum strategy. You can only increase the chances of making a good move by increasing depth of mini-max – Vikram Bhat Apr 13 '14 at 10:51