Uninformed Search Strategies

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
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.
Blind Search by Prof. Jean-Claude Latombe
Properties of breadth-first search Complete? Yes (if b is finite) Time? 1+b+b 2 +b 3 +… +b d + b(b d -1) = O(b d+1 ) Space? O(b d+1 ) (keeps every node.
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.
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.
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.
Artificial Intelligence for Games Depth limited search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
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
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
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.
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;
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.
Implementation: General Tree Search
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3 Problem Solving through search 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.
Problem solving and search
Artificial Intelligence (CS 370D)
Uninformed Search Introduction to Artificial Intelligence
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
Solving problems by searching
CS 188: Artificial Intelligence Spring 2007
EA C461 – Artificial Intelligence
Artificial Intelligence
Searching for Solutions
Principles of Computing – UFCFA3-30-1
Problem Spaces & Search
Problem Spaces & Search
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Solving Problems by Searching
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

Uninformed Search Strategies What are the four things known in the problem definition?

Uninformed Search Strategies What are the four things known in the problem definition? Start State Successor Functions Goal State Path Cost

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

With a neighbor List the type of search domain where breadth first is a good solution. A bad solution List the type of search domain where depth first sear is a good solution.

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

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time?? 1 + b + b2 + b3 + … + bd + b(bd – 1) = O( bd+1 ), ie, exp. in d Space?? O( bd+1 ) (keep every node in memory) Optimal?? Yes (if cost = 1 per step); not optimal in general Space is the big problem: can easily generate nodes at 10MB/sec, so 24hours = 860GB.

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time?? 1 + b + b2 + b3 + … + bd + b(bd – 1) = O( bd+1 ), ie, exp. in d Space?? O( bd+1 ) (keep every node in memory) Optimal?? Yes (if cost = 1 per step); not optimal in general Space is the big problem: can easily generate nodes at 10MB/sec, so 24hours = 860GB.

Problem Solving Agents

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete??

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost 

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time??

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time?? # of nodes with g  cost of optimal solution, O(b C*/) where C* is cost of optimal solution

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time?? # of nodes with g  cost of optimal solution, O(b C*/) where C* is cost of optimal solution Space??

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time?? # of nodes with g  cost of optimal solution, O(b C*/) where C* is cost of optimal solution Space?? # of nodes with g  cost of optimal solution, O(b C*/)

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time?? # of nodes with g  cost of optimal solution, O(b C*/) where C* is cost of optimal solution Space?? # of nodes with g  cost of optimal solution, O(b C*/) Optimal??

Uniform-cost Search Expand least-cost unexpanded node Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if step costs all equal Complete?? Yes, if step cost  Time?? # of nodes with g  cost of optimal solution, O(b C*/) where C* is cost of optimal solution Space?? # of nodes with g  cost of optimal solution, O(b C*/) Optimal?? Yes – nodes expanded in increasing order of g(n)

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path complete in finite spaces Time?? O(bm): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space?? O(bm), I.e., linear space! Optimal?? No

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path complete in finite spaces Time?? O(bm): : terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space?? O(bm), I.e., linear space! Optimal?? No

Depth-limited Search = depth-first search with depth limit L, i.e., nodes at depth L have no successors Recursive implementation:

Iterative Deepening Search

Iterative Deepening Search l = 0 Limit = 0

Iterative Deepening Search l = 1 Limit = 1

Iterative Deepening Search l = 2 Limit = 2

Iterative Deepening Search l = 3 Limit = 3

Properties of Iterative Deepening Search Complete??

Properties of Iterative Deepening Search Complete?? Yes Time??

Properties of Iterative Deepening Search Complete?? Yes Time?? (d+1)b0 + db1 + (d-1)b2 + … + bd = O(bd) Space??

Properties of Iterative Deepening Search Complete?? Yes Time?? (d+1)b0 + db1 + (d-1)b2 + … + bd = O(bd) Space?? O(bd) Optimal??

Properties of Iterative Deepening Search Complete?? Yes Time?? (d+1)b0 + db1 + (d-1)b2 + … + bd = O(bd) Space?? O(bd) Optimal?? Yes, if step cost = 1 Can be modified to explore uniform-cost tree Numerical comparison for b=10 and d=5, solution at far right: N(IDS) = 50 + 400 + 3,000 + 20,000 + 100,000 = 123,450 N(BFS) = 10 + 100 + 1,000 + 10,000 + 100,000 + 999,990 = 1,111,100

So let’s try it again… Consider a state space where the start state is number 1 and the successor function for state n returns two states, numbers 2n and 2n+1. Suppose the goal state is 11. List the order in which nodes will be visited in depth limited search with limit 4 For iterative deepening.

Solution Depth Limited, l=3 Iterative Deepening 1, 2, 4, 8, 16, 17, 9, 18, 19, 5, 10, 20, 21, 11 Iterative Deepening 1, 1, 2, 3, 1, 2, 4, 5, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 11

Summary of algorithms

PA #1 Light’s Out Turn off all of the lights. But switching one light switches all lights immediately adjacent to it.

PA#1 You can play a version online at: http://www.2flashgames.com/play/f-35.htm

PA #1 READ the specific requirements Can use any language that I can run in the labs. (But I strongly suggest python or Java). Should print an optimal path, the number of nodes considered so far, and the number of nodes in memory at the end. Must follow naming conventions listed in assignment. (File named LightsOut, method named search)

PA #1

PA #1