Adversary Search Fundamentals
PSU CS410/510GAMES
Lecture 5
July 6, 2000
- Review: Adversary Search
- For two-player, zero sum, finite, alternating games.
- Idea: Always make the ``best'' possible move against
a perfect opponent.
- Best move is one that ensures best minimum
score against opponent: opponent is perfect also.
- My best minimum score = opponent's worst maximum
score = ``minimax''.
- Minimax Search
- Terminology: player is ``maximizer'', opponent is
``minimizer''.
- Completed game has a definite score. (Intervals [-1.0 ... 1.0] or
[-1000 ... 1000] are popular.)
- Maximizer wants to make outcome of the game
as positive as possible, minimizer as negative as
possible.
- Symmetry: can negate scores and switch minimizer w. maximizer.
- Minimax principle: when maximizer is ``on move''
- Simulate minimizer to calculate minimum best-play score for
each state resulting from a legal move.
(Game-terminating moves are recorded directly: c.f. below.)
- Select move with largest (i.e. least negative) value
to minimizer of resulting state.
- Inductive proof of correctness:
- If all moves are terminating, minimax will
certainly select a best move.
- Otherwise, assume minimax selects best move for
opponent from each non-final state. Then
minimax will select a best move in current state.
- Sensible implementation is recursive. Several
choices in parameterization:
- Given
state and set of legal moves, return best move
and value of the state, vs.
- Given state and player on move, return value of state.
also
- Mutual recursion between minimizer and maximizer
code, vs.
- Use exchange symmetry
above to consider maximizer case only.
- Search space is too large for real games. Limit by
- Depth:
- Instead of recursive call, try using
heuristics to
estimate quality of state (not
best move).
- Prove upper or lower bound on value of
game below state.
- Breadth:
- Use heuristics to take moves from best to worst for
player on move.
Use more heuristics to avoid recursive calls
for ``bad'' moves.
- Prove that some move is strictly worse
than a move already considered.
- Opponent Modeling (expectimax): If your opponent
would not consider this move and its consequences,
you need not either.
- Evaluation Function
- Heuristic for estimating minimax value of a state.
- Typically just a number, but may also estimate
confidence of estimate, or be some fancy
(total-orderable) datum.
- ``Real'' backed-up values vs. heuristic values: risk aversion.
- No perfect formula. Sanity checks:
- Does a maximizer winning state get a maximum
positive score? Does a minimizer winning state
get a minimum negative score? A draw 0?
- Does the value assigned in real games have some
relationship to human estimates?
- Are there obvious game features missing?
- In games with material as a state
feature, is it domininant in the game? In
the evaluator?
- Cost of evaluation vs. cost of extra search.
- Examples:
- Aces Up
- Tic-Tac-Toe
- Chess