A strategy is defined by picking the order of node expansion is - - PDF document

a strategy is defined by picking the order of node
SMART_READER_LITE
LIVE PREVIEW

A strategy is defined by picking the order of node expansion is - - PDF document

r


slide-1
SLIDE 1 ✁ ✂ ✄ ☎✆ ✝✞ ✂ ✟ ☎ ✁ ✂ ☎ ✠ ✄ ✂ ✟✡ ✞ ✟ ☛ ☞ ✁ ✂✌ ☞ ☞ ✟ ✍ ✌ ✁ ✞ ✌ ✎✏✑ ✒ ✓✔ ✕✖ ✗ ✕✘ ✓ ✙ ✚ ✘ ✛ ✜ ✒ ✓✢ ✣ ✚ ✔ ✗ ✤ ✥ ✦ ✧ ★✩ ✪✫ ✬ ✭ ✩ ✮ ★ ✯ ✰ ✱ ✲ ✳ ✴ ✵ ✬ ✫ ✶ ✷✸✹ ✸✺ ✻ ✼✽ ✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❬ ❪ ✝ ✂ ☞ ✟ ✁ ✌ ❫

Best-first search

A

search

Heuristics

Hill-climbing

Simulated annealing

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❵ ✌❛ ✟ ✌❜ ❝ ❞ ✌ ✁ ✌ ✄ ☛ ☞ ❡ ✌ ☛ ✄ ✞ ❢ ❣ ❤ ✐ ❥❦ ❧ ♠ ✐ ♥ ♦♣ ♦ q rs t ✉ ♦ r q✈ ✇

(

① ②③④ ⑤⑥⑦ ⑧⑨ ⑩ ♦ ⑩ ❶ ♣ ❷ t ❸ ♣

)

❹ ❺ ❦ ❤ ❹ ✐ ❻

a solution, or failure

❼ ③❽ ⑥❾❿ ➀ r➁ ♦ t ⑨ ⑩ ♦ ⑩ ♦

(

➀ r➁ ♦ t ➂ ➃ ➄ ♦

(

➅ ♣ ❶➆ ❶ rs t ✉ ➆ r ➆ ♦

[

① ②③④ ⑤ ⑥⑦

]))

➇ ♠ ♠ ➈ ➉ ♠ ❧ ❣ ❼ ③❽ ⑥❾

is empty

❦ ➊ ❺ ✐ ❹ ❺ ❦ ❤ ❹ ✐

failure

❼ ③❽ ⑥ ❿ ➋ ♦➌ ➃➍ ♦ t ❸ q ➃ ♣ ➆

(

❼ ③ ❽ ⑥❾

)

❧ ❣ ♥ ➃ rs t ➎ ♦ ➏ ➆

[

① ② ③ ④ ⑤⑥⑦

] applied to

✉ ➆ r ➆ ♦

(

❼ ③❽ ⑥

) succeeds

❦ ➊ ❺ ✐ ❹ ❺ ❦ ❤ ❹ ✐ ❼ ③❽ ⑥ ❼ ③❽ ⑥❾ ❿ ⑨ ⑩ ♦ ⑩ ❶ ♣ ❷ t ❸ ♣

(

❼ ③❽ ⑥ ❾

,

➐➑➒ r ♣ ➄

(

❼ ③❽ ⑥

,

➓ ➒ ♦ q r ➆ ➃ q ➏

[

① ②③④ ⑤ ⑥⑦

]))

❺ ✐ ➉

A strategy is defined by picking the order of node expansion

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ➔ ✌ ❡ ✂➣→ ✡ ✄ ❡ ✂ ❡ ✌ ☛ ✄ ✞ ❢

Idea: use an evaluation function for each node – estimate of “desirability”

Expand most desirable unexpanded node Implementation:

↕ ➙ ➛ ➙ ➛➜➝ ➞ ➟ ➝

= insert successors in decreasing order of desirability Special cases: greedy search A

search

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➠
slide-2
SLIDE 2 ❵ ☎ ➡ ☛ ✁ ✟ ☛ ❜ ✟ ✂ ❢ ❡ ✂✌ ➢ ✞ ☎ ❡ ✂ ❡ ✟ ✁ ➤ ➡

Bucharest Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Rimnicu Vilcea Vaslui Iasi

Straight−line distance to Bucharest

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

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❳ ❞ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢

Evaluation function

➦ ➧➩➨ ➫

(heuristic) = estimate of cost from

to

➭ ➯➲➳

E.g.,

➦ ➵ ➸➺ ➧➩➨ ➫

= straight-line distance from

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

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➻ ❞ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Arad

366

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➽ ❞ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Arad

366

Zerind Sibiu Timisoara

374 253 329

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➾
slide-3
SLIDE 3 ❞ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Arad

366

Zerind Sibiu Timisoara

374 253 329

Arad Oradea Rimnicu Vilcea Fagaras

366 380 178 193

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❙ ❞ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Arad

366

Zerind Sibiu Timisoara

374 253 329

Arad Oradea Rimnicu Vilcea Fagaras

366 380 178 193

Sibiu Bucharest

253

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❘ ➚ ✄ ☎ ➢ ✌ ✄ ✂ ✟ ✌ ❡ ☎ ➪ ✍ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢

Complete?? Time?? Space?? Optimal??

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❬ ➚ ✄ ☎ ➢ ✌ ✄ ✂ ✟ ✌ ❡ ☎ ➪ ✍ ✄ ✌ ✌ ✆ ➥ ❡ ✌ ☛ ✄ ✞ ❢

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

Neamt

Iasi

Neamt

Complete in finite space with repeated-state checking Time:

➹ ➧➩➘➷➴ ➫

, but a good heuristic can give dramatic improvement Space:

➹ ➧➩➘ ➴ ➫

—keeps all nodes in memory Optimal: No

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ◗
slide-4
SLIDE 4 ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢

Idea: avoid expanding paths that are already expensive Evaluation function

➱ ➧➩➨ ➫❐✃ ➭ ➧➩➨ ➫ ❒ ➦ ➧➩➨ ➫ ➭ ➧➩➨ ➫

= cost so far to reach

➨ ➦ ➧ ➨ ➫

= estimated cost to goal from

➨ ➱ ➧➩➨ ➫

= estimated total cost of path through

to goal A

search uses an admissible heuristic i.e.,

➦ ➧➩➨ ➫ ❮ ➦ ❴ ➧➩➨ ➫

where

➦ ❴ ➧➩➨ ➫

is the true cost from

. E.g.,

➦ ➵ ➸➺ ➧➩➨ ➫

never overestimates the actual road distance Theorem: A

search is optimal

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❩ ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Arad

366

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ➠ ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

Zerind Sibiu Timisoara

449 393 447

75 140 118 Arad

366

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❳ ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

151 Arad Oradea Rimnicu Vilcea Fagaras

646 526 417 413

140 99 80 Zerind Sibiu Timisoara

449 393 447

75 140 118 Arad

366

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ➻
slide-5
SLIDE 5 ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

151 Arad

366

Zerind Sibiu Timisoara Arad Oradea Rimnicu Vilcea Fagaras

449 393 447 646 526 417 413 526 415 553

Craiova Pitesti Sibiu 75 140 118 140 99 80 146 97 80

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ➽ ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

151 Arad

366

Zerind Sibiu Timisoara Arad Oradea Rimnicu Vilcea Fagaras

449 393 447 646 526 417 413 526 415 553 607 615 418

Craiova Pitesti Sibiu Rimnicu Vilcea Craiova Bucharest 75 140 118 140 99 80 146 97 80 97 138 101

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ➾ ✠➮➬ ❡ ✌ ☛ ✄ ✞ ❢ ✌ ➼ ☛ ➡ ➢ ☞ ✌

151 Arad

366

Zerind Sibiu Timisoara Arad Oradea Rimnicu Vilcea Fagaras Sibiu Bucharest

449 393 447 646 526 417 413 591 450 526 415 553 607 615 418

Craiova Pitesti Sibiu Rimnicu Vilcea Craiova Bucharest 75 140 118 140 99 80 99 211 146 97 80 97 138 101

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❙ ❪ ➢ ✂ ✟ ➡ ☛ ☞ ✟ ✂ ➥ ☎ ➪ ✠ ➬

Suppose some suboptimal goal

❰ Ï

has been generated and is in the queue. Let

be an unexpanded node on a shortest path to an optimal goal

❰ Ð

.

G n G2 Start

➱ ➧ ❰ Ï ➫ ✃ ➭ ➧ ❰ Ï ➫ Ñ ÒÓ ÔÕ ➦ ➧ ❰ Ï ➫❐✃ Ö × ➭ ➧ ❰ Ð ➫ Ñ ÒÓ ÔÕ ❰ Ï Ò Ñ ÑØÙÚ Û Ü ÒÝ Þ ß à ➱ ➧➩➨ ➫ Ñ ÒÓ Ô Õ ➦ Ò Ñ Þá Ý Ò Ñ Ñ Ò Ù ß Õ

Since

➱ ➧ ❰ Ï ➫ × ➱ ➧➩➨ ➫

, A

will never select

❰ Ï

for expansion

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ◗ ❘
slide-6
SLIDE 6 ➚ ✄ ☎ ➢ ✌ ✄ ✂ ✟ ✌ ❡ ☎ ➪ ✠ ➬

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

➱ ❮ ➱ ➧ ❰ ➫

Time?? Exponential in [relative error in

➦ â

length of soln.] Space?? Keeps all nodes in memory Optimal?? Yes—cannot expand

➱ ã ä Ð

until

➱ ã

is finished

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ❬ ✠ ✆ ➡ ✟ ❡ ❡ ✟ å ☞ ✌ ❢ ✌ ✝ ✄ ✟ ❡ ✂ ✟ ✞ ❡

E.g., for the 8-puzzle:

➦ Ð ➧➩➨ ➫

= number of misplaced tiles

➦ Ï ➧➩➨ ➫

= total Manhattan distance (i.e., no. of squares from desired location of each tile)

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

➦ Ð ➧ æ ➫

=??

➦ Ï ➧ æ ➫

=??

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ◗ ✠ ✆ ➡ ✟ ❡ ❡ ✟ å ☞ ✌ ❢ ✌ ✝ ✄ ✟ ❡ ✂ ✟ ✞ ❡

E.g., for the 8-puzzle:

➦ Ð ➧➩➨ ➫

= number of misplaced tiles

➦ Ï ➧➩➨ ➫

= total Manhattan distance (i.e., no. of squares from desired location of each tile)

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

➦ Ð ➧ æ ➫

=: 7

➦ Ï ➧ æ ➫

=: 2+3+3+2+4+2+0+2 = 18

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ❩ ç ☎ ➡ ✟ ✁ ☛ ✁ ✞ ✌

If

➦ Ï ➧➩➨ ➫ à ➦ Ð ➧➩➨ ➫

for all

(both admissible) then

➦ Ï

dominates

➦ Ð

and is better for search Typical search costs:

è ✃ éê

IDS = 3,473,941 nodes A

❴ ➧ ➦ Ð ➫

= 539 nodes A

❴ ➧ ➦ Ï ➫

= 113 nodes

è ✃ ë ê

IDS = too many nodes A

❴ ➧ ➦ Ð ➫

= 39,135 nodes A

❴ ➧ ➦ Ï ➫

= 1,641 nodes

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ➠
slide-7
SLIDE 7 ❵ ✌ ☞ ☛ ➼ ✌ ✆ ➢ ✄ ☎ å ☞ ✌ ➡ ❡

Admissible heuristics can be derived from the exact solution cost of a relaxed version of the problem If the rules of the 8-puzzle are relaxed so that a tile can move anywhere, then

➦ Ð ➧➩➨ ➫

gives the shortest solution If the rules are relaxed so that a tile can move to any adjacent square, then

➦ Ï ➧➩➨ ➫

gives the shortest solution

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ❳
  • ✂✌
✄ ☛ ✂ ✟ ❛ ✌ ✟ ➡ ➢ ✄ ☎ ❛ ✌ ➡ ✌ ✁ ✂ ☛ ☞ ✍ ☎ ✄ ✟ ✂ ❢ ➡ ❡

In many optimization problems, path is irrelevant; the goal state itself is the solution Then state space = set of “complete” configurations; find optimal configuration, e.g., TSP

  • r, find configuration satisfying constraints, e.g., n-queens

In such cases, can use iterative improvement algorithms; keep a single “current” state, try to improve it Constant space, suitable for online as well as offline search

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ➻ ì ➼ ☛ ➡ ➢ ☞ ✌ ❝í ✄ ☛ ❛ ✌ ☞ ☞ ✟ ✁ ✍ïî ☛ ☞ ✌ ❡ ➢ ✌ ✄ ❡ ☎ ✁ ➚ ✄ ☎ å ☞ ✌ ➡

Find the shortest tour that visits each city exactly once

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ➽ ì ➼ ☛ ➡ ➢ ☞ ✌ ❝ ð → ñ ✝ ✌ ✌ ✁ ❡

Put

queens on an

➨ â ➨

board with no two queens on the same row, column, or diagonal

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ➾
slide-8
SLIDE 8 ò ✟ ☞ ☞ → ✞ ☞ ✟ ➡ å ✟ ✁ ✍ ó ☎ ✄ ✍ ✄ ☛ ✆ ✟ ✌ ✁ ✂ ☛ ❡ ✞ ✌ ✁ ✂ ô ✆ ✌ ❡ ✞ ✌ ✁ ✂ õ

“Like climbing Everest in thick fog with amnesia”

❣ ❤ ✐ ❥❦ ❧ ♠ ✐ö ❶ s s t ÷ s ❶ ➌ ø ❶ ♣ ❷

(

① ②③④ ⑤ ⑥⑦

)

❹ ❺ ❦ ❤ ❹ ✐ ❻

a solution state

❧ ✐ ➈ ❤ ❦ ❻

:

① ②③④ ⑤ ⑥⑦

, a problem

➇ ♠ ❥ù ➇ ú ù ❹ ❧ ùû ➇ ❺ ❻

:

üý ② ② ⑥ ❼þ

, a node

❼ ⑥ÿ þ

, a node

ü ý ② ② ⑥ ❼þ ❿ ➀ r➁ ♦ t ➂ ➃ ➄ ♦

(

➅ ♣ ❶➆ ❶ rs t ✉ ➆ r ➆ ♦

[

① ②③④ ⑤ ⑥⑦

])

➇ ♠ ♠ ➈ ➉ ♠ ❼ ⑥ÿ þ ❿

a highest-valued successor of

üý ② ② ⑥ ❼ þ ❧ ❣
  • rs
⑩ ♦

[next]

  • rs
⑩ ♦

[current]

❦ ➊ ❺ ✐ ❹ ❺ ❦ ❤ ❹ ✐ üý ② ② ⑥ ❼ þ üý ② ② ⑥ ❼þ ❿ ❼ ⑥ ÿ þ ❺ ✐ ➉ ✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ❙ ò ✟ ☞ ☞ → ✞ ☞ ✟ ➡ å ✟ ✁ ✍ ✞ ☎ ✁ ✂ ✆ ✂

Problem: depending on initial state, can get stuck on local maxima

value states global maximum local maximum

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ❩ ❘ î ✟ ➡ ✝ ☞ ☛ ✂✌ ✆ ☛ ✁ ✁ ✌ ☛ ☞ ✟ ✁ ✍

Idea: escape local maxima by allowing some “bad” moves but gradually decrease their size and frequency

❣ ❤ ✐ ❥❦ ❧ ♠ ✐ ✉ ❶ ➌ ⑩ s r ➆ ♦ ➄ t ✄ ♣ ♣ ♦ rs ❶ ♣ ❷

(

① ②③④ ⑤ ⑥⑦ ⑧ ❾ ü☎ ⑥ ❽ ý ⑤⑥

)

❹ ❺ ❦ ❤ ❹ ✐ ❻

a solution state

❧ ✐ ➈ ❤ ❦ ❻

:

① ②③④ ⑤ ⑥⑦

, a problem

❾ ü☎ ⑥ ❽ ý ⑤⑥

, a mapping from time to “temperature”

➇ ♠ ❥ù ➇ ú ù ❹ ❧ ùû ➇ ❺ ❻

:

üý ② ② ⑥ ❼þ

, a node

❼ ⑥ÿ þ

, a node

, a “temperature” controlling the probability of downward steps

ü ý ② ② ⑥ ❼þ ❿ ➀ r➁ ♦ t ➂ ➃ ➄ ♦

(

➅ ♣ ❶➆ ❶ rs t ✉ ➆ r ➆ ♦

[

① ②③④ ⑤ ⑥⑦

])

❣ ♠ ❹ þ ❿

1

❦ ♠ ✝ ➉ ♠ ✆ ❿ ❾ ü☎ ⑥ ❽ ý ⑤⑥

[

þ

]

❧ ❣ ✆

=0

❦ ➊ ❺ ✐ ❹ ❺ ❦ ❤ ❹ ✐ üý ② ② ⑥ ❼ þ ❼ ⑥ÿ þ ❿

a randomly selected successor of

üý ② ② ⑥ ❼ þ ✞✟ ❿
  • rs
⑩ ♦

[

❼ ⑥ÿ þ

] –

  • rs
⑩ ♦

[

ü ý ② ② ⑥ ❼þ

]

❧ ❣ ✞✟ ✠ ❦ ➊ ❺ ✐ üý ② ② ⑥ ❼ þ ❿ ❼ ⑥ÿ þ ❺ ➇ ❻ ❺ üý ② ② ⑥ ❼þ ❿ ❼ ⑥ÿ þ
  • nly with probability
✡☞☛ ✌ ✍ ✎ ✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➠ ❬ ➚ ✄ ☎ ➢ ✌ ✄ ✂ ✟ ✌ ❡ ☎ ➪ ❡ ✟ ➡ ✝ ☞ ☛ ✂✌ ✆ ☛ ✁ ✁ ✌ ☛ ☞ ✟ ✁ ✍ ✏

decreased slowly enough

✃ ↔

always reach best state Is this necessarily an interesting guarantee?? Devised by Metropolis et al., 1953, for physical process modelling Widely used in VLSI layout, airline scheduling, etc.

✾ ✿❀❁❂ ❃ ❄❅ ❆❇ ❅ ❈ ❉❊ ❂ ❁ ❀ ❋
❍ ■ ❏ ❀ ❀ ❁ ❉ ❉ ✿ ❄ ❂ ❑ ❍▲ ❃ ▼ ◆ ❊ ❖ P ◗ ❘ ❘❙ ❚ ❯ ✿ ❱ ❲ ❁ ▼❳ P ❈ ❁ ❋ ❲ ❊ ❃ ❄ ❀ ◗ ❨ ❩ P ❳ ❬ ❭ ➠ ◗