Required reading: AIMA, Chapter 3 (Setions 3.5, 3.6) - - PowerPoint PPT Presentation

required reading aima chapter 3 se tions 3 5 3 6 choueiry
SMART_READER_LITE
LIVE PREVIEW

Required reading: AIMA, Chapter 3 (Setions 3.5, 3.6) - - PowerPoint PPT Presentation

Title: Informed Sear h Metho ds B.Y. Required reading: AIMA, Chapter 3 (Setions 3.5, 3.6) Choueiry L WH: Chapters 6, 10, 13 and 14. In tro dution to Artiial In telligene CSCE 476-876, Spring 2016


slide-1
SLIDE 1

✬ ✫ ✩ ✪

Title: Informed Sear h Metho ds Required reading: AIMA, Chapter 3 (Se tions 3.5, 3.6) L WH: Chapters 6, 10, 13 and 14. In tro du tion to Arti ial In telligen e CSCE 476-876, Spring 2016 URL:
  • www. se.unl.edu/
ho uei ry/ S1 6-4 76- 87 6 Berthe Y. Choueiry (Sh u-w e-ri) (402)472-5444 B.Y. Choueiry 1 Instru tor's notes #7 F ebruary 5, 2016
slide-2
SLIDE 2

✬ ✫ ✩ ✪

Outline
  • Categorization
  • f
sear h te hniques
  • Ordered
sear h (sear h with an ev aluation fun tion)
  • Best-rst
sear h: (1) Greedy sear h (2) A∗
  • A
dmissible heuristi fun tions: ho w to
  • mpare
them? ho w to generate them? ho w to
  • m
bine them? B.Y. Choueiry 2 Instru tor's notes #7 F ebruary 5, 2016
slide-3
SLIDE 3

✬ ✫ ✩ ✪

T yp es
  • f
Sear h (I) 1- Uninformed vs. informed 2- Systemati / onstru tiv e vs. iterativ e impro v emen t Uninformed : use
  • nly
information a v ailable in problem denition, no idea ab
  • ut
distan e to goal

an b e in redibly inee tiv e in pra ti e Heuristi : exploits some kno wledge
  • f
the domain also useful for solving
  • ptimization
problems B.Y. Choueiry 3 Instru tor's notes #7 F ebruary 5, 2016
slide-4
SLIDE 4

✬ ✫ ✩ ✪

T yp es
  • f
Sear h (I I) Systemati , exhaustiv e,
  • nstru tiv
e sear h: a partial solution is in remen tally extended in to global solution P artial solution = sequen e
  • f
transitions b et w een states Global solution = Solution from the initial state to the goal state Examples:

8 < :

Uninformed Informed (heuristi ): Greedy sear h, A∗

Returns the path; solution = path B.Y. Choueiry 4 Instru tor's notes #7 F ebruary 5, 2016
slide-5
SLIDE 5

✬ ✫ ✩ ✪

T yp es
  • f
Sear h (I I I) Iterativ e impro v emen t: A state is gradually mo died and ev aluated un til rea hing an (a eptable)
  • ptim
um

W e don't are ab
  • ut
the path, w e are ab
  • ut
`qualit y'
  • f
state

Returns a state; a solution = go
  • d
qualit y state

Ne essarily an informed sear h Examples (informed):

8 > > < > > :

Hill lim bing Sim ulated Annealing (ph ysi s), T ab
  • sear
h Geneti algorithms (biology) B.Y. Choueiry 5 Instru tor's notes #7 F ebruary 5, 2016
slide-6
SLIDE 6

✬ ✫ ✩ ✪

Ordered sear h
  • Strategies
for systemati sear h are generated b y ho
  • sing
whi h no de from the fringe to expand rst
  • The
no de to expand is hosen b y an ev aluation fun tion , expressing `desirabilit y' −

  • rdered
sear h
  • When
no des in queue are sorted a ording to their de reasing v alues b y the ev aluation fun tion −

b est-rst sear h
  • W
arning: `b est' is a tually `seemingly-b est' giv en the ev aluation fun tion. Not alw a ys b est (otherwise, w e
  • uld
mar h dire tly to the goal!) B.Y. Choueiry 6 Instru tor's notes #7 F ebruary 5, 2016
slide-7
SLIDE 7

✬ ✫ ✩ ✪

Sear h using an ev aluation fun tion
  • Example:
uniform- ost sear h! What is the ev aluation fun tion? Ev aluates
  • st
from ............. to ................?
  • Ho
w ab
  • ut
the
  • st
to the goal?

h(n)

= estimated
  • st
  • f
the heap est path from the state at no de n to a goal state

h(n)

w
  • uld
help fo using sear h B.Y. Choueiry 7 Instru tor's notes #7 F ebruary 5, 2016
slide-8
SLIDE 8

✬ ✫ ✩ ✪

Cost to the goal This information is not part
  • f
the problem des ription

Urziceni Neamt Oradea Zerind Timisoara Mehadia Sibiu Pitesti Rimnicu Vilcea Vaslui Bucharest Giurgiu Hirsova Eforie Arad Lugoj Dobreta Craiova Fagaras Iasi 160 242 161 77 151 366 244 226 176 241 253 329 80 199 380 234 374 100 193

B.Y. Choueiry 8 Instru tor's notes #7 F ebruary 5, 2016
slide-9
SLIDE 9

✬ ✫ ✩ ✪

Best-rst sear h 1. Greedy sear h ho
  • ses
the no de n losest to the goal su h as h(n) is minimal 2. A∗ sear h ho
  • ses
the least- ost solution solution
  • st f(n)

8 > > < > > : g(n):

  • st
from ro
  • t
to a giv en no de n +

h(n):

  • st
from the no de n to the goal no de su h as f(n) = g(n) + h(n) is minimal B.Y. Choueiry 9 Instru tor's notes #7 F ebruary 5, 2016
slide-10
SLIDE 10

✬ ✫ ✩ ✪

Greedy sear h

First expand the no de whose state is ` losest' to the goal!

Minimize h(n)

function BEST-FIRST-SEARCH( problem, EVAL-FN) returns a solution sequence inputs: problem, a problem Eval-Fn, an evaluation function Queueing-Fn

a function that orders nodes by EVAL-FN

return GENERAL-SEARCH(problem, Queueing-Fn)

Usually ,
  • st
  • f
rea hing a goal ma y b e estimated , not determined exa tly

If state at n is goal, h(n)= ?

Ho w to ho
  • se h(n)?
Problem sp e i ! Heuristi ! B.Y. Choueiry 10 Instru tor's notes #7 F ebruary 5, 2016
slide-11
SLIDE 11

✬ ✫ ✩ ✪

Greedy sear h: Romania

hSLD(n)

= straigh t-line distan e b et w een n and goal lo ation

Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Vaslui Iasi Rimnicu Vilcea Bucharest 71 75 118 111 70 75 120 151 140 99 80 97 101 211 138 146 85 90 98 142 92 87 86

Urziceni Neamt Oradea Zerind Timisoara Mehadia Sibiu Pitesti Rimnicu Vilcea Vaslui Bucharest Giurgiu Hirsova Eforie Arad Lugoj Dobreta Craiova Fagaras Iasi 160 242 161 77 151 366 244 226 176 241 253 329 80 199 380 234 374 100 193

B.Y. Choueiry 11 Instru tor's notes #7 F ebruary 5, 2016
slide-12
SLIDE 12

✬ ✫ ✩ ✪

Greedy sear h: T rip from Arad to Bu harest

Rimnicu Vilcea

Zerind Arad Sibiu Arad Fagaras Oradea Timisoara Sibiu Bucharest 329 374 366 380 193 253

Rimnicu Vilcea

Arad Sibiu Arad Fagaras Oradea Timisoara 329 Zerind 374 366 176 380 193 Zerind Arad Sibiu Timisoara 253 329 374 Arad 366

(a) The initial state (b) After expanding Arad (c) After expanding Sibiu (d) After expanding Fagaras

... Greedy sear h! qui k, but not
  • ptimal!
B.Y. Choueiry 12 Instru tor's notes #7 F ebruary 5, 2016
slide-13
SLIDE 13

✬ ✫ ✩ ✪

Greedy sear h: Problems F rom Iasi to F agaras?

8 < :

F alse starts: Neam t is a dead-end Lo
  • ping

Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Vaslui Iasi Rimnicu Vilcea Bucharest 71 75 118 111 70 75 120 151 140 99 80 97 101 211 138 146 85 90 98 142 92 87 86

Urziceni Neamt Oradea Zerind Timisoara Mehadia Sibiu Pitesti Rimnicu Vilcea Vaslui Bucharest Giurgiu Hirsova Eforie Arad Lugoj Dobreta Craiova Fagaras Iasi 160 242 161 77 151 366 244 226 176 241 253 329 80 199 380 234 374 100 193

B.Y. Choueiry 13 Instru tor's notes #7 F ebruary 5, 2016
slide-14
SLIDE 14

✬ ✫ ✩ ✪

Greedy sear h: Prop erties

Lik e depth-rst, tends to follo w a single path to the goal

Lik e depth-rst

8 < :

Not
  • mplete
Not
  • ptimal

Time
  • mplexit
y: O(bm), m maxim um depth

Spa e
  • mplexit
y: O(bm) retains all no des in memory

Go
  • d h
fun tion ( onsiderably) redu es spa e and time but h fun tions are problem dep enden t :( B.Y. Choueiry 14 Instru tor's notes #7 F ebruary 5, 2016
slide-15
SLIDE 15

✬ ✫ ✩ ✪

Hmm... Greedy sear h minimizes estimated
  • st
to goal h(n)

uts sear h
  • st
  • nsiderably

but not
  • ptimal,
not
  • mplete
Uniform- ost sear h minimizes
  • st
  • f
the path so far g(n)

is
  • ptimal
and
  • mplete

but an b e w asteful
  • f
resour es New-Best-First sear h minimizes f(n) = g(n) + h(n)

  • m
bines greedy and uniform- ost sear hes

f(n)

= estimated
  • st
  • f
heap est solution via n

Pro v ably:
  • mplete
and
  • ptimal,
if h(n) is admissible B.Y. Choueiry 15 Instru tor's notes #7 F ebruary 5, 2016
slide-16
SLIDE 16

✬ ✫ ✩ ✪

A∗ Sear h
  • A∗
sear h Best-rst sear h expanding the no de in the fringe with minimal

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

  • A∗
sear h with admissible h(n) Pro v ably
  • mplete,
  • ptimal,
and
  • ptimally
e ien t using Tree-Sear h
  • A∗
sear h with
  • nsisten
t h(n) Remains
  • ptimal
ev en using Graph-Sear h (See Tree-Sear h v ersus Graph-Sear h page 77) B.Y. Choueiry 16 Instru tor's notes #7 F ebruary 5, 2016
slide-17
SLIDE 17

✬ ✫ ✩ ✪

A dmissible heuristi An admissible heuristi is a heuristi that nev er
  • v
erestimates the
  • st
to rea h the goal

is
  • ptimisti

thinks the
  • st
  • f
solving is less than it a tually is Example:

8 > > < > > :

tra v el: straigh t line distan e I need 3 y ears to nish
  • llege
(at least!) W e are 3 y ears a w a y from the rst igh t to Mars (at least!) If h is admissible ,

f(n)

nev er
  • v
erestimates the a tual
  • st
  • f
the b est solution through n . B.Y. Choueiry 17 Instru tor's notes #7 F ebruary 5, 2016
slide-18
SLIDE 18

✬ ✫ ✩ ✪

A∗ Sear h F rom Arad to Bu harest

(a) The initial state (b) After expanding Arad (c) After expanding Sibiu

Arad Sibiu Timisoara 447=118+329 Zerind 449=75+374 393=140+253 Arad 366=0+366

(d) After expanding Rimnicu Vilcea (e) After expanding Fagaras (f) After expanding Pitesti

Zerind Arad Sibiu Arad Timisoara

Rimnicu Vilcea

Fagaras Oradea 447=118+329 449=75+374 646=280+366 413=220+193 415=239+176 671=291+380 Zerind Arad Sibiu Timisoara 447=118+329 449=75+374

Rimnicu Vilcea

Craiova Pitesti Sibiu 526=366+160 553=300+253 417=317+100 Zerind Arad Sibiu Arad Timisoara Sibiu Bucharest Fagaras Oradea Craiova Pitesti Sibiu 447=118+329 449=75+374 646=280+366 591=338+253 450=450+0 526=366+160 553=300+253 417=317+100 671=291+380 Zerind Arad Sibiu Arad Timisoara Sibiu Bucharest Oradea Craiova Pitesti Sibiu Bucharest Craiova

Rimnicu Vilcea

418=418+0 447=118+329 449=75+374 646=280+366 591=338+253 450=450+0 526=366+160 553=300+253 615=455+160 607=414+193 671=291+380

Rimnicu Vilcea

Fagaras

Rimnicu Vilcea

Arad Fagaras Oradea 646=280+366 415=239+176 671=291+380

B.Y. Choueiry 18 Instru tor's notes #7 F ebruary 5, 2016
slide-19
SLIDE 19

✬ ✫ ✩ ✪

A∗ Sear h is
  • ptimal

G

, G2 goal states ⇒ g(G) = f(G), f(G2) = g(G2)

h(G) = h(G2) = 0

G

  • ptimal
goal state ⇒ C∗ = f(G)

G2

sub
  • ptimal ⇒ f(G2) > C∗ = f(G)
(1) Supp
  • se n
is not hosen for expansion

G n G2 Start

h

admissible ⇒ C∗ ≥ f(n) (2) Sin e n w as not hosen for expansion ⇒ f(n) ≥ f(G2) (3) (2) + (3) ⇒ C∗ ≥ f(G2) (4) (1) and (4) are
  • n
tradi tory ⇒ n should b e hosen for expansion B.Y. Choueiry 19 Instru tor's notes #7 F ebruary 5, 2016
slide-20
SLIDE 20

✬ ✫ ✩ ✪

Whi h no des do es A∗ expand? Go al-Test is applied to St a te(no de) when a no de is hosen from the fringe for expansion, not when the no de is generated Theorem 3 & 4 in P earl 84,
  • riginal
results b y Nilsson
  • Ne
essary
  • ndition:
An y no de expanded b y A∗ annot ha v e an

f

v alue ex eeding C∗ : F
  • r
all no des expanded, f(n) ≤ C∗
  • Su ient
  • ndition:
Ev ery no de in the fringe for f(n) < C∗ will ev en tually b e expanded b y A∗ In summary
  • A∗
expands all no des with f(n) < C∗
  • A∗
expands some no des with f(n) = C∗
  • A∗
expands no no des with f(n) > C∗ B.Y. Choueiry 20 Instru tor's notes #7 F ebruary 5, 2016
slide-21
SLIDE 21

✬ ✫ ✩ ✪

Expanding
  • n
tours A∗ expands no des from fringe in in reasing f v alue W e an
  • n eptually
dra w
  • n
tours in the sear h spa e

O Z A T L M D C R F P G B U H E V I N

380 400 420

S

The rst solution found is ne essarily the
  • ptimal
solution Careful: a Test-Go al is applied at no de expansion B.Y. Choueiry 21 Instru tor's notes #7 F ebruary 5, 2016
slide-22
SLIDE 22

✬ ✫ ✩ ✪

A∗ Sear h is
  • mplete
Sin e A∗ sear h expands all no des with f(n) < C∗ , it m ust ev en tually rea h the goal state unless there are innitely man y no des f(n) < C∗

8 > > < > > :

  • 1. ∃
a no de with innite bran hing fa tor
  • r
  • 2. ∃
a path with innite n um b er
  • f
no des along it A∗ is
  • mplete
if

8 > > < > > :

  • n
lo ally nite graphs and

∃δ > 0

  • nstan
t, the
  • st
  • f
ea h
  • p
erator > δ B.Y. Choueiry 22 Instru tor's notes #7 F ebruary 5, 2016
slide-23
SLIDE 23

✬ ✫ ✩ ✪

A∗ Sear h Complexit y Time: Exp
  • nen
tial in (relativ e error in h × length
  • f
solution path) ... quite bad Spa e: m ust k eep all no des in memory Num b er
  • f
no des within goal
  • n
tour is exp
  • nen
tial in length
  • f
solution.... unless the error in the heuristi fun tion

|h(n) − h∗(n)|

gro ws no faster than the log
  • f
the a tual path
  • st: |h(n) − h∗(n)| ≤ O(log h∗(n))
In pra ti e, the error is prop
  • rtional...
impra ti al.. ma jor dra wba k
  • f
A∗ : runs
  • ut
  • f
spa e qui kly

Memory Bounded Sear h ID A∗ (not addressed here) B.Y. Choueiry 23 Instru tor's notes #7 F ebruary 5, 2016
slide-24
SLIDE 24

✬ ✫ ✩ ✪

A∗ Sear h is
  • ptimally
e ien t .. for an y giv en ev aluation fun tion: no
  • ther
algorithms that nds the
  • ptimal
solution is guaran teed to exp end few er no des than A∗ In terpretation (pro
  • f
not presen ted): An y algorithm that do es not expand all no des b et w een ro
  • t
and the goal
  • n
tour risks missing the
  • ptimal
solution B.Y. Choueiry 24 Instru tor's notes #7 F ebruary 5, 2016
slide-25
SLIDE 25

✬ ✫ ✩ ✪

T ree-Sear h vs. Graph-Sear h After ho
  • sing
a no de from the fringe and b efore expanding it, Graph-Sear h he ks whether St a te(no de) w as visited b efore to a v
  • id
lo
  • ps.

Graph-sear h ma y lose
  • ptimal
solution Solutions 1. In Graph-Sear h, dis ard the more exp ensiv e path to a no de 2. Ensure that the
  • ptimal
path to an y rep eated state is the rst
  • ne
found

Consisten y B.Y. Choueiry 25 Instru tor's notes #7 F ebruary 5, 2016
slide-26
SLIDE 26

✬ ✫ ✩ ✪

Consisten y

h(n)

is
  • nsisten
t If ∀ n and ∀ n′ su essor
  • f n
along a path, w e ha v e

h(n) ≤ k(n, n′) + h(n′), k

  • st
  • f
heap est path from n to n′ Monotoni it y

h(n)

is monotone If ∀ n and ∀ n′ su essor
  • f n
generated b y a tion a, w e ha v e

h(n) ≤ c(n, a, n′) + h(n′), n′

is an immediate su essor
  • f n
T riangle inequalit y (n, n′, goal) Imp
  • rtan
t: h is
  • nsisten
t ⇔ h is monotone Bew are:
  • f
  • nfusing
terminology ` onsisten t' and `monotone' V alues
  • f h
not ne essarily de reasing/nonin reasing B.Y. Choueiry 26 Instru tor's notes #7 F ebruary 5, 2016
slide-27
SLIDE 27

✬ ✫ ✩ ✪

Prop erties
  • f h :
Imp
  • rtan
t results
  • h
  • nsisten
t ⇔ h monotone (P earl 84)
  • h
  • nsisten
t ⇒ h admissible (AIMA, Exer ise 4.7)
  • nsisten y
is stri ter than admissibilit y
  • h
  • nsisten
t ⇒ f is nonde reasing

f(n′) = g(n′)+h(n′) = g(n)+c(n, a, n′)+h(n′) ≥ g(n)+h(n) = f(n)

  • h
  • nsisten
t ⇒ A∗ using Graph-Sear h is
  • ptimally
e ien t B.Y. Choueiry 27 Instru tor's notes #7 F ebruary 5, 2016
slide-28
SLIDE 28

✬ ✫ ✩ ✪

P athmax equation Y
  • u
may ignor e this slide Monotoni it y
  • f f
: v alues along a path are nonde reasing When f is not monotoni , use pathmax equation

f(n′) = max(f(n), g(n′) + h(n′))

A∗ nev er de reases along an y path
  • ut
from ro
  • t

n n’ g(n) = 3 h(n) = 4 g(n’) = 4 h(n’) = 2

P athmax
  • guaran
tees f nonde reasing
  • do
es not guaran tee h
  • nsisten
t
  • do
es not guaran tee A∗ + Graph-Sear h is
  • ptimally
e ien t B.Y. Choueiry 28 Instru tor's notes #7 F ebruary 5, 2016
slide-29
SLIDE 29

✬ ✫ ✩ ✪

Summarizing denitions for A∗
  • A∗
is a b est-rst sear h that expands the no de in the fringe with minimal f(n) = g(n) + h(n)
  • An
admissible fun tion h nev er
  • v
erestimates the distan e to the goal.
  • h
admissible ⇒ A∗ is
  • mplete,
  • ptimal,
  • ptimally
e ien t using Tree-Sear h
  • h
  • nsisten
t ⇔ h monotone

h

  • nsisten
t ⇒ h admissible

h

  • nsisten
t ⇒ f nonde reasing
  • h
  • nsisten
t ⇒ A∗ remains
  • ptimal
using Graph-Sear h B.Y. Choueiry 29 Instru tor's notes #7 F ebruary 5, 2016
slide-30
SLIDE 30

✬ ✫ ✩ ✪

A dmissible heuristi fun tions Examples
  • Route-nding
problems: straigh t-line distan e
  • 8-puzzle:

8 < : h1(n) =

n um b er
  • f
mispla ed tiles

h2(n) =

total Manhattan distan e

Start State Goal State

2 4 5 6 7 8 1 2 3 4 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 5

h1(S)

= ?

h2(S)

= ? B.Y. Choueiry 30 Instru tor's notes #7 F ebruary 5, 2016
slide-31
SLIDE 31

✬ ✫ ✩ ✪

P erforman e
  • f
admissible heuristi fun tions T w
  • riteria
to
  • mpare
admissible heuristi fun tions: 1. Ee tiv e bran hing fa tor: b∗ 2. Dominan e: n um b er
  • f
no des expanded B.Y. Choueiry 31 Instru tor's notes #7 F ebruary 5, 2016
slide-32
SLIDE 32

✬ ✫ ✩ ✪

Ee tiv e bran hing fa tor b∗
  • The
heuristi expands N no des in total
  • The
solution depth is d

− → b∗

is the bran hing fa tor had the tree b een uniform

N = 1 + b∗ + (b∗)2 + . . . + (b∗)d = (b∗)d+1 − 1 b∗ − 1

  • Example: N
=52, d =5 → b∗ = 1.92 B.Y. Choueiry 32 Instru tor's notes #7 F ebruary 5, 2016
slide-33
SLIDE 33

✬ ✫ ✩ ✪

Dominan e If h2(n) ≥ h1(n) for all n (b
  • th
admissible) then h2 dominates h1 and is b etter for sear h T ypi al sear h
  • sts:
no des expanded Sol. depth IDS A∗(h1) A∗(h2)

d = 12

3,644,035 227 73

d = 24

to
  • man
y 39,135 1,641 A∗ expands all no des f(n) < C∗ ⇒ g(n) + h(n) < C∗

⇒h(n) < C∗ − g(n)

If h1 ≤ h2 , A∗ with h1 will alw a ys expand at least as man y (if not more) no des than A∗ with h2

− →

It is alw a ys b etter to use a heuristi fun tion with higher v alues , as long as it do es not
  • v
erestimate (remains admissible) B.Y. Choueiry 33 Instru tor's notes #7 F ebruary 5, 2016
slide-34
SLIDE 34

✬ ✫ ✩ ✪

Ho w to generate admissible heuristi s?

Use exa t solution
  • st
  • f
a relaxed (easier) problem Steps:
  • Consider
problem P
  • T
ak e a problem P ′ easier than P
  • Find
solution to P ′
  • Use
solution
  • f P ′
as a heuristi for P B.Y. Choueiry 34 Instru tor's notes #7 F ebruary 5, 2016
slide-35
SLIDE 35

✬ ✫ ✩ ✪

Relaxing the 8-puzzle problem A tile an mo v e mo de square A to square B if A is (horizon tally
  • r
v erti ally) adja en t to B and B is blank 1. A tile an mo v e from square A to square B if A is adja en t to B The rules are relaxed so that a tile an mo v e to any adja ent squar e: the shortest solution an b e used as a heuristi (≡ h2(n)) 2. A tile an mo v e from square A to square B if B is blank Gas hnig heuristi (Exer i e 3.31, AIMA, page 119) 3. A tile an mo v e from square A to square B The rules
  • f
the 8-puzzle are relaxed so that a tile an mo v e anywher e: the shortest solution an b e used as a heuristi (≡ h1(n)) B.Y. Choueiry 35 Instru tor's notes #7 F ebruary 5, 2016
slide-36
SLIDE 36

✬ ✫ ✩ ✪

An admissible heuristi for the TSP Let path b e any stru ture that
  • nne ts
all ities

= ⇒

minim um spanning tree heuristi (p
  • lynomial)
(Exer i e 3.30, AIMA, page 119) B.Y. Choueiry 36 Instru tor's notes #7 F ebruary 5, 2016
slide-37
SLIDE 37

✬ ✫ ✩ ✪

Com bining sev eral admissible heuristi fun tions W e ha v e a set
  • f
admissible heuristi s h1, h2, h3, . . . , hm but no heuristi that dominates all
  • thers,
what to do?

− → h(n) = max(h1(n), h2(n), . . . , hm(n)) h

is admissible and dominates all
  • thers.

Problem: Cost
  • f
  • mputing
the heuristi (vs.
  • st
  • f
expanding no des) B.Y. Choueiry 37 Instru tor's notes #7 F ebruary 5, 2016
slide-38
SLIDE 38

✬ ✫ ✩ ✪

Using subproblems to deriv e an admissible heuristi fun tion Goal: get 1, 2, 3, 4 in to their
  • rre t
p
  • sitions,
ignoring the `iden tit y'
  • f
the
  • ther
tiles

Start State Goal State

1 2 3 4 6 8 5 2 1 3 6 7 8 5 4

Cost
  • f
  • ptimal
solution to subproblem used as a lo w er b
  • und
(and is substan tially more a urate than Manhattan distan e) P attern databases:
  • Iden
tify patterns (whi h represen t sev eral p
  • ssible
states)
  • Store
  • st
  • f
exa t solutions
  • f
patterns
  • During
sear h, retriev e
  • st
  • f
pattern and use as a (tigh t) estimate Cost
  • f
building the database is amortized
  • v
er `time' B.Y. Choueiry 38 Instru tor's notes #7 F ebruary 5, 2016