required reading aima chapter 3 se tions 3 5 3 6 choueiry
play

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


  1. Title: Informed Sear h Metho ds B.Y. ✫ ✬ Required reading: AIMA, Chapter 3 (Se tions 3.5, 3.6) Choueiry 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 1 Berthe Y. Choueiry (Sh u-w e-ri) (402)472-5444 Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  2. B.Y. Outline ✫ ✬ Choueiry Categorization of 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 ompare them? • 2 ho w to generate them? ho w to om bine them? • Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  3. T yp es of Sear h (I) B.Y. ✫ ✬ Choueiry 1- Uninformed vs. informed 2- Systemati / onstru tiv e vs. iterativ e impro v emen t Uninformed : use only information a v ailable in problem de�nition, no idea ab out distan e to goal an b e in redibly ine�e tiv e in pra ti e 3 Heuristi : exploits some kno wledge of the domain also useful for solving optimization problems → Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  4. T yp es of Sear h (I I) B.Y. ✫ ✬ Systemati , exhaustiv e, onstru tiv e sear h: Choueiry a partial solution is in remen tally extended in to global solution P artial solution = sequen e of transitions b et w een states Global solution = Solution from the initial state to the goal state 4 Uninformed Examples: Informed (heuristi ): Greedy sear h, A ∗ 8 Returns the path; solution = path < Instru tor's : F ebruary → notes 5, 2016 #7 ✪ ✩

  5. T yp es of Sear h (I I I) B.Y. Iterativ e impro v emen t : ✫ ✬ Choueiry A state is gradually mo di�ed and ev aluated un til rea hing an (a eptable) optim um W e don't are ab out the path, w e are ab out `qualit y' of state Returns a state; a solution = go o d qualit y state Ne essarily an informed sear h → 5 Hill lim bing → Examples (informed): Sim ulated Annealing (ph ysi s), T ab o o sear h → Geneti algorithms (biology) 8 > Instru tor's > < F ebruary > > : notes 5, 2016 #7 ✪ ✩

  6. Ordered sear h Strategies for systemati sear h are generated b y ho osing whi h B.Y. ✫ ✬ no de from the fringe to expand �rst Choueiry The no de to expand is hosen b y an ev aluation fun tion , • expressing `desirabilit y' − ordered 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 → 6 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 ould mar h dire tly to → the goal!) Instru tor's • F ebruary notes 5, 2016 #7 ✪ ✩

  7. Sear h using an ev aluation fun tion B.Y. ✫ ✬ Choueiry Example: uniform- ost sear h! What is the ev aluation fun tion? Ev aluates ost from ............. to ................? • Ho w ab out the ost to the goal? = estimated ost of the heap est 7 path from the state at no de n to a goal state • w ould help fo using sear h h ( n ) Instru tor's F ebruary h ( n ) notes 5, 2016 #7 ✪ ✩

  8. B.Y. ✫ Cost to the goal ✬ Choueiry This information is not part of the problem des ription Arad Mehadia 366 241 Bucharest 0 Neamt 8 234 Craiova Oradea 160 380 Dobreta Pitesti 242 100 Eforie Rimnicu Vilcea 161 193 Fagaras Sibiu 176 253 Giurgiu Timisoara 329 77 Hirsova 151 Urziceni 80 Iasi 226 Vaslui 199 Instru tor's Lugoj 244 Zerind 374 F ebruary notes 5, 2016 #7 ✪ ✩

  9. B.Y. Best-�rst sear h ✫ ✬ Choueiry 1. Greedy sear h ho oses the no de n losest to the goal su h as h ( n ) is minimal 2. A ∗ sear h ho oses the least- ost solution g ( n ) : ost from ro ot to a giv en no de n solution ost f ( n ) + 9 h ( n ) : ost from the no de n to the goal no de su h as f ( n ) = g ( n ) + h ( n ) is minimal 8 > > < > > : Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  10. a function that orders nodes by E VAL -F N Greedy sear h B.Y. First expand the no de whose state is ` losest' to the goal! ✫ ✬ Choueiry Minimize h ( n ) → → function B EST -F IRST -S EARCH ( problem, E VAL -F N ) returns a solution sequence inputs : problem , a problem Eval-Fn , an evaluation function Usually , ost of rea hing a goal ma y b e estimated , Queueing-Fn 10 not determined exa tly return G ENERAL -S EARCH ( problem, Queueing-Fn ) If state at n is goal, h ( n ) = ? → Ho w to ho ose h ( n ) ? Problem sp e i� ! Heuristi ! Instru tor's → F ebruary → notes 5, 2016 #7 ✪ ✩

  11. Greedy sear h : Romania B.Y. ✫ ✬ Choueiry = straigh t-line distan e b et w een n and goal lo ation h SLD ( n ) Oradea 71 Neamt 87 Zerind 151 11 75 Iasi Arad 140 92 Sibiu Fagaras 99 118 Vaslui Arad 366 Mehadia 241 80 Bucharest 0 Neamt Rimnicu Vilcea 234 Timisoara Craiova 160 Oradea 380 142 211 Dobreta 242 Pitesti 100 111 Pitesti Lugoj 97 Eforie Rimnicu Vilcea 161 193 70 98 Fagaras 176 Sibiu 253 Hirsova 85 146 Mehadia 101 Urziceni Giurgiu Timisoara 329 77 86 75 138 Hirsova Urziceni 151 80 Instru tor's Bucharest 120 Dobreta Iasi 226 Vaslui 199 90 Lugoj 244 Zerind 374 Eforie Craiova Giurgiu F ebruary notes 5, 2016 #7 ✪ ✩

  12. Greedy sear h : T rip from Arad to Bu harest B.Y. ✫ ✬ Choueiry (a) The initial state Arad 366 (b) After expanding Arad Arad Sibiu Timisoara Zerind 253 329 374 (c) After expanding Sibiu Arad Timisoara Zerind Sibiu 12 329 374 Arad Fagaras Oradea Rimnicu Vilcea 366 176 380 193 (d) After expanding Fagaras Arad Sibiu Timisoara Zerind ... Greedy sear h! qui k, but not optimal! 329 374 Arad Fagaras Oradea Rimnicu Vilcea Instru tor's 366 380 193 F Sibiu Bucharest ebruary 253 0 notes 5, 2016 #7 ✪ ✩

  13. Greedy sear h : Problems B.Y. ✫ ✬ Choueiry F alse starts: Neam t is a dead-end F rom Iasi to F agaras? Lo oping 8 < : Oradea 71 Neamt 87 Zerind 13 151 75 Iasi Arad 140 92 Sibiu Fagaras 99 118 Vaslui Arad 366 Mehadia 241 80 Bucharest 0 Neamt Rimnicu Vilcea 234 Timisoara Craiova 160 Oradea 380 142 211 Dobreta 242 Pitesti 100 111 Pitesti Lugoj 97 Eforie Rimnicu Vilcea 161 193 70 98 Fagaras 176 Sibiu 253 Hirsova 85 146 Mehadia 101 Urziceni Giurgiu Timisoara 329 77 86 75 Instru tor's 138 Hirsova Urziceni 151 80 Bucharest 120 Dobreta Iasi 226 Vaslui 199 90 Lugoj 244 Zerind 374 Eforie Craiova F Giurgiu ebruary notes 5, 2016 #7 ✪ ✩

  14. B.Y. Greedy sear h : Prop erties ✫ ✬ Choueiry Lik e depth-�rst, tends to follo w a single path to the goal Not omplete Lik e depth-�rst Not optimal → Time omplexit y: O ( b m ) , m maxim um depth 8 Spa e omplexit y: O ( b m ) retains all no des in memory < → 14 : Go o d h fun tion ( onsiderably) redu es spa e and time → but h fun tions are problem dep enden t :�( → → Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  15. Hmm... B.Y. ✫ ✬ Choueiry Greedy sear h minimizes estimated ost to goal h ( n ) uts sear h ost onsiderably but not optimal, not omplete Uniform- ost sear h minimizes ost of the path so far g ( n ) is optimal and omplete → but an b e w asteful of resour es → New-Best-First sear h minimizes f ( n ) = g ( n ) + h ( n ) 15 om bines greedy and uniform- ost sear hes → = estimated ost of heap est solution via n → Pro v ably: omplete and optimal, if h ( n ) is admissible → Instru tor's f ( n ) F ebruary → notes 5, 2016 #7 ✪ ✩

  16. A ∗ Sear h B.Y. ✫ ✬ Choueiry A ∗ sear h Best-�rst sear h expanding the no de in the fringe with minimal A ∗ sear h with admissible h ( n ) • Pro v ably omplete, optimal, and optimally e� ien t using Tree-Sear h f ( n ) = g ( n ) + h ( n ) A ∗ sear h with onsisten t h ( n ) • 16 Remains optimal ev en using Graph-Sear h (See Tree-Sear h v ersus Graph-Sear h page 77) • Instru tor's F ebruary notes 5, 2016 #7 ✪ ✩

  17. A dmissible heuristi B.Y. ✫ ✬ An admissible heuristi is a heuristi that nev er o v erestimates the Choueiry ost to rea h the goal is optimisti thinks the ost of solving is less than it a tually is tra v el: straigh t line distan e → Example: I need 3 y ears to �nish ollege (at least!) → W e are 3 y ears a w a y from the �rst �igh t to Mars (at least!) 17 8 If h is admissible , > > < nev er o v erestimates the a tual ost of > > : the b est solution through n . Instru tor's F ebruary f ( n ) notes 5, 2016 #7 ✪ ✩

Recommend


More recommend