Not Puzzles ...why? Compare to CSCI 356 text.
Example of an old approach (still a puzzle)
UNIX Mastermind
Maximum of 8 colors, 5 positions
Why does this work?
What's wrong with it?
Given the initial state (e.g. Starting board position), the game rules describe how to generate alternative lines of play to a conclusion.
Example of (Part of) a game tree --
Game Trees
Games are conveniently represented as game trees
| B.F. | Ave. Length | Lines Of Play | |
| Tic-Tac-Toe | 4 | 6-7 | 104 |
| Checkers | 6 | 60 | 1040 |
| Chess | 30 | 80 | 10120 |
| Go | 200 | ||
| Backgammon | 800 |
So it is impossible to search through interesting games to the end.
Note: even Tic-Tac-Toe Becomes impossibly large with minor changes (4x4, cubic, probabilistic)
Generate and Test
(Assume that sef returns large values to indicate good situations ... want to maximize sef of board positions)
depth-first / depth limited
The term comes from the Min-Max theorem of Von Neumann (~1925)
Intuitively
Note - Minimax assumes rational play by the opponent. in complete game trees, irrational play by the opponent leads to better positions. With incomplete information this is not always true.
MiniMax
Based on the following observations
Here is some detail Try pruning on this
Notes:
No one seems to know who invented
Analysis of
Worst case: branch ordered so Alpha-beta does nothing
Need not consider all of the opponent's replies to alternatives - but DO deal with all options of moving player
Why? ... if an opponent has some responses that make a move bad no matter how the moving player continues, then the move must be bad.
In the Kasparov vs. Deep Blue match the basic techniques were A* and minimax. Consider A*.
Different levels of game (opening, etc). Also Samuels and signature tables signature tables and More on IBM and AI
Initial attempts
... However many ply ... (time allowed)
choose best
- apply plausible-move generator
- apply sef --> min is opponent's best (our worst) so probably their choice
MiniMax
Minimax as an algorithm can be iterated up a game tree from terminal nodes.

Alpha-Beta Procedure .. Prunes Game Tree
Alpha-Beta
Examples
Pruning
= Max, best known so far to us
= Min, best known so far to them


results in the same backed up value at the root as pure minimax
. The name is due to McCarthy.
Best case: Suppose tree ordered with each best move being the leftmost alternative at each node