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

Slides:



Advertisements
Similar presentations
Solving problems by searching
Advertisements

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.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
Artificial Intelligence Problem Solving Eriq Muhammad Adams
Comp 307 Problem Solving and Search Formalize a problem as State Space Search Blind search strategies Heuristic search.
Problem Solving and Search Andrea Danyluk September 9, 2013.
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.
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.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
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
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
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
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
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.
Informed Search Strategies
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
Problem Solving and Search Andrea Danyluk September 11, 2013.
CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #3 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
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.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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.
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.
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.
Informed Search Reading: Chapter 4.5 HW #1 out today, due Sept 26th.
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 3 –Problem Solving Agents State space search –Programming Assignment Thursday.
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.
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
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.
ARTIFICIAL INTELLIGENCE
Solving problems by searching
Last time: Problem-Solving
Informed Search Idea: be smart about what paths to try.
Supplemental slides for CSE 327 Prof. Jeff Heflin
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
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

Problem Solving Agent Algorithm function S IMPLE -P ROBLEM -S OLVING -A GENT (percept) returns an action persistent: seq, an action sequence, initially empty state, some description of the current world state goal, a goal, initially null problem, a problem formulation state  U PDATE -S TATE (state,percept) if seq is empty then goal  F ORMULATE -G OAL (state) problem  F ORMULATE -P ROBLEM (state,goal) seq  S EARCH (problem) if seq = failure then return a null action action  F IRST (seq) seq  R EST (seq) return action From Figure 3.1, p. 67

Water Jug Problem state: initial state: goal test: –x and y can be any value path cost: –1 per solution step? –1 per gallon of water moved? actions/successor function –let C 12 =12, C 8 =8, C 3 =3 fill-jug-i –if J i < C i then J i =C i empty-jug-i-into-jug-j –if J i <= C j – J j then J j ’ = J j + J i, J i ’=0 fill-jug-i-from-jug-j –if J j >= C i – J i then J j ’ = J j – (C i – J i ), J i ’=C i

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

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

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