159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

28
159.302 1 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary

Transcript of 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

Page 1: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 1

Lecture 13

Last time:Games, minimax, alpha-beta

Today:Finish off games, summary

Page 2: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 2

Alpha-Beta Pruning

Can allow us to look twice as far ahead, but only if the tree is perfectly ordered.Look at the best moves first, use the evaluation function to order the tree.

Allows us to get close to perfect ordering.

Page 3: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 3

Heuristic Continuation (quiescence search)

You search for N ply in a tree, and find a very good move. But, perhaps, if you had searched just one ply further you would have discovered that this move is actually very bad.In general:

The analysis may stop just before your opponent captures one of your pieces or the analysis stops just before you capture one your opponent's pieces.

This is called the horizon effect: a good (or bad) move may be just over the horizon.

Page 4: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 4

The Singular Extension Heuristic:

Search should continue as long as one move's evaluation stands out from the rest.

If we don't use this heuristic, we risk harm from the Horizon Effect.

e.g. Here, black is aheadin material but if white canreach the eighth row with it's pawn then it can win. Black can stall this for some time and so willnever see that this is abad position.

Page 5: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 5

Forward Pruning

Human players usually prune near the top of the search tree, a good chess player will only consider a few of the possible moves.

This is called forward pruningIt needs a very good evaluation function to work well.

Page 6: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 6

Games of chance

Many games, such as backgammon, involve chance.How can wedraw a gametree for this?

Page 7: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 7

Expectiminimax

Add chancenodes to the game tree(circles)

Page 8: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 8

Expectiminimax

Now each position has no known outcome only an expected outcome. Chance nodes are evaluated by taking the weighted average of values from all possible outcomes.

emmx(C)=Σi(p(d

i).emmx(s

i))

WhereC is a chance noded

i is a dice roll

p(di) is the probability a dice roll occurring

si is the successor state associated with the dice roll.

Page 9: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 9

Complexity of Expectiminimax

Time complexity is nowO(bmnm)where

b is the branching factorn is the number of chance nodes for each max or min node m is the maximum depth.

This extra cost can make games of chance very difficult to solve.

Page 10: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 10

State of the Art in GamesChess

Deep Blue (480 custom chips to perform evaluation function) beat Garry Kasparov in 1997

Draughts (checkers)Chinook beat Marian Tinsley in 1994 after 40 years as world champion (only losing 3 games in that time)

Backgammontd-gammon in top 3 players in the world

Gob>300 so very difficult, best programs are easily beaten by good humans

BridgeGIB finished 12th out of 35 in 1998

Page 11: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 11

Introduction

What is AI?getting computers to perform tasks which require intelligence when performed by humans

Is it possible?Let's hope so!

Page 12: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 12

Introduction

How would we know if a computer was intelligent?What is the Turing test?What's wrong with the Turing test?

It's too easy?What is the Chinese room problem?It's too hard?

Types of AI TasksMundane Tasks - easy for humansFormal Tasks - hard for humansExpert Tasks

Page 13: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 13

Agents

What is AI's Underlying assumption:The Physical Symbol System Hypothesis How can a machine solve problems?

by searching for solutions.

What is an agent?What is some Agent Terminology?

What is a Percept?What is a Percept sequence? What is an Agent function?What is the Agent program?

Page 14: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 14

Agents

What is a Rational agent?How do we measure success of an agent?

What is a Performance measure?

Is a rational agent perfect?What is an autonomous agent?

Page 15: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 15

Agents

How do you design an agent?What is the task environment?

What types of environment are there?What is Fully observable, Deterministic, Episodic, Static, Discrete and Single agent?

How do you write the agent program?what is a table driven agent?

Is this practical?What is a simple reflex agent?What is a model-based reflex agent?

Page 16: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 16

Agents

What is a goal-based agent?What is a utility based agent?What is the structure of a general Learning agent?

Page 17: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 17

Search

What is Search?What is the problem space?What does search do?What is the problem space for the 8 puzzle?What is the problem space for the Vacuum Cleaner world?Why use a tree instead of a graph?How are AI search algorithms different to standard search algorithms?

What is the Branching factor (b)?What is the Solution depth (d)?

Page 18: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 18

Search

What types of search are there?What is uninformed search?What is informed search?

What types of uninformed search are there?What are the properties of search algorithms?

What is Completeness,Time Complexity,Space Complexity and Optimality

What is a node?

Page 19: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 19

Search

What is breadth first search?How is it implemented?What are its properties?

What is Uniform cost search? How is it implemented?What are its properties?

What is depth-first search?How is it implemented?What are its properties?

Page 20: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 20

Search

What is depth limited search?How is it implemented?What are its properties?

What is Iterative deepening?How is it implemented?What are its properties?

What is Bidirectional SearchHow is it implemented?What are its properties?

How to avoid repeated states?

Page 21: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 21

Informed Search

What is an evaluation function?What is a Heuristic Function?What is greedy best first search?

What problems does greedy bfs have?

What is A* Search?Why is it a good idea?

What is an admissible heuristic?Why is A* optimal?

Page 22: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 22

Search

What is the complexity of A*How can the space complexity be improved?

What is Iterative-deepening A*?What is Recursive best-first search?What is Simple Memory-bounded A*?

How can you find a good heuristic?What is dominance?Can a heuristic be found automatically?What are subproblems?

Page 23: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 23

Local Search

What is local searchWhat is the state space landscape?What is gradient descent (hill climbing)?

What problems are there with gradient descent?

What is random restart?What is simulated annealing?What is local beam search? What are genetic algorithms?

Page 24: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 24

CSPs

What is a constraint satisfaction problem (CSP)?How are constraints expressed?What are some examples of real World CSPs?What is backtracking search?How can this be improved?Which variable should be chosen next?

What is the minimum remaining values heuristic?What is the degree heuristic?

Which value should be chosen next?What is the least constraining value heuristic?

Page 25: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 25

CSPs

What is forward checking?What is constraint propagation?

Page 26: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 26

Games

What types of game are there?What is a game tree?What is a successor function?What is a terminal test?What is a utility function?

Page 27: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 27

MINIMAX

What is the Optimal Strategy for a game?What is the minimax algorithmWhat is the complexity of minimax?

Time Complexity?Space Complexity?

What is an evaluation function?What cutoff test should be used?Can Iterative deepening be used?

Page 28: 159.3021 Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.

159.302 28

Alpha-Beta Pruning?

What is Alpha-Beta pruning?How is it implemented

What is the effectiveness of alpha-beta pruning?What are the maximum savings possible?What savings does it usually give?