Pengantar Kecerdasan Buatan 4 - Informed Search and Exploration AIMA Ch. 3.5 – 3.6.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Informed search algorithms
Review: Search problem formulation
Informed Search Algorithms
Notes Dijstra’s Algorithm Corrected syllabus.
Informed search algorithms
An Introduction to Artificial Intelligence
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
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*
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Informed search.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
Artificial Intelligence
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2005.
Cooperating Intelligent Systems Informed search Chapter 4, AIMA.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Cooperating Intelligent Systems Informed search Chapter 4, AIMA 2 nd ed Chapter 3, AIMA 3 rd ed.
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
Problem Solving and Search in AI Heuristic Search
CSC344: AI for Games Lecture 4: Informed search
Cooperating Intelligent Systems Informed search Chapter 4, AIMA 2 nd ed Chapter 3, AIMA 3 rd ed.
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
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
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 (Heuristic) Search
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search.
Informed search algorithms
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.
CS 380: Artificial Intelligence Lecture #4 William Regli.
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.
Chapter 4 Informed/Heuristic Search
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.
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
CSC3203: AI for Games Informed search (1) Patrick Olivier
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:
Heuristic Search Foundations of Artificial Intelligence.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
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.
Reading Material Sections 3.3 – 3.5 Sections 4.1 – 4.2 “Optimal Rectangle Packing: New Results” By R. Korf (optional) “Optimal Rectangle Packing: A Meta-CSP.
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.
Last time: Problem-Solving
Heuristic Search Introduction to Artificial Intelligence
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
Informed Search.
Presentation transcript:

Pengantar Kecerdasan Buatan 4 - Informed Search and Exploration AIMA Ch. 3.5 – 3.6

Review : Tree Search A search strategy is defined by picking the order of node expansion OSCAR KARNALIM, S.T., M.T. 2

Best-first Search Idea: use an evaluation function f(n) for each node estimate of "desirability" Expand most desirable unexpanded node Implementation: Order the nodes in fringe in decreasing order of desirability Special cases: Greedy best-first search A* search OSCAR KARNALIM, S.T., M.T. 3

Heuristic Heuristic are criteria, methods, or principle for deciding among several course of action promises to be the most effective in order to reach some goal h(n) = estimated cost of the cheapest path from node n to a goal node OSCAR KARNALIM, S.T., M.T. 4

Greedy Best-first Search Evaluation function f(n) = h(n) Greedy best-first search expands the node that appears to be closest to goal e.g.in Bucharest Problem, h SLD (n) = straight-line distance from n to Bucharest OSCAR KARNALIM, S.T., M.T. 5

Romania with Step Costs in KM OSCAR KARNALIM, S.T., M.T. 6

Greedy Best-first Search Example OSCAR KARNALIM, S.T., M.T. 7

Greedy Best-first Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 8

Greedy Best-first Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 9

Greedy Best-first Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 10

Properties of Greedy Best-first Search  Complete? No – can get stuck in loops, e.g., Iasi  Neamt  Iasi  Neamt   Time? O(b m ), but a good heuristic can give dramatic improvement  Space? O(b m ) -- keeps all nodes in memory  Optimal? No OSCAR KARNALIM, S.T., M.T. 11

A* Search  Idea: avoid expanding paths that are already expensive  Evaluation function f(n) = g(n) + h(n)  g(n) = cost so far to reach n  h(n) = estimated cost from n to goal  f(n) = estimated total cost of path through n to goal OSCAR KARNALIM, S.T., M.T. 12

A* Search Example OSCAR KARNALIM, S.T., M.T. 13

A* Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 14

A* Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 15

A* Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 16

A* Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 17

A* Search Example (Cont) OSCAR KARNALIM, S.T., M.T. 18

Admissible Heuristics  A heuristic h(n) is admissible if for every node n, h(n) ≤ h * (n), where h * (n) is the true cost to reach the goal state from n.  An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic  Example: h SLD (n) (never overestimates the actual road distance)  Theorem: If h(n) is admissible, A * using TREE-SEARCH is optimal OSCAR KARNALIM, S.T., M.T. 19

Consistent Heuristics  A heuristic is consistent if for every node n, every successor n' of n generated by any action a, h(n) ≤ c(n,a,n') + h(n') Theorem: If h(n) is consistent, A* using GRAPH-SEARCH is optimal OSCAR KARNALIM, S.T., M.T. 20

Properties of A* Complete? Yes Time? Exponential Space? Keeps all nodes in memory Optimal? Yes OSCAR KARNALIM, S.T., M.T. 21

Iterative-deepening A* (IDA*) Adapt the idea of iterative deepening to the heuristic search context The main difference between IDA* and standard iterative deepening is that the cutoff used is the f -cost (g + h) rather than the depth The cutoff value is the smallest f -cost of any node that exceeded the cutoff on the previous iteration OSCAR KARNALIM, S.T., M.T. 22

Properties of IDA* Complete? Yes Time? DFS Space? DFS Optimal? Yes OSCAR KARNALIM, S.T., M.T. 23

Recursive best-first search (RBFS) Simple recursive algorithm that attempts to mimic the operation of standard best-first search, but using only linear space Its structure is similar to that of a recursive DFS, but rather than continuing indefinitely down the current path, it keeps track of the f-value of the best alternative path available from any ancestor of the current node OSCAR KARNALIM, S.T., M.T. 24

Recursive best-first search (RBFS) (Cont) If the current node exceeds this limit, the recursion unwinds back to the alternative path As the recursion unwinds, RBFS replaces the f -value of each node along the path with the best f -value of its children In this way, RBFS remembers the f -value of the best leaf in the forgotten subtree and can therefore decide whether it's worth reexpanding the subtree at some later time OSCAR KARNALIM, S.T., M.T. 25

RBFS search for the shortest route to Bucharest The path via Rimnicu Vilcea is followed until the current best leaf (Pitesti) has a value that is worse than the best alternative path (Fagaras) OSCAR KARNALIM, S.T., M.T. 26

RBFS search for the shortest route to Bucharest (Cont) The recursion unwinds and the best leaf value of the forgotten subtree (417) is backed up to Rimnicu Vilcea; then Fagaras is expanded, revealing a best leaf value of 450 OSCAR KARNALIM, S.T., M.T. 27

RBFS search for the shortest route to Bucharest (Cont) The recursion unwinds and the best leaf value of the forgotten subtree (450) is backed up to Fagaras; then Rirnnicu Vilcea is expanded This time, because the best alternative path (through Timisoara) costs at least 447, the expansion continues to Bucharest OSCAR KARNALIM, S.T., M.T. 28

Simplified Memory-bounded A* (SMA*) SMA* proceeds just like A*, expanding the best leaf until memory is full SMA* always drops the worst leaf node-the one with the highest f-value SMA* then backs up the value of the forgotten node to its parent OSCAR KARNALIM, S.T., M.T. 29

Simplified Memory-bounded A* (SMA*) (Cont) In this way, the ancestor of a forgotten subtree knows the quality of the best path in that subtree With this information, SMA* regenerates the subtree only when all other paths have been shown to look worse than the path it has forgotten OSCAR KARNALIM, S.T., M.T. 30

Relaxed Problem  A problem with fewer restrictions on the actions is called a relaxed problem  The cost of an optimal solution to a relaxed problem is an admissible heuristic for the original problem OSCAR KARNALIM, S.T., M.T. 31

Admissible Heuristics in 8-Puzzle E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance (i.e., no. of squares from desired location of each tile)  h 1 (S) = ? 8  h 2 (S) = ? = 18  Cost = 1 for each move of blank tile OSCAR KARNALIM, S.T., M.T. 32 Alternatif PR-1: Diketahui bahwa kotak kosong bisa bergerak ke: atas, bawah, kiri atau kanan. Gunakan salah satu heuristik di samping untuk mencari kemungkinan langkah terbaik untuk mencapai goal dengan A*. Batasi ruang pencarian pada kedalaman 3.

Path Finding OSCAR KARNALIM, S.T., M.T. 33 Real Cost Heuristics Alternatif PR-2: Jelaskan bagaimana A* terbentuk dalam gambar di bawah ini