Introduction to search - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Introduction to search

Description:

search proposed as the basis of intelligence ... Water jug problem. Missionaries & cannibals. Define. state representation (k-rep) initial state ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 24
Provided by: Syste98
Category:

less

Transcript and Presenter's Notes

Title: Introduction to search


1
Introduction to search
  • Chapter 3

2
Why study search?
  • Search is a basis for all AI
  • search proposed as the basis of intelligence
  • all learning algorithms, e.g., can be seen as
    searching some space of hypothesis

3
Newell Simon physical symbol hypothesis
  • A physical-symbol system has the necessary
    sufficient means for general intelligent action

4
Physical-systems
  • A physical-system consists of a set of entities,
    called symbols, which are physical patterns that
    can occur as components of another type of entity
    called an expression Thus a symbol structure is
    composed of a number of instances (or tokens) of
    symbols related in some physical way (such as one
    token being next to another). At any instant of
    time, the system will contain a collection of
    these symbol structures. Besides these
    structures, the system also contains a collection
    of processes that operate on expressions to
    produce other expressions processes of creation,
    modification, reproduction, destruction. A
    physical-symbol system is a machine that produces
    through time an evolving collection of symbol
    structures.

5
Intelligence as search
  • The solutions to problems are represented as
    symbol structures. A physical-symbol system
    exercises its intelligence in problem-solving by
    search -- that is, by generating progressively
    modifying symbol structures until it produces a
    solution structure.

6
The search task
  • Given
  • a description of the initial state
  • list of legal actions
  • preconditions
  • effects
  • goal test -- tells you if a goal has been reached
  • Find
  • an ordered list of actions to perform in order to
    go from the initial state to the goal

7
Search as a graph
  • Nodes
  • search-space states
  • Directed arcs
  • legal actions from each state to another
  • Example
  • Rather than being given, however, we often build
    the graph (implicitly) as we go we arent given
    the graph explicitly

8
Trip as search
  • State geographical location (city, street, etc.)
  • Actions following a road
  • Initial state Madison
  • Goal state Minneapolis

9
ID3 as search
  • Search space space of all decision trees
    possible using feature set
  • Operator (action) add a node (expand the tree)
  • State (node) decision tree
  • Initial state single leaf node
  • Goal state tree that properly categorizes
    (separates) the training examples

10
ID3 heuristic
  • Problem search space very large given that we
    cant look at all of the possibilities, whats a
    good next state? -- info gain (heuristic)
  • Info gain can be seen as a scoring function that
    guides us through the space of possible decision
    trees

11
General search methods
  • Given a set of search-space nodes, which one
    should we consider next?
  • Youngest depth-first search
  • most recently created/expanded node
  • Oldest breadth-first search
  • least-recently created/expanded node
  • Best best-first search
  • requires a scoring function
  • Random
  • simulated annealing

12
Example of search strategies
13
Considering a node
  • If goal-state?(node) then done else expand(node)
  • expand add previously unvisited children
    (states that be gotten to from node) to the OPEN
    list
  • if we want the cheapest path, we must check that
    we cant find a cheaper route
  • example

14
General search algorithm
15
Search algorithm explained
  • Task find a route from the start node to the
    goal node
  • Desire try all/many possible paths
  • OPEN list allows backtracking from a path that
    dies out saves other possible ways
  • nodes under consideration (to be expanded)
  • CLOSED list prevents us from repeatedly trying a
    node ending up in an infinite loop
  • nodes that have been processed

16
Search danger infinite spaces
  • We must be careful that our search doesnt go
    forever
  • the goal we are looking for may not be in the
    search space but because the space is infinite we
    might not know this
  • the goal may be in the search space but we go
    down an infinite branch
  • example

17
Implementing search strategies
  • Breadth
  • queue first in, first out
  • put new nodes at the back of list
  • Depth
  • stack last in, first out
  • put new nodes at the front of list
  • Best
  • priority queue
  • add new nodes then sort list
  • The next node to consider is popped off the front
    of the OPEN list

18
BFS tradeoffs
  • pros
  • guaranteed to find a solution if it exists
  • guaranteed to find the shortest solution (in
    terms of arcs)
  • cons
  • OPEN becomes too big O(bd)
  • example

19
DFS tradeoffs
  • pros
  • might find solution quickly
  • needs less space for OPEN O(b d)
  • example
  • cons
  • can get stuck (run forever) in infinite spaces
  • might not find shortest solution

20
Best-first search tradeoffs
  • pro
  • can use domain specific knowledge
  • con
  • requires a good heuristic (scoring) function

21
Fixing DFS iterative deepening
  • Combines the strengths of breadth- depth-first
    search
  • do DFS but with depth limited to k
  • if find solution, done (return path, etc.)
  • else, increment k start over
  • dont save partial solutions from previous
    iterations too much memory required
  • due to exponential growth, most work is at the
    bottom
  • guaranteed to find the shortest solution, but
    OPEN doesnt get too big (as in BFS)

22
Iterative deepening idea
  • We do only a little more work overall, but our
    storage needs are much less
  • we get the good aspects of BFS -- shortest
    solution
  • without the negative aspects -- OPEN list too big

23
Search space examples
  • Water jug problem
  • Missionaries cannibals
  • Define
  • state representation (k-rep)
  • initial state
  • goal state
  • operators
  • Then draw search space
Write a Comment
User Comments (0)
About PowerShow.com