Lecture 3 Problem Solving through search Uninformed Search

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Uninformed search strategies
Lecture 3: Uninformed Search
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.
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 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Implementation and Evaluation of Search Methods. Use a stack data structure. 1. Push root node of tree on the stack. 2. Pop the top node off the stack.
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.
Artificial Intelligence (CS 461D)
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Review: Search problem formulation
Searching the search space graph
UnInformed Search What to do when you don’t know anything.
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Lecture 3: Uninformed Search
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.
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.
Uninformed Search Methods
Implementation: General Tree Search
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
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.
Chapter 3 (Part-II) Section 3.4, 3.5, 3.6 Uninformed Search.
Lecture 3: Uninformed Search
Uninformed (also called blind) search algorithms)
Problem Solving Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Last time: Problem-Solving
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Problem Solving as Search
Artificial Intelligence (CS 370D)
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
Solving problems by searching
CS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Fall 2008
SOLVING PROBLEMS BY SEARCHING
Problem Solving and Searching
What to do when you don’t know anything know nothing
EA C461 – Artificial Intelligence
Artificial Intelligence
Searching for Solutions
Problem Solving and Searching
Principles of Computing – UFCFA3-30-1
Problem Spaces & Search
Problem Spaces & Search
UNINFORMED SEARCH -BFS -DFS -DFIS - Bidirectional
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Solving Problems by Searching
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

Lecture 3 Problem Solving through search Uninformed Search

What are problem solving ?

What are problem solving ?

Problem definition

Problem definition

Problem space

Problem space

State

Search Algorithms Uninformed Blind search Informed Heuristic search Breadth-first uniform first depth-first Iterative deepening depth-first Bidirectional Branch and Bound Informed Heuristic search Greedy search, hill climbing, Heuristics Important concepts: Completeness. Time complexity. Space complexity. Quality of solution.

Uninformed search strategies Uninformed search strategies use only the information available in the problem definition. Breadth-first search. Depth-first search. Uniform-cost search. Iterative deepening search.

Search Strategies A search strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: completeness: does it always find a solution if one exists? time complexity: number of nodes generated space complexity: maximum number of nodes in memory optimality: does it always find a least-cost solution? Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be ∞)

Breadth-First Search (BFS) Expand shallowest unexpanded node Fringe: nodes waiting in a queue to be explored, also called OPEN Implementation: For BFS, fringe is a first-in-first-out (FIFO) queue new successors go at end of the queue Repeated states? Simple strategy: do not add parent of a node as a leaf

Example: Map Navigation State Space: S = start, G = goal, other nodes = intermediate states, links = legal transitions S G A B D E C F

BFS Search Tree S S G A B D E C F Queue = {S} Select S Goal(S) = true? If not, Expand(S)

BFS Search Tree S A D S G A B D E C F Queue = {A, D} Select A Goal(A) = true? If not, Expand(A)

BFS Search Tree S A D B D S G A B D E C F Queue = {D, B, D} Select D Goal(D) = true? If not, expand(D) B D

BFS Search Tree S A D B D A E S G A B D E C F Queue = {B, D, A, E} Select B etc. B D A E

BFS Search Tree S A D B D A E C E S E S B B F S G A B D E C F Level 3 Queue = {C, E, S, E, S, B, B, F}

BFS Search Tree S A D B D A E C E S E S B B F D F A B F D C E A C G S Level 4 Expand queue until G is at front Select G Goal(G) = true

Depth-First Search (BFS) Expand deepest unexpanded node Implementation: For DFS, fringe is a first-in-first-out (FIFO) queue new successors go at beginning of the queue Repeated nodes? Simple strategy: Do not add a state as a leaf if that state is on the path from the root to the current node

DFS Search Tree S G A B D E C F S A D Queue = {A,D}

DFS Search Tree S G A B D E C F S A D B D Queue = {B,D,D}

DFS Search Tree S G A B D E C F S A D B D Queue = {C,E,D,D} C E

DFS Search Tree S G A B D E C F S A D B D Queue = {D,F,D,D} C E D F

DFS Search Tree S G A B D E C F S A D B D Queue = {G,D,D} C E D F G

Evaluation of Search Algorithms Completeness does it always find a solution if one exists? Optimality does it always find a least-cost (or min depth) solution? Time complexity number of nodes generated (worst case) Space complexity number of nodes in memory (worst case) Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be ∞)

Breadth-First Search (BFS) Properties Complete? Yes Optimal? Only if path-cost = non-decreasing function of depth Time complexity O(bd) Space complexity O(bd) Main practical drawback? exponential space complexity

Complexity of Breadth-First Search Time Complexity assume (worst case) that there is 1 goal leaf at the RHS at depth d so BFS will generate = b + b2+ ..... + bd + bd+1 - b = O (bd+1) Space Complexity how many nodes can be in the queue (worst-case)? at depth d there are bd+1 unexpanded nodes in the Q = O (bd+1) d=0 d=1 d=2 G d=0 d=1 d=2 G

Examples of Time and Memory Requirements for Breadth-First Search Assuming b=10, 10000 nodes/sec, 1kbyte/node Depth of Nodes Solution Generated Time Memory 2 1100 0.11 seconds 1 MB 4 111,100 11 seconds 106 MB 8 109 31 hours 1 TB 12 1013 35 years 10 PB

What is the Complexity of Depth-First Search? Time Complexity maximum tree depth = m assume (worst case) that there is 1 goal leaf at the RHS at depth d so DFS will generate O (bm) Space Complexity how many nodes can be in the queue (worst-case)? at depth m we have b nodes and b-1 nodes at earlier depths total = b + (m-1)*(b-1) = O(bm) d=0 d=1 d=2 G d=0 d=1 d=2 d=3 d=4

Examples of Time and Memory Requirements for Depth-First Search Assuming b=10, m = 12, 10000 nodes/sec, 1kbyte/node Depth of Nodes Solution Generated Time Memory 2 1012 3 years 120kb 4 1012 3 years 120kb 8 1012 3 years 120kb 12 1012 3 years 120kb

Depth-First Search (DFS) Properties Complete? Not complete if tree has unbounded depth Optimal? No Time complexity? Exponential Space complexity? Linear