Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.

Slides:



Advertisements
Similar presentations
Solving problems by searching
Advertisements

A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
Solving Problem by Searching
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
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.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
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.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Artificial Intelligence (CS 461D)
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.
Problem Solving by Searching
CPSC 322 Introduction to Artificial Intelligence October 27, 2004.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
Using Search in Problem Solving
Solving problems by searching
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
Solving Problems by Searching
Informed Search Idea: be smart about what paths to try.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
1 Solving problems by searching 171, Class 2 Chapter 3.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Supplemental slides for CSE 327 Prof. Jeff Heflin
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
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;
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
Solving problems by searching A I C h a p t e r 3.
Ch. 4 – Informed Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3: Search, A*
Solving problems by searching Uninformed search algorithms Discussion Class CS 171 Friday, October, 2nd (Please read lecture topic material before and.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Solving problems by searching Chapter 3. Types of agents Reflex agent Consider how the world IS Choose action based on current percept Do not consider.
Review: Tree search Initialize the frontier using the starting state
Solving problems by searching
Last time: Problem-Solving
Depth-First Searches Introduction to AI.
Warm-up: DFS Graph Search
CPSC 322 Introduction to Artificial Intelligence
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
Supplemental slides for CSE 327 Prof. Jeff Heflin
HW 1: Warmup Missionaries and Cannibals
Artificial Intelligence: Theory and Practice Ch. 3. Search
Informed Search Idea: be smart about what paths to try.
Supplemental slides for CSE 327 Prof. Jeff Heflin
Depth-First Searches.
Presentation transcript:

Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin

8-Puzzle Transition Model blank-rightblank-downblank-leftblank-up state s actions a RESULT(s,a)

8-puzzle Search Tree initial state

function T REE -S EARCH (problem) returns a solution, or failure initialize the frontier using the initial state of problem loop do if the frontier is empty then return failure choose a leaf node and remove it from the frontier if the node contains a goal state then return the corresponding solution expand the chosen node, adding the resulting nodes to the frontier Tree Search Algorithm From Figure 3.7, p. 77

Repeated States A CB C A State space Search tree B GC A BGCBA GBA initial state goal state

function G RAPH -S EARCH (problem) returns a solution, or failure initialize the frontier using the initial state of problem initialize the explored set to be empty loop do if the frontier is empty then return failure choose a leaf node and remove it from the frontier if the node contains a goal state then return the corresponding solution add the node to the explored set expand the chosen node, adding the resulting nodes to the frontier, but only if not in the frontier or explored set Graph Search Algorithm From Figure 3.7, p. 77

Depth-first Search A CB DEF H G I not generated on frontier in memory deleted

Breadth-first Search A CB DEF H G I not generated on frontier in memory deleted

Uniform Cost Search I GB G I B G State space Search tree g(n)=0 g(n)=4 g(n)=10 g(n)=9 C 3 C g(n)=7 3 not generated on frontier in memory deleted

Uninformed Search Summary depth-firstbreadth-firstuniform cost queuingadd to front (LIFO) add to back (FIFO)by path cost complete?noyesyes, if all step costs are greater than 0 optimal?noyes, if identical step costs yes, if all step costs are greater than 0 timeexpensive spacemodestexpensive

A* Example Use A* to solve the 8-puzzle: initial state: goal state: Consider these heuristics –H 1 : The number of tiles out of place –H 2 : Sum of distances of tiles from goal positions Ignore moves that return you to the previous state path cost is the total number of moves made

A* on 8-puzzle f=0+3=3 f=1+3=4 f=2+4=6 f=2+2=4 f=2+3=5f=2+4=6 f=3+3=6 f=3+1=4 f=4+2=6f=4+0= Heuristic = H 1 Whether or not this node is expanded depends on how you break ties. It could be expanded at any time or not at all.

A* on 8-puzzle f=0+4=4 f=1+3=4 f=1+5=6 f=2+4=6f=2+2=4 f=3+3=6 f=3+1=4 f=4+2=6f=4+0= Heuristic = H 2

Summary of Search Algorithms typeorderingoptimal?complete?efficient? depth-firstuninformedLIFOno if lucky breadth-firstuninformedFIFOyes a yesno uniform costuninformedg(n)yes b no greedyinformedh(n)no usually A*informedg(n)+h(n)yes c yes b yes a – if step costs are identical b – if step costs > 0 c – if heuristic is admissible and consistent