30
Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Embed Size (px)

Citation preview

Page 1: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Artificial Intelligence Presentation

Chapter 4 – Informed Search and

Exploration

Page 2: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Overview

• Defining a problem

• Types of solutions

• The different algorithms to achieve

these solutions

• Conclusion

• Questions and Answers Session

Page 3: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Defining a problem

A problem is well defined for an agent to solve if:

• There exists a state space, this is a set of all possible states an agent can be in.

• Within the state space there exists an initial state and a goal state.

• There exists a set of actions which an agent can take to progress from one state to

another

• There exists at least one path from the initial state to the goal state, that is to say,

there exists a sequence of actions by which the agent, parting from the initial state,

can assume a number of states that lead to the goal state. (Implicit from points 1 to 3)

• There exists a goal test, this is, a means which allows the agent to know it has

achieved, or not, the goal state

• There exists a cost associated to each path, this is, a numeric value which allows the

agent to compare the optimality between two, or more, paths to the goal state.

• There exists a cost associated with each action, from these in a sequence of actions,

one derives the path cost (For problems with more than one solution)

Page 4: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Types of solutions

There are two types of solutions:

• A solution in which, alongside the goal, the path is also a

constituent of the solution.

Ex: What is the shortest path between reuter A and

reuter B in network X?

• A solution which is only the goal, that is to say, the path

which leads to the solution is irrelevant.

Ex: What is the minimum number of moves needed to

win a chess match?

Page 5: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Types of solutions

Solutions of the first kind, the ideal algorithms are path finding

algorithms, these are algorithms which explore the state-space

systematically, keeping points along the path in memory.

Solutions of the second kind, are typically solutions to

optimization problems and have solution searching algorithms

based simply on the current state. They occupy less memory

and can, given enough time, find solutions which would not be

possible in path finding algorithms, due to memory constraints.

Page 6: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Path Finding algorithms

There are 2 types of path finding algorithms:

• Uniformed search algorithms

These search strategies just generate successors

and analyze whether or not the new state is the goal

state.

• Informed search algorithms

These search strategies have a former knowledge

of which non-goal states are more promising.

Page 7: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Greedy Best-First Search

This algorithm has the following basic process:

• Each node has an f(n) = h(n).

• Select the node with the lowest f(n)

• If f(n) > 0 then expand the node repeat the

process

• Else if f(n) = h(n) == 0, then it is the goal-node

Page 8: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Greedy Best-First Search

Page 9: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

A* Search

A* search is similar the the best-first

algorithms however f(n) is not h(n) but

g(n) + h(n), where:

• g(n) is the cost to get to n

• h(n) is the cost from n to the the goal

Page 10: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

A* Search

Page 11: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

A* Search

A* search is optimal if h(n) is an

admissible heuristic, that is to say, it

never overestimates the cost of the

solution.

Page 12: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

A* Search

Disadvantages of A* Search

• Exponential growth in the number of nodes (memory

can fill up quick

• A* must search all the nodes within the goal contour

• Due to memory or time limitations, suboptimal goals

may be the only solution

• Sometimes a better heuristic may not be admissable

Page 13: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Memory bounded heuristic search

In order to reduce the memory footprint of

the previous algorithms, some algorithms

attempt to take further advantages of

Heuristics to improve performance:

• Iterative-Deepening A* (IDA*) Search

• Recursive Best-First Search (RBFS)

• SMA*

Page 14: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Memory bounded heuristic search

To deal with the issue of exponential

memory growth in A*, Iterative

deepening A * (IDA*) was created. This

practically the same as the normal

iterative deepening algorithm, except

that it

Page 15: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

IDA* Search

The IDA* is basically the iterative

deepening first depth search, but with

the cutoff at f = g+h

Page 16: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

SMA* Search

It follows like A* search, however when

memory reaches it’s limit, the

algorithm drops the worst node.

Page 17: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Recursive Best-First Search (RBFS)

The Recursive best-first search works by:

• Keeping track of options along the fringe

• If the current depth-first exploration

becomes more expensive of best fringe

option, back up to fringe and but update

node costs along the way

Page 18: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Recursive Best-First Search (RBFS)

Page 19: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Effective Branching Factor, b*

The branching factor is such that if a uniform tree of

depth d contains N+1 nodes, then:

N+1 = 1 + b* + (b*)2 + … + (b*)d

The closer b* is to 1, the better the heuristic.

Page 20: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

How to come up with new Admissible Heuristics

Simplify problem by reducing restrictions on actions.This is called a relaxed problemThe cost of optimal solution to relaxed problem is an admissible heuristic for original problem, because it is always less expensive than the solution to the original problem

Page 21: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Pattern Databases

Pattern databases made by storing patterns which have actions that are statistically favorable.

Ex:Chess plays in certain states of the board

Page 22: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Local Search algorithms

They only keep track of the current solution (state)Utilize methods to generate alternate solution candidatesThey use a small amount of memoryCan find acceptable solutions in infinite search spaces

Page 23: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Hill Climbing

Page 24: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Simulated Annealing

• Select some initial guess of evaluation function parameters: x0

• Evaluate evaluation function, E(x0)=v

• Compute a random displacement, x’0– The Monte Carlo event

• Evaluate E(x’0) = v’

– If v’ < v; set new state, x1 = x’0– Else set x1 = x’0 with Prob(E,T)

• This is the Metropolis step

• Repeat with updated state and temp

Page 25: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Genetic Algorithms

• Reproduction

• Reuse

• Crossover

• Mutation

Page 26: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Genetic Algorithms

Page 27: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Online Searches

• States and Actions are unknown

apriori

• States are difficult to change

• States can be or impossible difficult

to reverse

Page 28: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Learning in Online Search

• Explore the world

• Build a map

• Mapping of (state, action) to results also called a model relating (state, action) to results

Page 29: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Conclusion

Page 30: Artificial Intelligence Presentation Chapter 4 – Informed Search and Exploration

Questions and Answers