SE 420 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Chapter 4: Informed Heuristic Search
Lights Out Issues Questions? Comment from me.
Informed search algorithms
Review: Search problem formulation
Informed Search Algorithms
Notes Dijstra’s Algorithm Corrected syllabus.
Informed search strategies
Informed search algorithms
An Introduction to Artificial Intelligence
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Solving Problem by Searching
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
Artificial Intelligence Spring 2009
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.
Problem Solving by Searching
Review: Search problem formulation
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
CSC344: AI for Games Lecture 4: Informed search
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:
Rutgers CS440, Fall 2003 Heuristic search Reading: AIMA 2 nd ed., Ch
Informed search algorithms
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
Informed search algorithms
Informed search algorithms
2013/10/17 Informed search A* algorithm. Outline 2 Informed = use problem-specific knowledge Which search strategies? Best-first search and its variants.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
CHAPTER 4: INFORMED SEARCH & EXPLORATION Prepared by: Ece UYKUR.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 3 Informed Search and Exploration Instructor: Alireza Tavakkoli September 10, 2009 University.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
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.
CSC3203: AI for Games Informed search (1) Patrick Olivier
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Informed Search I (Beginning of AIMA Chapter 4.1)
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Pengantar Kecerdasan Buatan 4 - Informed Search and Exploration AIMA Ch. 3.5 – 3.6.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
Informed Search CSE 473 University of Washington.
Heuristic Search Foundations of Artificial Intelligence.
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Review: Tree search Initialize the frontier using the starting state
Last time: Problem-Solving
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
CS 4100 Artificial Intelligence
Informed search algorithms
Informed search algorithms
Artificial Intelligence
Artificial Intelligence
Solving Problems by Searching
Informed Search.
Presentation transcript:

SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation: Initial state ? Problem types: single state:accessible and deterministic environment multiple state:? contingency:? exploration:?

SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation: Initial state Operators Goal test Path cost Problem types: single state:accessible and deterministic environment multiple state:? contingency:? exploration:?

SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation: Initial state Operators Goal test Path cost

SE Last time: Finding a solution Function General-Search(problem, strategy) returns a solution, or failure initialize the search tree using the initial state problem loop do if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution else expand the node and add resulting nodes to the search tree end Solution: is ??? Basic idea: offline, systematic exploration of simulated state-space by generating successors of explored states (expanding)

SE Last time: Finding a solution Function General-Search(problem, strategy) returns a solution, or failure initialize the search tree using the initial state problem loop do if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution else expand the node and add resulting nodes to the search tree end Solution: is a sequence of operators that bring you from current state to the goal state. Basic idea: offline, systematic exploration of simulated state-space by generating successors of explored states (expanding). Strategy: The search strategy is determined by ???

SE Last time: Finding a solution Function General-Search(problem, strategy) returns a solution, or failure initialize the search tree using the initial state problem loop do if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution else expand the node and add resulting nodes to the search tree end Solution: is a sequence of operators that bring you from current state to the goal state Basic idea: offline, systematic exploration of simulated state-space by generating successors of explored states (expanding) Strategy: The search strategy is determined by the order in which the nodes are expanded.

SE A Clean Robust Algorithm Function UniformCost-Search(problem, Queuing-Fn) returns a solution, or failure open  make-queue(make-node(initial-state[problem])) closed  [empty] loop do if open is empty then return failure currnode  Remove-Front(open) if Goal-Test[problem] applied to State(currnode) then return currnode children  Expand(currnode, Operators[problem]) while children not empty [… see next slide …] end closed  Insert(closed, currnode) open  Sort-By-PathCost(open) end

SE A Clean Robust Algorithm [… see previous slide …] children  Expand(currnode, Operators[problem]) while children not empty child  Remove-Front(children) if no node in open or closed has child’s state open  Queuing-Fn(open, child) else if there exists node in open that has child’s state if PathCost(child) < PathCost(node) open  Delete-Node(open, node) open  Queuing-Fn(open, child) else if there exists node in closed that has child’s state if PathCost(child) < PathCost(node) closed  Delete-Node(closed, node) open  Queuing-Fn(open, child) end [… see previous slide …]

SE Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first Depth-limited Iterative deepening Informed: Use heuristics to guide the search Best first Greedy search A*

SE Evaluation of search strategies Search algorithms are commonly evaluated according to the following four criteria: Completeness: does it always find a solution if one exists? Time complexity: how long does it take as a function of number of nodes? Space complexity: how much memory does it require? Optimality: does it guarantee the least-cost solution? Time and space complexity are measured in terms of: b – max branching factor of the search tree d – depth of the least-cost solution m – max depth of the search tree (may be infinity)

SE Last time: uninformed search strategies Uninformed search: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first Depth-limited Iterative deepening

SE This time: informed search Informed search: Use heuristics to guide the search Best first Greedy search A*

SE Best-first search Idea: use an evaluation function for each node; estimate of “desirability”  expand most desirable unexpanded node. Implementation: QueueingFn = insert successors in decreasing order of desirability Special cases: greedy search A* search

SE Romania with step costs in km

SE Greedy search Estimation function: h(n) = estimate of cost from n to goal (heuristic) For example: h SLD (n) = straight-line distance from n to Bucharest Greedy search expands first the node that appears to be closest to the goal, according to h(n).

SE

SE

SE

SE

SE Properties of Greedy Search Complete? Time? Space? Optimal?

SE Properties of Greedy Search Complete?No – can get stuck in loops e.g., Iasi > Neamt > Iasi > Neamt > … Complete in finite space with repeated-state checking. Time?O(b^m) but a good heuristic can give dramatic improvement Space?O(b^m) – keeps all nodes in memory Optimal?No.

SE A* search Idea: avoid expanding paths that are already expensive evaluation function: f(n) = g(n) + h(n)with: g(n) – cost so far to reach n h(n) – estimated cost to goal from n f(n) – estimated total cost of path through n to goal A* search uses an admissible heuristic, that is, h(n)  h*(n) where h*(n) is the true cost from n. For example: h SLD (n) never overestimates actual road distance. Theorem: A* search is optimal

SE

SE

SE

SE

SE

SE

SE Optimality of A* (standard proof) Suppose some suboptimal goal G 2 has been generated and is in the queue. Let n be an unexpanded node on a shortest path to an optimal goal G 1.

SE Optimality of A* (more useful proof)

SE f-contours How do the contours look like when h(n) =0?

SE Properties of A* Complete? Time? Space? Optimal?

SE Properties of A* Complete?Yes, unless infinitely many nodes with f  f(G) Time?Exponential in [(relative error in h) x (length of solution)] Space?Keeps all nodes in memory Optimal?Yes – cannot expand f i+1 until f i is finished

SE Proof of lemma: pathmax

SE Admissible heuristics

SE Admissible heuristics

SE Relaxed Problem Admissible heuristics can be derived from the exact solution cost of a relaxed version of the problem. If the rules of the 8-puzzle are relaxed so that a tile can move anywhere, then h 1 (n) gives the shortest solution. If the rules are relaxed so that a tile can move to any adjacent square, then h 2 (n) gives the shortest solution.