UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Search Search plays a key role in many parts of AI. These algorithms provide the conceptual backbone of almost every approach to the systematic exploration.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Uninformed search strategies
Solving problems by searching Chapter 3 Artificial Intelligent Team Teaching AI (created by Dewi Liliana) PTIIK 2012.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Artificial Intelligence Solving problems by searching
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Uninformed (also called blind) search algorithms) This Lecture Chapter Next Lecture Chapter (Please read lecture topic material before.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
Artificial Intelligence Chapter 3: Solving Problems by Searching
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Solving problems by searching
1 Lecture 3 Uninformed Search
Lecture 3 Uninformed Search.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
1 search CS 331/531 Dr M M Awais REPRESENTATION METHODS Represent the information: Animals are generally divided into birds and mammals. Birds are further.
Pengantar Kecerdasan Buatan
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Problem Solving by Searching
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Lecture 3 Problem Solving through search Uninformed Search
Lecture 3: Uninformed Search
Problem Solving Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Solving problems by searching
Artificial Intelligence
Searching for Solutions
Principles of Computing – UFCFA3-30-1
Solving Problems by Searching
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

UNINFORMED SEARCH

Problem - solving agents

Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest

What do we need to define ?

Problem Formulation  The process of defining actions, states and goal.  States :  Cities ( e. g. Arad, Sibiu, Bucharest, etc )  Actions :  GoTo ( adjacent city )  Goal :  Bucharest Why not “turn left 5 degrees” or “walk 100 meters forward…”?

Abstraction  The process of removing details from a representation.  Simplifies the problem  Makes problems tractable ( possible to solve )  Humans are great at this !  Imagine a hierarchy in which another agent takes care of the lower level details, such as navigating from the city center to the highway.

Back to Arad…  We are in Arad and need to find our way to Bucharest.

Step 1 – Check Goal Condition  Check, are we at the goal ?  ( obviously not in this case, but we need to check in case we were )

Step 2 – Expand Current Node  Enumerate all the possible actions you could take from the current state  Formally : apply each legal action to the current state, thereby generating a new set of states.  From Arad can go to :  Sibiu  Timisoara  Zerind

Step 3 – Select which action to perform  Perform one of the possible actions ( e. g. GoTo ( Sibiu ))  Then go back to Step 1 and repeat.

This is an example of Tree Search  Exploration of state space by generating successors of already - explored states ( a. k. a. expanding states )  Usually performed offline, as a simulation  Returns the sequence of actions that should be performed to reach the goal, or that the goal is unreachable.

Example : Romania

Tree Search

Tree search example

Tree search example : start with Sibiu

Tree search example : need to process the descendants of Sibiu Note that we can loop back to Arad. Have to make sure we don’t go in circles forever!

Tree search algorithms

Implementation : general tree search a.k.a. frontier

This is the part that distinguishes different search strategies

Search strategies  A search strategy is defined by picking the order of node expansion

Uninformed search strategies  Uninformed search strategies use only the information available in the problem definition  What does it mean to be uninformed ?  You only know the topology of which states are connected by which actions. No additional information.  Later we ’ ll talk about informed search, in which you can estimate which actions are likely to be better than others.

Breadth - first search  Expand shallowest unexpanded node  Implementation :  Fringe is a FIFO queue, i. e., new successors go at end

Breadth - first search  Expand shallowest unexpanded node  Implementation :  Fringe is a FIFO queue, i. e., new successors go at end

Breadth - first search  Expand shallowest unexpanded node  Implementation :  Fringe is a FIFO queue, i. e., new successors go at end

Breadth - first search  Expand shallowest unexpanded node  Implementation :  Fringe is a FIFO queue, i. e., new successors go at end

BFS on a Graph

Search Strategy Evaluation : finding solutions  Strategies are evaluated along the following dimensions :  completeness : does it always find a solution if one exists ?  optimality : does it always find a least - cost solution ?

Search Strategy Evaluation : complexity ( cost )  Two types of complexity  time complexity : number of nodes visited  space complexity : maximum number of nodes in memory  Time and space complexity are measured in terms of  b : maximum branching factor of the search tree ( may  ∞ )  d : depth of the least - cost solution  m : maximum depth of the state space ( may be ∞ )

Properties of breadth - first search  Complete ?  Yes ( if b is finite )  Optimal ?  Yes ( if cost = 1 per step )  Time ?  1+ b + b 2 + b 3 + … + b d = O ( b d )  Space ?  O ( b d ) ( keeps every node in memory )

Problems of breadth first search  Space is the biggest problem ( more than time )  Example from book, BFS b =10 to depth of 10  3 hours ( not so bad )  10 terabytes of memory ( really bad )  Only reason speed is not a problem is you run out of memory first

Problems of breadth first search  BFS is not optimal if the cost of some actions is greater than others…

Uniform - cost search  For graphs with actions of different cost  Equivalent to breadth - first if step costs all equal  Expand least - cost unexpanded node  Implementation :  fringe = queue sorted by path cost g ( n ), from smallest to largest ( i. e. a priority queue )

Uniform - cost search

 Complete ?  Yes, if step cost ≥ ε  Time ?  O ( b ceiling ( C */ ε ) ) where C * is the cost of the optimal solution  Space ?  # of nodes with g ≤ cost of optimal solution, O ( b ceiling ( C */ ε ) )  Optimal ?  Yes – nodes expanded in increasing order of g ( n ) See book for detailed analysis.

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front ( i. e. a stack )

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front

Depth - first search  Expand deepest unexpanded node  Implementation :  fringe = LIFO queue, i. e., put successors at front

This is the part that distinguishes different search algorithms

Search Solution  Each node needs to keep track of its parent  Once the goal is found, traverse up the tree to the root to find the solution

Properties of depth - first search  Complete ?  No : fails in infinite - depth spaces  Yes : in finite spaces  Optimal ?  No  Time ?  O ( b m ): ( m is max depth of state space )  terrible if m is much larger than d  but if solutions are plentiful, may be much faster than breadth - first  Space ?  O ( bm ), i. e., linear space !

Depth - limited search  depth - first search with depth limit l ( i. e., don ’ t expand nodes past depth l )  … will fail if the goal is below the depth limit

Iterative deepening search

Iterative deepening search l =0

Iterative deepening search l =1

Iterative deepening search l =2

Iterative deepening search l =3

Properties of iterative deepening search  Complete ?  Yes  Time ?  ( d +1) b 0 + d b 1 + ( d -1) b 2 + … + b d = O ( b d )  Space ?  O ( bd )  Optimal ?  Yes, if step cost = 1

Bidirectional Search  Run two simultaneous searches  One forward from the start  One backward from the goal  Hope that the searches meet in the middle  b d /2 + b d /2 << b d

Summary of algorithms

Graph search The closed set keeps track of loops in the graph so that the search terminates.

Questions ? Waitlisted ? Talk to me after class.