/
Chapter 3 Heuristic Search Chapter 3 Heuristic Search

Chapter 3 Heuristic Search - PowerPoint Presentation

criticanime
criticanime . @criticanime
Follow
342 views
Uploaded On 2020-06-18

Chapter 3 Heuristic Search - PPT Presentation

Continued Before We Start HW1 extended to Monday Submit online now working and bring paper print out Questions Competency Demo next Wednesday Study Guide Posted We will have some discussion time on Monday ID: 781113

heuristic search goal nodes search heuristic nodes goal admissible greedy cost distance total time functions costs complete optimal 000

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "Chapter 3 Heuristic Search" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Chapter 3

Heuristic Search

Continued

Slide2

Before We Start

HW1 extended to Monday

Submit online (now working) and bring paper print out

Questions?

Competency Demo next Wednesday

Study Guide Posted

We will have some discussion time on Monday

Slide3

Review:Heuristic Search

Greedy search

Evaluation function h(n) (heuristic) =

estimate of cost from n to closest goal

Example: h

SLD

(n) = straight-line distance from n to Bucharest

Greedy search expands the node that appears to be closest to goal

Slide4

Review:Greedy

Search

Romania with step costs in km

Slide5

Review:Heuristic Search

Properties of greedy search

Complete?? No – can get stuck in loops, e.g.,

Complete in finite space with repeated-state checking

Time?? O(b

m

), but a good heuristic can give dramatic improvement

Space?? O(b

m

) – keeps all nodes in memory

Optimal?? No

Slide6

Greedy Search from Worksheet

Slide7

Heuristic Search

A* search

Premise - Avoid expanding paths that are already expansive

Evaluation function f(n) = g(n) + h(n)

g(n) = cost so far to reach n

h(n) = estimated cost to goal from n

f(n) = estimated total cost of path through n to goal

Slide8

Heuristic Search

Romania with step costs in km

Slide9

Heuristic Search

A* search example

Slide10

Heuristic Search

A* search example

Slide11

Heuristic Search

A* search example

Slide12

Heuristic Search

A* search example

Slide13

Heuristic Search

A* search example

Slide14

Heuristic Search

Properties of A*

Complete?? Yes, unless there are infinitely many nodes with f

f(G)

Time?? Exponential in

[relative error in h x length of solution.]

Space?? Keeps all nodes in memory

Optimal?? Yes – assuming that the heuristic is admissible.

Slide15

A* Search from Worksheet

Slide16

Heuristic Search

A* search

A* search uses an

admissible

heuristic

i.e., h(n)

 h*(n) where h*(n) is the true cost from n.

(also require h(n) 0, so h(G) = 0 for any goal G.)

example,

h

SLD

(n) never overestimates the actual road distance.

Slide17

Heuristic Search

A* algorithm

Optimality of A* (standard proof)

Suppose some suboptimal goal G

2

has been generated and is in the queue.

Let n be an unexpanded node on a shortest path to an optimal goal G

1

.

Slide18

Heuristic Search

A* algorithm

f(G

2

) = g(G

2

) since h(G

2

) = 0

> g(G

1

) since G

2

is suboptimal

 f(n) since h is admissible

since

f(G

2

) > f(n), A* will never select G

2

for expansion

Slide19

Heuristic Functions

Admissible heuristic

example: for the 8-puzzle

h

1

(n) = number of misplaced tiles

h

2

(n) = total Manhattan distance

i.e. no of squares from desired location of

each tile

h

1

(S) = ??

h

2

(S) = ??

Slide20

Heuristic Functions

Admissible heuristic

example: for the 8-puzzle

h

1

(n) = number of misplaced tiles

h

2

(n) = total Manhattan distance

i.e. no of squares from desired location of

each tile

h

1

(S) = ?? 6

h

2

(S) = ?? 4+0+3+3+1+0+2+1

= 14

Slide21

Heuristic Functions

Dominance

if

h

2

(n)

h

1

(n) for all n (both admissible)

then h

2

dominates h

1

and is better for search

Typical search costs:

d = 14 IDS = 3,473,941 nodes

A*(h

1

) = 539 nodes

A*(h

2

) = 113 nodes

d = 24 IDS

54,000,000,000 nodes

A*(h

1

) = 39,135 nodes

A*(h

2

) = 1,641 nodes