Docsity

Search Algorithms in Artificial Intelligence: A Comprehensive Guide - Prof. Introduction t, Summaries of Material Engineering

Partial preview of the text

Download Search Algorithms in Artificial Intelligence: A Comprehensive Guide - Prof. Introduction t and more Summaries Material Engineering in PDF only on Docsity!

Set 2: State-spaces and Uninformed

Search

ICS 271 Fall 2016

Kalev Kask

271 - fall 2016

You need to know

• State-space based problem formulation

– State space (graph)

• Search space

– Nodes vs. states

– Tree search vs graph search

• Search strategies

• Analysis of search algorithms

– Completeness, optimality, complexity

– b, d, m

271 - fall 2016

Problem-Solving Agents

  • Intelligent agents can solve problems by searching a state-space
  • State-space Model
    • the agent’s model of the world
    • usually a set of discrete states
    • e.g., in driving, the states in the model could be towns/cities
  • Goal State(s)
    • a goal is defined as a desirable state for an agent
    • there may be many states which satisfy the goal
      • e.g., drive to a town with a ski-resort
    • or just one state which satisfies the goal
      • e.g., drive to Mammoth
  • Operators(actions)
    • operators are legal actions which the agent can take to move from

one state to another

271 - fall 2016

Example: Romania

271 - fall 2016

Problem Types

  • Static / Dynamic
Previous problem was static: no attention to changes in environment
  • Observable / Partially Observable / Unobservable
Previous problem was observable: it knew its initial state.
  • Deterministic / Stochastic
Previous problem was deterministic: no new percepts
were necessary, we can predict the future perfectly
  • Discrete / continuous
Previous problem was discrete: we can enumerate all possibilities

271 - fall 2016

A problem is defined by five items:
states e.g. cities
initial state e.g., "at Arad“
actions or successor function S(x) = set of action–state pairs
  • e.g., S(Arad) = { <AradZerind, Zerind>, … } transition function - maps action & statestate
goal test , (or goal state)
e.g., x = "at Bucharest”, Checkmate(x)
path cost (additive)
  • e.g., sum of distances, number of actions executed, etc.
  • c(x,a,y) is the step cost, assumed to be ≥ 0
A solution is a sequence of actions leading from the initial state to a goal state

271 - fall 2016 State-Space Problem Formulation

Abstraction/Modeling

  • Definition of Abstraction (states/actions)
    • Process of removing irrelevant detail to create an abstract representation: ``high-level”, ignores irrelevant details
  • Navigation Example: how do we define states and operators?
    • First step is to abstract “the big picture”
      • i.e., solve a map problem
      • nodes = cities, links = freeways/roads (a high-level description)
      • this description is an abstraction of the real problem
    • Can later worry about details like freeway onramps, refueling, etc
  • Abstraction is critical for automated problem solving
    • must create an approximate, simplified, model of the world for the computer to deal with: real-world is too detailed to model exactly
    • good abstractions retain all important details
    • an abstraction should be easier to solve than the original problem 271 - fall 2016

Robot block world

  • Given a set of blocks in a certain configuration,
  • Move the blocks into a goal configuration.
  • Example :
    • ((A)(B)(C))  (ACB)
A
C
B

271 - fall 2016

A B C

The State-Space Graph

  • Problem formulation:
    • Give an abstract description of states,

operators, initial state and goal state.

  • Graphs:
    • vertices, edges(arcs), directed arcs, paths
  • State-space graphs:
    • States are vertices
    • operators are directed arcs
    • solution is a path from start to goal
  • Problem solving activity:
    • Generate a part of the search space that contains a solution State-space:
      1. A set of states
      2. A set of “operators”/transitions
      3. A start state S
      4. A set of possible goal states
      5. Cost path 271 - fall 2016

• Observable, start in #5.

Solution?

15

Example: vacuum world

Vacuum world state space graph

17

Example: vacuum world

• Unobservable, start in

{ 1,2,3,4,5,6,7,8 } e.g.,

Solution?

18

20

The Traveling Salesperson Problem

• Find the shortest tour that visits all cities without

visiting any city twice and return to starting point.

• State:

– sequence of cities visited

• S

= A

C A D E F B 271 - fall 2016