Uninformed search

Reflex Agents

  • Action decided by current percept, and possibly memory
  • Can have memory or world model
  • Doesn’t “think” or consider the future state of the world after action (i.e. doesn’t consider consider consequences of decisions, blindly jumping)
  • Can be rational in certain scenarios (example was simple Pacman layout, reflex is to choose the closest point)
  • Considers how world IS

Planning Agents

  • Makes decisions base on hypothesized action consequences
  • Needs a model of how the world changes in response to actions
  • Considers how world WILL BE

Optimal vs. complete planning

  • Complete: guaranteed to find solution if one exists
  • Optimal: guaranteed to find least cost path

Planning vs. replanning

  • Planning: plan entire path ahead of time
  • Replanning: allow incomplete starting plan and recompute path along the way

Search Problems

Search problem consists of

  • State space: space of all possible states that could be encountered
  • Successor function: mapping from current state to the next
  • State start
  • Goal test

A solution is sequence of actions (called a plan) that transforms start state to goal state

  • World state includes all details of environment
  • Search state keeps only details for planning

For example, a pathing problem in Pacman might include

  • States: (x,y) locations
  • Actions: north, east, south, west
  • Successor: update location only
  • Goal test: is (x,y) = END

Notice that only the details necessary for executing a search problem are included in this list. Here state and successor information has been stripped down from the world state to only include what’s needed for finding paths.

State Space Graphs and Search Tress

  • State space graph: mathematical representation of a search problem
    • Each state occurs only once i.e. has a unique node
    • Nodes are world configurations
    • Connections show successors/transitions between states
    • Goal test is set of goal nodes
    • Conceptually nice but difficult to actually build in practice
  • Search trees: tree of states branching on actions
    • Root node of the tree is the start state
    • Children of parent nodes are its successors if the action on the connection is taken
    • Nodes ultimately respresent plans to achieve the state it corresponds to
      • Can think of a node in the search tree as corresponding to an entire path in the search graph
      • Search tree is a way of providing context for the current node
    • A state space graph may be finite, but the search tree can be infinite (due to state loops)