Menu
IDC 4O - MinMax
Artificial Intelligence
Artificial intelligence is the ability for a computer to make logical predictions and decisions. They are not terribly smart though, and can only do what we program them to. There are many ways this can be done. Since computers attempt to model real-world concepts, learning strategies can also be modelled on a computer.
For instance, we have established primary and secondary goals, and given a rationale for them. In the Min-Max algorithm, we give a numerical value to each move so that we can evaluate if it is good or bad.
For instance, we have established primary and secondary goals, and given a rationale for them. In the Min-Max algorithm, we give a numerical value to each move so that we can evaluate if it is good or bad.
Min-Max
The Min-Max algorithm evaluates a series of moves (and responses to moves) to see which move is the best.
First, it will evaluate how effective each potential move is. For example, in chess, a move that captures no piece is worth zero, a move that captures a pawn is worth 1, and a move that captures a queen might be worth 9. The value of the current move is not the only factor. That is because the opponent also gets to respond with a move which may inflict more damage. The Min-Max method will evaluate all possible responses, and will assume that the opponent is going to inflict the maximum amount of damage. If the maximum damage is greater than the minimum reward, then the move is regarded as a poor choice. So each move is evaluated according to this formula: Potential reward of a move - maximum damage of opponent = value of a move |
Actually, the formula for Min Max is much more complicated than that, because it carries on for several layers of moves by using something called recursion. It can evaluate many moves in advance. However, this gives you an idea of how computers can be made to "think".
Excercise
Find a turn-based game on the computer that is not chess.
List all possible moves (do 3 - 10 possible moves)
For each move, give it a value
For the move with the highest value, determine which response will inflict the most damage
List all possible moves (do 3 - 10 possible moves)
For each move, give it a value
For the move with the highest value, determine which response will inflict the most damage