Академический Документы
Профессиональный Документы
Культура Документы
Game Playing
Game-Playing Program
A program which behaves as an intelligence of any machine which enables it to think the best moves to increase its possibility to win the game.
Search tree
Squares represent decision states (ie- after a move) Branches are decisions (ie- the move) Start at root Nodes at end are leaf nodes Ex: Tic-Tac-Toe
Minimax procedure
Create start node as a MAX node with current board configuration Expand nodes down to some depth (a.k.a. ply) of lookahead in the game Apply the evaluation function at each of the leaf nodes Back up values for each of the non-leaf nodes until a value is computed for the root node At MIN nodes, the backed-up value is the minimum of the values associated with its children. At MAX nodes, the backed-up value is the maximum of the values associated with its children. Pick the operator associated with the child node whose backed-up value determined the value at the root
Minimax Algorithm
2 2 2 7 1 8 2 7 1 1 2 2 7 1 2 2 MAX MIN 2 7 1 1 1
5 4 4
Max
Min Max
5 6 7
Maxs turn Circles represent Max, Squares represent Min Values inside represent the value the MinMax algorithm Red arrows represent the chosen move Numbers on left represent tree depth Blue arrow is the chosen move
Note: The alpha values start at - infinity and only increases, while beta values start at + infinity and only decreases.