Lecture 4 of 42<br />State Spaces, Graphs, Uninformed (Blind) Search:<br />ID-DFS, Bidirectional, UCS/B&B<br />Discussion:...
Lecture Outline<br /><ul><li>Reading for Next Class: Sections 3.5 – 3.7, 4.1 – 4.2, R&N 2e
Past Week: Intelligent Agents (Ch. 2), Blind Search (Ch. 3)
Basic search frameworks: discrete and continuous
Tree search intro: nodes, edges, paths, depth
Depth-first search (DFS) vs. breadth-first search (BFS)
Completeness and depth-limited search (DLS)
Coping with Time and Space Limitations of Uninformed Search
Depth-limited and resource-bounded search (anytime, anyspace)
Iterative deepening (ID-DFS) and bidirectional search
Project Topic 4 of 5: Natural Lang. Proc. (NLP) & Info. Extraction
Preview: Intro to Heuristic Search (Section 4.1)
What is a heuristic?
Relationship to optimization, static evaluation, bias in learning
Desired properties and applications of heuristics</li></li></ul><li>Problem-Solving Agents<br />© 2003 S. Russell & P. Nor...
State Space Graph:<br />Vacuum World<br />Based on slide © 2003 S. Russell & P. Norvig.  Reused with permission.<br />
State Space Example:<br />Vacuum World<br />Sensorless<br />Conditional<br />Based on slide © 2003 S. Russell & P. Norvig....
Graph Search Example:<br />Route Planning<br />Edge weights<br />based on actual driving distance<br />Based on slides © 2...
Single-State Problem Formulation<br />© 2003 S. Russell & P. Norvig.  Reused with permission.<br />
Selecting A State Space<br />© 2003 S. Russell & P. Norvig.  Reused with permission.<br />
General Search Algorithm:Review<br /><ul><li>functionGeneral-Search (problem, strategy)                                   ...
initialize search tree using initial state of problem
loop do
if there are no candidates for expansion thenreturn failure
Upcoming SlideShare
Loading in …5
×

PowerPoint - K-State Laboratory for Knowledge Discovery in ...

719 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
719
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PowerPoint - K-State Laboratory for Knowledge Discovery in ...

  1. 1. Lecture 4 of 42<br />State Spaces, Graphs, Uninformed (Blind) Search:<br />ID-DFS, Bidirectional, UCS/B&B<br />Discussion: Term Projects 4 of 5<br />William H. Hsu<br />Department of Computing and Information Sciences, KSU<br />KSOL course page: http://snipurl.com/v9v3<br />Course web site: http://www.kddresearch.org/Courses/CIS730<br />Instructor home page: http://www.cis.ksu.edu/~bhsu<br />Reading for Next Class:<br />Sections 3.5 – 3.7, p. 81 – 88; 4.1 – 4.2, p. 94 - 109, Russell & Norvig 2nd ed.<br />Instructions for writing project plans, submitting homework<br />
  2. 2. Lecture Outline<br /><ul><li>Reading for Next Class: Sections 3.5 – 3.7, 4.1 – 4.2, R&N 2e
  3. 3. Past Week: Intelligent Agents (Ch. 2), Blind Search (Ch. 3)
  4. 4. Basic search frameworks: discrete and continuous
  5. 5. Tree search intro: nodes, edges, paths, depth
  6. 6. Depth-first search (DFS) vs. breadth-first search (BFS)
  7. 7. Completeness and depth-limited search (DLS)
  8. 8. Coping with Time and Space Limitations of Uninformed Search
  9. 9. Depth-limited and resource-bounded search (anytime, anyspace)
  10. 10. Iterative deepening (ID-DFS) and bidirectional search
  11. 11. Project Topic 4 of 5: Natural Lang. Proc. (NLP) & Info. Extraction
  12. 12. Preview: Intro to Heuristic Search (Section 4.1)
  13. 13. What is a heuristic?
  14. 14. Relationship to optimization, static evaluation, bias in learning
  15. 15. Desired properties and applications of heuristics</li></li></ul><li>Problem-Solving Agents<br />© 2003 S. Russell & P. Norvig. Reused with permission.<br />
  16. 16. State Space Graph:<br />Vacuum World<br />Based on slide © 2003 S. Russell & P. Norvig. Reused with permission.<br />
  17. 17. State Space Example:<br />Vacuum World<br />Sensorless<br />Conditional<br />Based on slide © 2003 S. Russell & P. Norvig. Reused with permission.<br />
  18. 18. Graph Search Example:<br />Route Planning<br />Edge weights<br />based on actual driving distance<br />Based on slides © 2003 S. Russell & P. Norvig. Reused with permission.<br />
  19. 19. Single-State Problem Formulation<br />© 2003 S. Russell & P. Norvig. Reused with permission.<br />
  20. 20. Selecting A State Space<br />© 2003 S. Russell & P. Norvig. Reused with permission.<br />
  21. 21. General Search Algorithm:Review<br /><ul><li>functionGeneral-Search (problem, strategy) returns a solution or failure
  22. 22. initialize search tree using initial state of problem
  23. 23. loop do
  24. 24. if there are no candidates for expansion thenreturn failure
  25. 25. choose leaf node for expansion according to strategy
  26. 26. If node contains a goal state thenreturn corresponding solution
  27. 27. else expand node and add resulting nodes to search tree
  28. 28. end
  29. 29. Note: Downward Function Argument (Funarg) strategy
  30. 30. Implementation of General-Search
  31. 31. Rest of Chapter 3, Chapter 4, R&N
  32. 32. See also:
  33. 33. Ginsberg (handout in CIS library today)
  34. 34. Rich and Knight
  35. 35. Nilsson: Principles of Artificial Intelligence</li></li></ul><li>Depth-First Search:<br />Review<br />© 2003 S. Russell & P. Norvig. Reused with permission.<br />
  36. 36. Iterative Deepening Search (ID-DFS):<br />Example<br />Based on slides © 2003 S. Russell & P. Norvig. Reused with permission.<br />
  37. 37. Iterative Deepening Search (ID-DFS):<br />Properties<br />© 2003 S. Russell & P. Norvig. Reused with permission.<br />
  38. 38. Comparison of Search Strategies<br />for Algorithms Thus Far<br />Based on slides © 2003 S. Russell & P. Norvig. Reused with permission.<br />
  39. 39. Bidirectional Search:Review<br /><ul><li>Intuitive Idea
  40. 40. Search “from both ends”
  41. 41. Caveat: what does it mean to “search backwards from solution”?
  42. 42. Analysis
  43. 43. Solution depth (in levels from root, i.e., edge depth): d
  44. 44. Analysis
  45. 45. bi nodes generated at level i
  46. 46. At least this many nodes to test
  47. 47. Total: I bi = 1 + b + b2 + … + bd/2= (bd/2)
  48. 48. Worst-Case Space Complexity:(bd/2)
  49. 49. Properties
  50. 50. Convergence: suppose b, l finite and l  d
  51. 51. Complete: guaranteed to find a solution
  52. 52. Optimal: guaranteed to find minimum-depth solution
  53. 53. Worst-case time complexity is square root of that of BFS</li></li></ul><li>Uniform-Cost Search<br />(aka Branch & Bound)And Heuristics<br /><ul><li>Previously: Uninformed (Blind) Search
  54. 54. No heuristics: only g(n) used
  55. 55. Breadth-first search (BFS) and variants: uniform-cost, bidirectional
  56. 56. Depth-first search (DFS) and variants: depth-limited, iterative deepening
  57. 57. Heuristic Search
  58. 58. Based on h(n) – estimated cost of path to goal (“remaining path cost”)
  59. 59. h – heuristic function
  60. 60. g: node  R; h: node  R; f: node  R
  61. 61. Using h
  62. 62. h only: greedy (akamyopic) informed search
  63. 63. f = g + h: (some) hill-climbing, A/A*
  64. 64. Uniform-Cost (Branch and Bound) Search
  65. 65. Originates from operations research (OR)
  66. 66. Special case of heuristic search: treat as h(n) = 0
  67. 67. Sort candidates by g(n)</li></li></ul><li>Heuristic Search [1]:Terminology<br /><ul><li>Heuristic Function
  68. 68. Definition: h(n) = estimated cost of cheapest path from state at node n to a goal state
  69. 69. Requirements for h
  70. 70. In general, any magnitude (ordered measure, admits comparison)
  71. 71. h(n) = 0 iffn is goal
  72. 72. For A/A*, iterative improvement: want
  73. 73. h to have same type as g
  74. 74. Return type to admit addition
  75. 75. Problem-specific (domain-specific)
  76. 76. Typical Heuristics
  77. 77. Graph search in Euclidean space</li></ul> hSLD(n) = straight-line distance to goal<br /><ul><li>Discussion (important): Why is this good?</li></li></ul><li>Heuristic Search [2]:Background<br /><ul><li>Origins of Term
  78. 78. Heuriskein – to find (to discover)
  79. 79. Heureka (“I have found it”) – attributed to Archimedes
  80. 80. Usage of Term
  81. 81. Mathematical logic in problem solving
  82. 82. Polyà [1957]
  83. 83. Methods for discovering, inventing problem-solving techniques
  84. 84. Mathematical proof derivation techniques
  85. 85. Psychology: “rules of thumb” used by humans in problem-solving
  86. 86. Pervasive through history of AI
  87. 87. e.g., Stanford Heuristic Programming Project
  88. 88. One origin of rule-based (expert) systems
  89. 89. General Concept of Heuristic (A Modern View)
  90. 90. Standard (rule, quantitative measure) used to reduce search
  91. 91. “As opposed to exhaustive blind search”
  92. 92. Compare (later): inductive bias in machine learning</li></li></ul><li>Best-First Search [1]:Evaluation Function<br /><ul><li>Recall: General-Search
  93. 93. Applying Knowledge
  94. 94. In problem representation (state space specification)
  95. 95. At Insert(), akaQueueing-Fn()
  96. 96. Determines node to expand next
  97. 97. Knowledge representation (KR)
  98. 98. Expressing knowledge symbolically/numerically
  99. 99. Objective
  100. 100. Initial state
  101. 101. State space (operators, successor function)
  102. 102. Goal test: h(n) – part of (heuristic) evaluation function</li></li></ul><li>Best-First Search [2]:Characterization of Algorithm Family<br /><ul><li>Best-First: Family of Algorithms
  103. 103. Justification: using only g doesn’t direct search toward goal
  104. 104. Nodes ordered
  105. 105. Node with best evaluation function (e.g., h) expanded first
  106. 106. Best-first: any algorithm with this property (NB: not just using h alone)
  107. 107. Note on “Best”
  108. 108. Refers to “apparent best node”
  109. 109. based on eval function
  110. 110. applied to current frontier
  111. 111. Discussion: when is best-first not really best?</li></li></ul><li>Best-First Search [3]:Implementation<br /><ul><li>functionBest-First-Search (problem, Eval-Fn) returns solution sequence
  112. 112. inputs: problem, specification of problem (structure or class) Eval-Fn, an evaluation function
  113. 113. Queueing-Fn  function that orders nodes by Eval-Fn
  114. 114. Compare: Sort with comparator function <
  115. 115. Functional abstraction
  116. 116. returnGeneral-Search (problem, Queueing-Fn)
  117. 117. Implementation
  118. 118. Recall: priority queue specification
  119. 119. Eval-Fn: node  R
  120. 120. Queueing-Fn Sort-By: node list  node list
  121. 121. Rest of design follows General-Search
  122. 122. Issues
  123. 123. General family of greedy (akamyopic, i.e., nearsighted) algorithms
  124. 124. Discussion: What guarantees do we want on h(n)? What preferences?</li></li></ul><li>Next Topic:More on Informed Search<br /><ul><li>Branch-and-Bound Search
  125. 125. Heuristics for General-Search Function of Problem-Solving-Agent
  126. 126. Informed (heuristic) search: heuristic definition, development process
  127. 127. Best-First Search
  128. 128. Greedy
  129. 129. A/A*
  130. 130. Admissibility property
  131. 131. Developing good heuristics
  132. 132. Humans
  133. 133. Intelligent systems (automatic derivation): case studies and principles
  134. 134. Constraint Satisfaction Heuristics
  135. 135. This Week: More Search Basics
  136. 136. Memory bounded, iterative improvement (gradient, Monte Carlo search)
  137. 137. Introduction to game tree search</li></li></ul><li>Project Topic 4 of 5:<br />NLP and Information Extraction (IE)<br />Machine Translation<br />© 2009 Google, Inc. <br />Input<br />Named<br />Entity<br />Recognition<br />Output<br />Conversational Agent<br />© 1997 InstitutJozef<br />Stefan (IJS), Slovenia<br />
  138. 138. Terminology<br /><ul><li>State Space Search
  139. 139. Search Types: Uninformed (“Blind”) vs. Informed (“Heuristic”)
  140. 140. Basic Search Algorithms
  141. 141. British Museum (depth-firstakaDFS)
  142. 142. Breadth-Firstaka BFS
  143. 143. Depth-Limited Search (DLS)
  144. 144. Refinements
  145. 145. Iterative-deepening DFS (ID-DFS)
  146. 146. Bidirectional (as adaptation of BFS or ID-DFS)
  147. 147. Cost, c(n1, n2) and Cumulative Path Cost, g(n)
  148. 148. Online (Path) Cost, g(goal) vs. Offline (Search) Cost
  149. 149. Heuristic: Estimate of Remaining Path Cost, h(n)
  150. 150. Uniform-Cost (akaBranch-and-Bound): g(n) only, h(n) = 0</li></li></ul><li>Summary Points<br /><ul><li>Reading for Next Class: Sections 3.5 – 3.7, 4.1 – 4.2, R&N 2e
  151. 151. This Week: Search, Chapters 3 - 4
  152. 152. State spaces
  153. 153. Graph search examples
  154. 154. Basic search frameworks: discrete and continuous
  155. 155. Uninformed (“Blind”) vs. Informed (“Heuristic”) Search
  156. 156. h(n) and g(n) defined: no h in blind search; online cost = g(goal)
  157. 157. Properties: completeness, time and space complexity, offline cost
  158. 158. Uniform-cost search (B&B) as generalization of BFS: g(n) only
  159. 159. Relation to Intelligent Systems Concepts
  160. 160. Knowledge representation: evaluation functions, macros
  161. 161. Planning, reasoning, learning
  162. 162. Coming Week: Heuristic Search, Chapter 4
  163. 163. Later: Goal-Directed Reasoning, Planning (Chapter 11)</li>

×