Download presentation
Presentation is loading. Please wait.
Published byAlexandra Dawson Modified over 8 years ago
1
Ch. 4 – Informed Search Supplemental slides for CSE 327 Prof. Jeff Heflin
2
A* Example Use A* to solve the 8-puzzle: 123 468 75 123 456 78 initial state: goal state: Choose a heuristic –H 1 : The number of tiles out of place –H 2 : Sum of distances of tiles from goal positions Ignore moves that return you to the previous state path cost is the total number of moves made
3
A* on 8-puzzle 123 468 75 123 46 758 123 468 75 12 463 758 123 4 6 758 123 4 8 765 123 468 75 13 426 758 123 46 758 123 456 7 8 123 456 78 123 456 78 f=0+3=3 f=1+3=4 f=2+4=6f=2+2=4f=2+3=5f=2+4=6 f=3+3=6 f=3+1=4 f=4+2=6f=4+0=4 1 23 4 5 6 Heuristic = H 1 Whether or not this node is expanded depends on how you break ties. It could be expanded at any time or not at all.
4
A* on 8-puzzle 123 468 75 123 46 758 123 468 75 12 463 758 123 4 6 758 13 426 758 123 46 758 123 456 7 8 123 456 78 123 456 78 f=0+4=4 f=1+3=4f=1+5=6 f=2+4=6f=2+2=4 f=3+3=6 f=3+1=4 f=4+2=6f=4+0=4 1 2 3 4 5 Heuristic = H 2
5
Summary of Search Algorithms typeorderingoptimal?complete?efficient? depth-firstuninformedLIFOno if lucky breadth-firstuninformedFIFOyes a yesno uniform costuninformedg(n)yes b no greedyinformedh(n)no usually A*informedg(n)+h(n)yes c yes a – optimal if step costs are identical b – optimal and complete if step costs > 0 c – optimal if heuristic is admissible
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.