CSE 151 Lecture Notes

INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Searching for Solutions


Administrivia:


Overview

  1. The general search algorithm

  2. Some search strategies:
    1. Evaluation criteria:
      1. completeness: will it find a solution if one exists?
      2. time efficiency:
      3. space efficiency:
      4. optimality of solution:
    2. Uninformed or blind searches:
      1. Breadth-first: (FIFO queuing strategy)
        • complete: yes
        • time and space: O(branch_factor^depth) (empirically space a larger problem than time)
        • optimality: yes, if path cost non-decreasing with depth.
      2. Uniform Cost (expand lo cost fringe node)
        • optimal: yes, if no negative costs
        • a generalization of Breadth-first.
      3. Depth-first (uses a stack)
        • completeness: no! may go down and not come back
        • time: O(branch_factor^depth)
        • space: O(depth)
        • optimality: no! returns first found, not necessarily ideal
      4. depth-limited (DFS down to some cutoff)
        • completeness: yes, provided solution exists before cutoff
        • time: O(branch_factor^depth_limit)
        • space: O(depth_limit)
        • optimality: no!
      5. Iterative Deepening (successively increasing depth-limited)
        • diameter of state space: max anticipated path length for most problems.
        • completeness: yes (like Breadth-first)
        • time: O(branch_factor^diameter)
        • space: O(diameter) (like Depth-first)
        • optimality: yes (like Breadth-first)
    3. Informed searches:
      1. Best-first search (expand nodes according to some cost function)
        1. Greedy search (expand according to h(n)--cost to goal)
          • completeness: no (could go down an endless branch)
          • optimality: no (ignores cost from initial node)
          • faster (on average) than uninformed algorithm
        2. A* search (combines uniform-cost search and greedy search)
          • expand nodes according to the estimated total cost function, f(n) = g(n) + h(n)
          • h(n) must always be optimistic (admissible)
          • completeness: yes
          • optimality: yes
          • optimally efficient: no better algorithm with same knowledge
      2. Heuristic functions
        • Relax the demands of the problem

Searching for solutions