Advanced Artificial Intelligence (DT4019, HT10)

Size: px
Start display at page:

Download "Advanced Artificial Intelligence (DT4019, HT10)"

Transcription

1 Advanced Artificial Intelligence (DT4019, HT10) Problem Solving and Search: Informed Search Strategies (I) Federico Pecora School of Science and Technology Örebro University Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 1 / 36

2 Outline 1 Greedy Best-First Search 2 Consistent Heuristics Admissibility, Consistency and Dominance Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 2 / 36

3 General Implementaiton of Tree Search (I) Function Tree-Search(problem, fringe) returns a solution, or failure fringe insert(make-node(initial-state(problem)), fringe) while true do if fringe = /0 then return failure node remove-front(fringe) if goal-test(problem,state(node)) then return solution(node) fringe insert-all(expand(node, problem), fringe) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 3 / 36

4 General Implementaiton of Tree Search (II) Function expand(node, problem) returns a set of nodes successors /0 foreach action, result sucessor(problem, state(node)) do s a new node set-parent(s, node) set-action(s, action) set-state(s, result) set-path-cost(s, path-cost(node) + c(state(node), action, result)) set-depth(s, depth(node)+1) successors successors {s} return successors Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 4 / 36

5 Strategies in Tree Search A search strategy is defined by picking the order of node expansion Strategies are evaluated along four dimensions Completeness: does it always find a solution if one exists? Time complexity: number of nodes generated/expanded Space complexity: maximum number of nodes in memory Optmiality: does it always find a least-cost solution? Time and space comlexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be ) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 5 / 36

6 Informed Search: Best-First BFS, DFS, DLS, IDS have a fixed strategy for deciding order of node expansion UCS is somewhat more sophisticated, as it takes into account path cost Best-First search: order nodes based on estimate of desirablility define an evaluation function indicating desirability Implementation: fringe is a queue sorted in decreasing order of desirability Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 6 / 36

7 Informed Search: Best-First Measure of desirability : estimated distance to the goal estimate given by a heuristic function h : S N Greedy search order nodes in queue with decreasing h A* search order nodes in queue with combination of h and g i.e., also take into account cost of already explored path Note: UCS orders nodes in queue according to increasing g Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 7 / 36

8 Greedy Best-First Search Outline 1 Greedy Best-First Search 2 Consistent Heuristics Admissibility, Consistency and Dominance Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 8 / 36

9 Greedy Best-First Search Romania with Step Costs in km Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 9 / 36

10 Greedy Best-First Search Greedy Best-First Search Heuristic function: h(n) = estimate of path cost to closest goal Example: h SLD (n) = straight line distance from n to Bucharest Greedy search expands node that appears to be closest to goal Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 10 / 36

11 Greedy Best-First Search Greedy Best-First Search: Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 11 / 36

12 Greedy Best-First Search Greedy Best-First Search: Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 11 / 36

13 Greedy Best-First Search Greedy Best-First Search: Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 11 / 36

14 Greedy Best-First Search Greedy Best-First Search: Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 11 / 36

15 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: Time complexity: Space complexity: Optmiality: Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

16 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: no can get stuck in loops, e.g., Iasi Neamt Iasi Neamt... but complete in finite space with repeated state checking Time complexity: Space complexity: Optmiality: Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

17 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: no can get stuck in loops, e.g., Iasi Neamt Iasi Neamt... but complete in finite space with repeated state checking Time complexity: O(b m ) Space complexity: Optmiality: Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

18 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: no can get stuck in loops, e.g., Iasi Neamt Iasi Neamt... but complete in finite space with repeated state checking Time complexity: O(b m ) Space complexity: O(b m ) (keeps all nodes) Optmiality: Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

19 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: no can get stuck in loops, e.g., Iasi Neamt Iasi Neamt... but complete in finite space with repeated state checking Time complexity: O(b m ) Space complexity: O(b m ) (keeps all nodes) Optmiality: no Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

20 Greedy Best-First Search Greedy Best-First Search: Properties Completeness: no can get stuck in loops, e.g., Iasi Neamt Iasi Neamt... but complete in finite space with repeated state checking Time complexity: O(b m ) Space complexity: O(b m ) (keeps all nodes) Optmiality: no Note: not optimal because we can be lead down a wrong path by an overly optimistic heuristic need to bias the search in favor of going back to early paths Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 12 / 36

21 Outline 1 Greedy Best-First Search 2 Consistent Heuristics Admissibility, Consistency and Dominance Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 13 / 36

22 Orignially appears in [Hart et al., 1968] Idea: avoid expanding paths that are already expensive Heuristic function: f (n) = g(n) + h(n) g(n) = path cost to node n h(n) = estimated cost from n to goal f (n) = estimated total cost of path through n to goal A search uses an admissible heuristic h(n) h (n) where h (n) is the true cost from n to goal h(n) 0 n, h(goal) = 0 Example: h SLD (n) = never over-estimates the actual road distance Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 14 / 36

23 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

24 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

25 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

26 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

27 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

28 : Example Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 15 / 36

29 : Properties Completeness: Time complexity: Space complexity: Optmiality: Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

30 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: Space complexity: Optmiality: Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

31 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: exp. in [relative error in h length of sol.] Space complexity: Optmiality: Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

32 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: exp. in [relative error in h length of sol.] Space complexity: keeps all nodes in memory (i.e., exp. number of nodes in worst case) Optmiality: Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

33 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: exp. in [relative error in h length of sol.] Space complexity: keeps all nodes in memory (i.e., exp. number of nodes in worst case) Optmiality: yes Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

34 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: exp. in [relative error in h length of sol.] Space complexity: keeps all nodes in memory (i.e., exp. number of nodes in worst case) Optmiality: yes Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

35 : Properties Completeness: yes unless there are an infinite number of nodes with f (n) f (goal) Time complexity: exp. in [relative error in h length of sol.] Space complexity: keeps all nodes in memory (i.e., exp. number of nodes in worst case) Optmiality: yes Theorem: A search is optimal Note: efficiency of A depends on heuristic function Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 16 / 36

36 Theorem: is Optimal Proof (by contradiction): suppose some sub-optimal goal G 2 has been enqueued let n be an unexpanded node on a shortest path to an optimal goal G 1 f (G 2 ) = g(g 2 ) since h(g 2 ) = 0 g(g 2 ) > g(g) since G 2 is sub-optimal g(g) f (n) since h is admissible Since f (G 2 ) > f (n), A could not have expanded G 2 (QED) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 17 / 36

37 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 S g = 4 h = 5 B A g = 1 h = 1 G g = 4 h = 0 fringe = {S} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

38 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 S f = = 5 f = = 7 g = 4 h = 5 B A B g = 1 A h = 1 g = 4 G h = 0 fringe = {A : 5,B : 7} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

39 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 A h = 1 G g = 4 G h = 0 fringe = {B : 7,G : 8} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

40 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 f = = 4 A h = 1 G A g = 4 G h = 0 fringe = {A : 4,G : 8} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

41 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 f = = 4 A h = 1 G A g = 4 f = = 7 G h = 0 G fringe = {G : 7,G : 8} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

42 A with Tree-Search Proof of optimality of A implicitly assumes we are using the Tree-Search algorithm S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 f = = 4 A h = 1 G A g = 4 f = = 7 G h = 0 G fringe = {G : 7,G : 8} goal test succeeds on G : 7 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 18 / 36

43 Graph Search Algorithms Tree search with closed list (keeps every node in memory) Closed list can be implemented with hash table to allow efficient lookup Function Graph-Search(problem, fringe) : solution/failure closed /0 fringe insert(make-node(initial-state(problem)), fringe) while true do if fringe = /0 then return failure node remove-front(fringe) if goal-test(problem,state(node)) then return solution(node) if state(node) / closed then closed state(node) fringe insert-all(expand(node, problem), fringe) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 19 / 36

44 A with Graph-Search If we want to avoid repeated states (e.g., using graph search with closed list) the proof no longer holds! S h = 7 g = 2 S g = 4 h = 5 B A g = 1 h = 1 G g = 4 h = 0 fringe = {S} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 20 / 36

45 A with Graph-Search If we want to avoid repeated states (e.g., using graph search with closed list) the proof no longer holds! S h = 7 g = 2 S f = = 5 f = = 7 g = 4 h = 5 B A B g = 1 A h = 1 g = 4 G h = 0 fringe = {A : 5,B : 7} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 20 / 36

46 A with Graph-Search If we want to avoid repeated states (e.g., using graph search with closed list) the proof no longer holds! S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 A h = 1 G g = 4 G h = 0 fringe = {B : 7,G : 8} Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 20 / 36

47 A with Graph-Search If we want to avoid repeated states (e.g., using graph search with closed list) the proof no longer holds! S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 f = = 4 A h = 1 G A g = 4 G h = 0 fringe = {A : 4,G : 8} state A in closed list, do not expand! Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 20 / 36

48 A with Graph-Search If we want to avoid repeated states (e.g., using graph search with closed list) the proof no longer holds! S h = 7 g = 2 f = = 5 S f = = 7 g = 4 h = 5 B A B g = 1 f = = 8 f = = 4 A h = 1 G A g = 4 G h = 0 fringe = {G : 8} goal test succeeds on G : 8 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 20 / 36

49 Consistent Heuristics Consistent Heuristics and A Optimality So what is the problem? We have defined h in an inconsistent way the relative error of h is not consistent throughout paths this leads to misleading values of f h should ensure that optimal path to any repeated state is always the first one followed Theorem: A with a closed list is optimal if h is consistent h is consistent h(n) c(n,a,n ) + h(n ) i.e., the estimated cost of reaching the goal from n is no greater than the step cost of reaching n plus the estimated cost of reaching the goal from n Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 21 / 36

50 Consistent Heuristics Consistent Heuristics and A Optimality: Proof (I) Lemma 1: If h is consistent, then f cannot decrease along any path f (n ) = g(n ) + h(n ) = g(n) + c(n,a,n ) + h(n ) g(n) + h(n) = f (n) (QED) Key point: h does not become less precise as we go deeper in the search tree Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 22 / 36

51 Consistent Heuristics Consistent Heuristics and A Optimality: Proof (II)... so we know that f is monotone non-decreasing Lemma 2: If h is consistent, then A only expands a node when it has found an optimal path to it we have reached node k, and obtain a new fringe after a few descendants, we reach node k with the same state as k let k be a descendant of some node n since f is non-decreasing, f (k ) f (n) f (k) since h(k) = h(k ) (because they point to the same state), we know that g(k ) g(k) thus the path to k was better! (QED) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 23 / 36

52 Consistent Heuristics Consistent Heuristics and A Optimality: Proof (III) Theorem: A with a closed list is optimal if h is consistent h is consistent, therefore f is non-decreasing along any path (Lemma 1) the sequence of nodes expanded by A is non-decreasing in f -value whenever A expands (in particular) a goal node, it has found an optimal path to that node (Lemma 2) if a state has already been expanded and then another path to that state is generated, it can safely be discarded, because it cannot be as good as the first path therefore A with a consistent heuristic is optimal (QED) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 24 / 36

53 Consistent Heuristics f -value Contours in Since h is consistent, A expands outwards along contours of increasing f values A expands all nodes with f (n) < C A expands some nodes with f (n) = C A expands no nodes with f (n) > C Note: in UCS (which is A with h 0), contours are circular around start state; in A they stretch towards goal and become more focused on optimal path Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 25 / 36

54 Admissibility, Consistency and Dominance Admissibility and Consistency Admissibility of h is sufficient for optimality of A if we do not check for repeated states If we do, we need h to be consistent What is the relationship between admissibility and consistency? Any consistent heuristic is admissible Let P = {n,n 1,...,n n,g} be a shortest path from n to goal G Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 26 / 36

55 Admissibility, Consistency and Dominance Admissibility and Consistency Admissibility of h is sufficient for optimality of A if we do not check for repeated states If we do, we need h to be consistent What is the relationship between admissibility and consistency? Any consistent heuristic is admissible Let P = {n,n 1,...,n n,g} be a shortest path from n to goal G h(n) c(n,a,n 1 ) + h(n 1 ) c(n,a,n 1 ) + c(n 1,a,n 2 ) + h(n 2 )... n i,n i+1 P (c(n i,a,n i+1 )) + h(g) = n i,n i+1 P (c(n i,a,n i+1 )) = h (n) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 26 / 36

56 Admissibility, Consistency and Dominance Admissibility and Consistency Consistency is a stronger requirement than admissibility However it is usually difficult to find admissible heuristics that are not consistent Example: straight line distance to Bucharest (h SLD ) is obviously consistent, as triangle inequality holds Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 27 / 36

57 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics Example: the 8-puzzle h 1 (n) = number of misplaced tiles h 1 (Start State) = 6 h 2 (n) = total Manhattan distance h 2 (Start State) = = 14 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 28 / 36

58 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics Example: the 8-puzzle h 1 (n) = number of misplaced tiles h 1 (Start State) = 6 h 2 (n) = total Manhattan distance h 2 (Start State) = = 14 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 28 / 36

59 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics Example: the 8-puzzle h 1 (n) = number of misplaced tiles h 1 (Start State) = 6 h 2 (n) = total Manhattan distance h 2 (Start State) = = 14 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 28 / 36

60 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics: Dominance If h 2 (n) h 1 (n) for all n (both admissible), then h 2 dominates h 1 Heuristic h(n) = max(h 1 (n),h 2 (n)) is also admissible and dominates both h 1 and h 2 Dominant heuristics are better for search Theorem: Given h 2 (n) h 1 (n) n, if a solution exists, h 1 will lead A to search at least all the nodes searched by h 2 Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 29 / 36

61 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics: Dominance If h 2 (n) h 1 (n) for all n (both admissible), then h 2 dominates h 1 Heuristic h(n) = max(h 1 (n),h 2 (n)) is also admissible and dominates both h 1 and h 2 Dominant heuristics are better for search Theorem: Given h 2 (n) h 1 (n) n, if a solution exists, h 1 will lead A to search at least all the nodes searched by h 2 Some numbers for the 8-puzzle and d = 14 IDS searches 3, 473, 941 nodes A (h 1 ) searches 539 nodes A (h 2 ) searches 113 nodes Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 29 / 36

62 Admissibility, Consistency and Dominance Admissibile (and Consistent) Heuristics: Dominance If h 2 (n) h 1 (n) for all n (both admissible), then h 2 dominates h 1 Heuristic h(n) = max(h 1 (n),h 2 (n)) is also admissible and dominates both h 1 and h 2 Dominant heuristics are better for search Theorem: Given h 2 (n) h 1 (n) n, if a solution exists, h 1 will lead A to search at least all the nodes searched by h 2... and for d = 24 IDS searches 54, 000, 000, 000 nodes A (h 1 ) searches 39,135 nodes A (h 2 ) searches 1,641 nodes Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 29 / 36

63 Admissibility, Consistency and Dominance Admissibile Heuristics from Relaxed Problems 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 Key point: the optimal solution cost of a relaxed problem is no greater than the optimal solution cost of the real problem Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 30 / 36

64 Admissibility, Consistency and Dominance Admissibile Heuristics from Relaxed Problems Traveling salesperson problem (TSP): find the shortest tour visiting all cities exactly once Spanning tree of a graph: a subgraph which is a tree and connects all the vertices together Minimum spanning tree: a spanning tree with weight less than or equal to the weight of every other spanning tree Weight of MST is lower bound on shortest (open) tour; MST can be computed in close to linear time (e.g., O( E log V ) with Kruskal s algorithm [Kruskal, 1956]) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 31 / 36

65 Admissibility, Consistency and Dominance Admissibile Heuristics from Relaxed Problems Traveling salesperson problem (TSP): find the shortest tour visiting all cities exactly once Spanning tree of a graph: a subgraph which is a tree and connects all the vertices together Minimum spanning tree: a spanning tree with weight less than or equal to the weight of every other spanning tree Weight of MST is lower bound on shortest (open) tour; MST can be computed in close to linear time (e.g., O( E log V ) with Kruskal s algorithm [Kruskal, 1956]) Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 31 / 36

66 Admissibility, Consistency and Dominance Efficiency of A A is optimally efficient for any heuristic function Why? no other optmial algorithm with the same heuristic expands fewer nodes than A (among algorithms of the same type, i.e., algorithms that extend search paths from root) any algorithm that does not expand all nodes with f (n) < C can miss an optimal solution Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 32 / 36

67 Admissibility, Consistency and Dominance Efficiency of A A is optimally efficient for any heuristic function Why? no other optmial algorithm with the same heuristic expands fewer nodes than A (among algorithms of the same type, i.e., algorithms that extend search paths from root) any algorithm that does not expand all nodes with f (n) < C can miss an optimal solution Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 32 / 36

68 Admissibility, Consistency and Dominance Efficiency of A A is complete, optimal and optimally efficient However, a heuristic cannot always guarantee that there aren t exponential nodes within the goal contour typically the most informed (i.e., perfect) heuristic function h entails the need to solve the search problem itself Heuristics such that h(n) h (n) O(logh (n)) avoid exponential growth error in heuristic function must not grow faster than actual path cost for most heuristics used in practice, error is at least proportional to path cost There is always a tradeoff between heuristic complexity and the pruning power of A Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 33 / 36

69 Admissibility, Consistency and Dominance Relationships Among Search Algorithms f = depth (BFS) h 0 (UCS) h < h A f = g + h Best-first search Depth-first search Generic graph-search algorithms Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 34 / 36

70 Admissibility, Consistency and Dominance Informed Search: Summary Informed algorithms employ a measure of node desirability for node expansion Desirability is defined by a heuristic function h(n) Greedy Best-First search expands nodes with minimal h(n) A search expands nodes with minimal f (n) = g(n) + h(n) complete, optimal and optimally efficient provided that h is admissible (for Tree-Search) or consistent (for Graph-Search) Performance of heuristic search depends on quality of h good heurisitcs can be constructed by relaxing the problem A can be prohibitive due to memory requirements solutions to this will be presented in the next lecture Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 35 / 36

71 Admissibility, Consistency and Dominance Problem Solving and Search: Informed Search Strategies (I) Thank you! Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 36 / 36

72 References References Hart, P., Nilsson, N., and Raphael, B. (1968). A formal basis for the heuristic determination of minimum cost paths. Systems Science and Cybernetics, IEEE Transactions on, 4(2): Kruskal, J. (1956). On the shortest spanning subtree of a graph and the traveling salesman problem. Proceedings of the American Mathematical Society, 7(1): Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 37 / 36

73 References Acknowledgements Portions of this course are inspired, compiled or taken from scientific presentations and teaching material by the following authors: Fahiem Bacchus, Amedeo Cesta, Gary Cottrell, Rina Dechter, Simone Fratini, Geoff Gordon, Russell Greiner, John Harrison, David Kriegman, Sharad Malik, Dana Nau, Peter Norvig, Madhusudan Parthasarathy, Rhys Price Jones, Stuart Russel, Tuomas Sandholm, Stephen F. Smith, Padhraic Smyth, Paolo Traverso, Toby Walsh. Federico Pecora Advanced Artificial Intelligence Problem Solving and Search: Informed Search Strategies (I) (Lecture 3) 37 / 36

Outline. Informed search algorithms. Best-first search. Review: Tree search. A search Heuristics. Chapter 4, Sections 1 2 4

Outline. Informed search algorithms. Best-first search. Review: Tree search. A search Heuristics. Chapter 4, Sections 1 2 4 Outline Best-first search Informed search algorithms A search Heuristics Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Informed search algorithms

Informed search algorithms Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Informed search algorithms. Chapter 4, Sections 1 2 1

Informed search algorithms. Chapter 4, Sections 1 2 1 Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang Chapter 3: Informed Search and Exploration Dr. Daisy Tang Informed Search Definition: Use problem-specific knowledge beyond the definition of the problem itself Can find solutions more efficiently Best-first

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Informed Search Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell) Informed search algorithms (Based on slides by Oren Etzioni, Stuart Russell) Outline Greedy best-first search A * search Heuristics Local search algorithms Hill-climbing search Simulated annealing search

More information

A.I.: Informed Search Algorithms. Chapter III: Part Deux

A.I.: Informed Search Algorithms. Chapter III: Part Deux A.I.: Informed Search Algorithms Chapter III: Part Deux Best-first search Greedy best-first search A * search Heuristics Outline Overview Informed Search: uses problem-specific knowledge. General approach:

More information

Informed Search and Exploration for Agents

Informed Search and Exploration for Agents Informed Search and Exploration for Agents R&N: 3.5, 3.6 Michael Rovatsos University of Edinburgh 29 th January 2015 Outline Best-first search Greedy best-first search A * search Heuristics Admissibility

More information

Informed/Heuristic Search

Informed/Heuristic Search Informed/Heuristic Search Outline Limitations of uninformed search methods Informed (or heuristic) search uses problem-specific heuristics to improve efficiency Best-first A* Techniques for generating

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Search Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Problem formulation & examples Basic search algorithms 2/100 Example:

More information

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2.

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2. Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu Lecture 3: Search 2 http://cs.nju.edu.cn/yuy/course_ai18.ashx Previously... function Tree-Search( problem, fringe) returns a solution,

More information

Artificial Intelligence: Search Part 2: Heuristic search

Artificial Intelligence: Search Part 2: Heuristic search Artificial Intelligence: Search Part 2: Heuristic search Thomas Trappenberg January 16, 2009 Based on the slides provided by Russell and Norvig, Chapter 4, Section 1 2,(4) Outline Best-first search A search

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Material Chapter 4 Section 1 - Exclude memory-bounded heuristic search 3 Outline Best-first search Greedy best-first search A * search Heuristics Local search algorithms

More information

Informed Search and Exploration

Informed Search and Exploration Ch. 03 p.1/47 Informed Search and Exploration Sections 3.5 and 3.6 Ch. 03 p.2/47 Outline Best-first search A search Heuristics, pattern databases IDA search (Recursive Best-First Search (RBFS), MA and

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence hapter 1 hapter 1 1 Iterative deepening search function Iterative-Deepening-Search( problem) returns a solution inputs: problem, a problem for depth 0 to do result Depth-Limited-Search(

More information

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1 Informed Search Dr. Richard J. Povinelli Copyright Richard J. Povinelli Page 1 rev 1.1, 9/25/2001 Objectives You should be able to explain and contrast uniformed and informed searches. be able to compare,

More information

Informed Search and Exploration

Informed Search and Exploration Ch. 03b p.1/51 Informed Search and Exploration Sections 3.5 and 3.6 Nilufer Onder Department of Computer Science Michigan Technological University Ch. 03b p.2/51 Outline Best-first search A search Heuristics,

More information

Introduction to Artificial Intelligence. Informed Search

Introduction to Artificial Intelligence. Informed Search Introduction to Artificial Intelligence Informed Search Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Best-first search A search Heuristics B. Beckert:

More information

Planning, Execution & Learning 1. Heuristic Search Planning

Planning, Execution & Learning 1. Heuristic Search Planning Planning, Execution & Learning 1. Heuristic Search Planning Reid Simmons Planning, Execution & Learning: Heuristic 1 Simmons, Veloso : Fall 2001 Basic Idea Heuristic Search Planning Automatically Analyze

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Today: Informed search algorithms

More information

Informed Search and Exploration

Informed Search and Exploration Ch. 04 p.1/39 Informed Search and Exploration Chapter 4 Ch. 04 p.2/39 Outline Best-first search A search Heuristics IDA search Hill-climbing Simulated annealing Ch. 04 p.3/39 Review: Tree search function

More information

Mustafa Jarrar: Lecture Notes on Artificial Intelligence Birzeit University, Chapter 3 Informed Searching. Mustafa Jarrar. University of Birzeit

Mustafa Jarrar: Lecture Notes on Artificial Intelligence Birzeit University, Chapter 3 Informed Searching. Mustafa Jarrar. University of Birzeit Mustafa Jarrar: Lecture Notes on Artificial Intelligence Birzeit University, 2018 Chapter 3 Informed Searching Mustafa Jarrar University of Birzeit Jarrar 2018 1 Watch this lecture and download the slides

More information

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km Informed Search Intelligent Systems and HCI D7023E Lecture 5: Informed Search (heuristics) Paweł Pietrzak [Sec 3.5-3.6,Ch.4] A search strategy which searches the most promising branches of the state-space

More information

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016 Informed search CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Best-first search Greedy

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Admissible Heuristics Graph Search Consistent Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Problem Solving: Informed Search

Problem Solving: Informed Search Problem Solving: Informed Search References Russell and Norvig, Artificial Intelligence: A modern approach, 2nd ed. Prentice Hall, 2003 (Chapters 1,2, and 4) Nilsson, Artificial intelligence: A New synthesis.

More information

TDT4136 Logic and Reasoning Systems

TDT4136 Logic and Reasoning Systems TDT4136 Logic and Reasoning Systems Chapter 3 & 4.1 - Informed Search and Exploration Lester Solbakken solbakke@idi.ntnu.no Norwegian University of Science and Technology 18.10.2011 1 Lester Solbakken

More information

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit Lecture Notes on Informed Searching University of Birzeit, Palestine 1 st Semester, 2014 Artificial Intelligence Chapter 4 Informed Searching Dr. Mustafa Jarrar Sina Institute, University of Birzeit mjarrar@birzeit.edu

More information

Lecture 4: Informed/Heuristic Search

Lecture 4: Informed/Heuristic Search Lecture 4: Informed/Heuristic Search Outline Limitations of uninformed search methods Informed (or heuristic) search uses problem-specific heuristics to improve efficiency Best-first A* RBFS SMA* Techniques

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Dr Ahmed Rafat Abas Computer Science Dept, Faculty of Computers and Informatics, Zagazig University arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Informed search algorithms

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 TB Artificial Intelligence Slides from AIMA http://aima.cs.berkeley.edu 1 /1 Outline Problem-solving agents Problem types Problem formulation Example problems Basic

More information

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Chapter 4 Informed Searching Dr. Mustafa

More information

Informed (Heuristic) Search. Idea: be smart about what paths to try.

Informed (Heuristic) Search. Idea: be smart about what paths to try. Informed (Heuristic) Search Idea: be smart about what paths to try. 1 Blind Search vs. Informed Search What s the difference? How do we formally specify this? A node is selected for expansion based on

More information

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search CSE 473 Chapter 4 Informed Search CSE AI Faculty Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search Last Time 2 1 Repeated States Failure to detect repeated states can turn a linear

More information

CS 380: Artificial Intelligence Lecture #4

CS 380: Artificial Intelligence Lecture #4 CS 380: Artificial Intelligence Lecture #4 William Regli Material Chapter 4 Section 1-3 1 Outline Best-first search Greedy best-first search A * search Heuristics Local search algorithms Hill-climbing

More information

Informed search algorithms

Informed search algorithms CS 580 1 Informed search algorithms Chapter 4, Sections 1 2, 4 CS 580 2 Outline Best-first search A search Heuristics Hill-climbing Simulated annealing CS 580 3 Review: General search function General-Search(

More information

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE Artificial Intelligence, Computational Logic PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE Lecture 3 Informed Search Sarah Gaggl Dresden, 22th April 2014 Agenda 1 Introduction 2 Uninformed Search

More information

Informed search strategies (Section ) Source: Fotolia

Informed search strategies (Section ) Source: Fotolia Informed search strategies (Section 3.5-3.6) Source: Fotolia Review: Tree search Initialize the frontier using the starting state While the frontier is not empty Choose a frontier node to expand according

More information

Informed Search A* Algorithm

Informed Search A* Algorithm Informed Search A* Algorithm CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Most slides have

More information

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair, COMP9414/ 9814/ 3411: Artificial Intelligence 5. Informed Search Russell & Norvig, Chapter 3. COMP9414/9814/3411 15s1 Informed Search 1 Search Strategies General Search algorithm: add initial state to

More information

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies Lecture Plan 1 Informed search strategies (KA AGH) 1 czerwca 2010 1 / 28 Blind vs. informed search strategies Blind search methods You already know them: BFS, DFS, UCS et al. They don t analyse the nodes

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 Outline Problem-solving agents Problem types Problem formulation Example problems Uninformed search algorithms Informed search algorithms Chapter 3 2 Restricted

More information

Informed Search. Notes about the assignment. Outline. Tree search: Reminder. Heuristics. Best-first search. Russell and Norvig chap.

Informed Search. Notes about the assignment. Outline. Tree search: Reminder. Heuristics. Best-first search. Russell and Norvig chap. Notes about the assignment Informed Search Russell and Norvig chap. 4 If it says return True or False, return True or False, not "True" or "False Comment out or remove print statements before submitting.

More information

Informed search methods

Informed search methods Informed search methods Tuomas Sandholm Computer Science Department Carnegie Mellon University Read Section 3.5-3.7 of Russell and Norvig Informed Search Methods Heuristic = to find, to discover Heuristic

More information

Robot Programming with Lisp

Robot Programming with Lisp 6. Search Algorithms Gayane Kazhoyan (Stuart Russell, Peter Norvig) Institute for University of Bremen Contents Problem Definition Uninformed search strategies BFS Uniform-Cost DFS Depth-Limited Iterative

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence CSC348 Unit 3: Problem Solving and Search Syedur Rahman Lecturer, CSE Department North South University syedur.rahman@wolfson.oxon.org Artificial Intelligence: Lecture Notes The

More information

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell) Informed search algorithms (Based on slides by Oren Etzioni, Stuart Russell) The problem # Unique board configurations in search space 8-puzzle 9! = 362880 15-puzzle 16! = 20922789888000 10 13 24-puzzle

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search Best-first search Idea: use an evaluation function f(n) for each node

More information

ARTIFICIAL INTELLIGENCE. Informed search

ARTIFICIAL INTELLIGENCE. Informed search INFOB2KI 2017-2018 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Informed search Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html

More information

Informed Search Algorithms

Informed Search Algorithms Informed Search Algorithms CITS3001 Algorithms, Agents and Artificial Intelligence Tim French School of Computer Science and Software Engineering The University of Western Australia 2017, Semester 2 Introduction

More information

CS 771 Artificial Intelligence. Informed Search

CS 771 Artificial Intelligence. Informed Search CS 771 Artificial Intelligence Informed Search Outline Review limitations of uninformed search methods Informed (or heuristic) search Uses problem-specific heuristics to improve efficiency Best-first,

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Informed Search and Exploration Chapter 4 (4.1 4.2) A General Search algorithm: Chapter 3: Search Strategies Task : Find a sequence of actions leading from the initial state to

More information

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty) Informed search algorithms Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty) Intuition, like the rays of the sun, acts only in an inflexibly

More information

Informed search algorithms

Informed search algorithms Artificial Intelligence Topic 4 Informed search algorithms Best-first search Greedy search A search Admissible heuristics Memory-bounded search IDA SMA Reading: Russell and Norvig, Chapter 4, Sections

More information

CS 331: Artificial Intelligence Informed Search. Informed Search

CS 331: Artificial Intelligence Informed Search. Informed Search CS 331: Artificial Intelligence Informed Search 1 Informed Search How can we make search smarter? Use problem-specific knowledge beyond the definition of the problem itself Specifically, incorporate knowledge

More information

Problem Solving and Search

Problem Solving and Search Artificial Intelligence Problem Solving and Search Dae-Won Kim School of Computer Science & Engineering Chung-Ang University Outline Problem-solving agents Problem types Problem formulation Example problems

More information

Solving problems by searching

Solving problems by searching Solving problems by searching Chapter 3 Some slide credits to Hwee Tou Ng (Singapore) Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Heuristics

More information

Informed Search Algorithms. Chapter 4

Informed Search Algorithms. Chapter 4 Informed Search Algorithms Chapter 4 Outline Informed Search and Heuristic Functions For informed search, we use problem-specific knowledge to guide the search. Topics: Best-first search A search Heuristics

More information

2006/2007 Intelligent Systems 1. Intelligent Systems. Prof. dr. Paul De Bra Technische Universiteit Eindhoven

2006/2007 Intelligent Systems 1. Intelligent Systems. Prof. dr. Paul De Bra Technische Universiteit Eindhoven test gamma 2006/2007 Intelligent Systems 1 Intelligent Systems Prof. dr. Paul De Bra Technische Universiteit Eindhoven debra@win.tue.nl 2006/2007 Intelligent Systems 2 Informed search and exploration Best-first

More information

CS 331: Artificial Intelligence Informed Search. Informed Search

CS 331: Artificial Intelligence Informed Search. Informed Search CS 331: Artificial Intelligence Informed Search 1 Informed Search How can we make search smarter? Use problem-specific knowledge beyond the definition of the problem itself Specifically, incorporate knowledge

More information

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random Example: n-queens Put n queens on an n n board with no two queens on the same row, column, or diagonal A search problem! State space: the board with 0 to n queens Initial state: the empty board or a board

More information

Solving Problems: Intelligent Search

Solving Problems: Intelligent Search Solving Problems: Intelligent Search Instructor: B. John Oommen Chancellor s Professor Fellow: IEEE; Fellow: IAPR School of Computer Science, Carleton University, Canada The primary source of these notes

More information

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S LECTURE 2 SEARCHING IN STATE GRAPHS Introduction Idea: Problem Solving as Search Basic formalism as State-Space Graph Graph explored by Tree Search Different algorithms to explore the graph Slides mainly

More information

CS 4700: Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Bart Selman selman@cs.cornell.edu Informed Search Readings R&N - Chapter 3: 3.5 and 3.6 Search Search strategies determined by choice of node (in queue)

More information

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search:

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search: Outline for today s lecture Informed Search II Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing 2 Review: Greedy best-first search: f(n): estimated

More information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic Uninformed (blind) search algorithms can find an (optimal) solution to the problem,

More information

COSC343: Artificial Intelligence

COSC343: Artificial Intelligence COSC343: Artificial Intelligence Lecture 18: Informed search algorithms Alistair Knott Dept. of Computer Science, University of Otago Alistair Knott (Otago) COSC343 Lecture 18 1 / 1 In today s lecture

More information

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3 9-04-2013 Uninformed (blind) search algorithms Breadth-First Search (BFS) Uniform-Cost Search Depth-First Search (DFS) Depth-Limited Search Iterative Deepening Best-First Search HW#1 due today HW#2 due

More information

Informed search algorithms

Informed search algorithms Informed search algorithms This lecture topic Chapter 3.5-3.7 Next lecture topic Chapter 4.1-4.2 (Please read lecture topic material before and after each lecture on that topic) Outline Review limitations

More information

Part I. Instructor: Dr. Wei Ding. Uninformed Search Strategies can find solutions to problems by. Informed Search Strategies

Part I. Instructor: Dr. Wei Ding. Uninformed Search Strategies can find solutions to problems by. Informed Search Strategies Informed Search and Exploration Part I Instructor: Dr. Wei Ding Fall 2010 1 Motivation Uninformed Search Strategies can find solutions to problems by Systematically generating new states Testing them against

More information

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart Informed Search CS 486/686 University of Waterloo May 0 Outline Using knowledge Heuristics Best-first search Greedy best-first search A* search Other variations of A* Back to heuristics 2 Recall from last

More information

mywbut.com Informed Search Strategies-I

mywbut.com Informed Search Strategies-I Informed Search Strategies-I 1 3.1 Introduction We have outlined the different types of search strategies. In the earlier chapter we have looked at different blind search strategies. Uninformed search

More information

CS 4700: Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Bart Selman selman@cs.cornell.edu Module: Informed Search Readings R&N - Chapter 3: 3.5 and 3.6 Search Search strategies determined by choice of node (in

More information

Artificial Intelligence Informed search. Peter Antal

Artificial Intelligence Informed search. Peter Antal Artificial Intelligence Informed search Peter Antal antal@mit.bme.hu 1 Informed = use problem-specific knowledge Which search strategies? Best-first search and its variants Heuristic functions? How to

More information

Informed search algorithms

Informed search algorithms Informed search algorithms This lecture topic Chapter 3.5-3.7 Next lecture topic Chapter 4.1-4.2 (Please read lecture topic material before and after each lecture on that topic) Outline Review limitations

More information

Informed search algorithms

Informed search algorithms Informed search algorithms This lecture topic Chapter 3.5-3.7 Next lecture topic Chapter 4.1-4.2 (Please read lecture topic material before and after each lecture on that topic) Outline Review limitations

More information

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

Informed Search and Exploration

Informed Search and Exploration Artificial Intelligence Informed Search and Exploration Readings: Chapter 4 of Russell & Norvig. Best-First Search Idea: use a function f for each node n to estimate of desirability Strategy: Alwasy expand

More information

DFS. Depth-limited Search

DFS. Depth-limited Search DFS Completeness? No, fails in infinite depth spaces or spaces with loops Yes, assuming state space finite. Time complexity? O(b m ), terrible if m is much bigger than d. can do well if lots of goals Space

More information

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010 Lecture 4: Search 3 Victor R. Lesser CMPSCI 683 Fall 2010 First Homework 1 st Programming Assignment 2 separate parts (homeworks) First part due on (9/27) at 5pm Second part due on 10/13 at 5pm Send homework

More information

Solving problems by searching

Solving problems by searching Solving problems by searching CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2017 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Problem-solving

More information

COMP9414: Artificial Intelligence Informed Search

COMP9414: Artificial Intelligence Informed Search COMP9, Wednesday March, 00 Informed Search COMP9: Artificial Intelligence Informed Search Wayne Wobcke Room J- wobcke@cse.unsw.edu.au Based on slides by Maurice Pagnucco Overview Heuristics Informed Search

More information

Lecture 5 Heuristics. Last Time: A* Search

Lecture 5 Heuristics. Last Time: A* Search CSE 473 Lecture 5 Heuristics CSE AI Faculty Last Time: A* Search Use an evaluation function f(n) for node n. f(n) = estimated total cost of path thru n to goal f(n) = g(n) + h(n) g(n) = cost so far to

More information

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

Set 3: Informed Heuristic Search. ICS 271 Fall 2017 Kalev Kask

Set 3: Informed Heuristic Search. ICS 271 Fall 2017 Kalev Kask Set 3: Informed Heuristic Search ICS 271 Fall 2017 Kalev Kask Basic search scheme We have 3 kinds of states explored (past) only graph search frontier (current) unexplored (future) implicitly given Initially

More information

Informed Search and Exploration

Informed Search and Exploration Informed Search and Exploration Berlin Chen 2005 Reference: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach, Chapter 4 2. S. Russell s teaching materials AI - Berlin Chen 1 Introduction

More information

Solving problems by searching

Solving problems by searching Solving problems by searching CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2014 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Problem-solving

More information

Informed Search and Exploration

Informed Search and Exploration Informed Search and Exploration Chapter 4 (4.1-4.3) CS 2710 1 Introduction Ch.3 searches good building blocks for learning about search But vastly inefficient eg: Can we do better? Breadth Depth Uniform

More information

Artificial Intelligence Informed search. Peter Antal Tadeusz Dobrowiecki

Artificial Intelligence Informed search. Peter Antal Tadeusz Dobrowiecki Artificial Intelligence Informed search Peter Antal antal@mit.bme.hu Tadeusz Dobrowiecki tade@mit.bme.hu A.I. 9/17/2018 1 Informed = use problem-specific knowledge Which search strategies? Best-first search

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Academic year 2016/2017 Giorgio Fumera http://pralab.diee.unica.it fumera@diee.unica.it Pattern Recognition and Applications Lab Department of Electrical and Electronic Engineering

More information

Artificial Intelligence CS 6364

Artificial Intelligence CS 6364 Artificial Intelligence CS 6364 Professor Dan Moldovan Section 4 Informed Search and Adversarial Search Outline Best-first search Greedy best-first search A* search Heuristics revisited Minimax search

More information

Heuris'c Search. Reading note: Chapter 4 covers heuristic search.

Heuris'c Search. Reading note: Chapter 4 covers heuristic search. Heuris'c Search Reading note: Chapter 4 covers heuristic search. Credits: Slides in this deck are drawn from or inspired by a multitude of sources including: Shaul Markovitch Jurgen Strum Sheila McIlraith

More information

COMP9414: Artificial Intelligence Informed Search

COMP9414: Artificial Intelligence Informed Search COMP9, Monday 9 March, 0 Informed Search COMP9: Artificial Intelligence Informed Search Wayne Wobcke Room J- wobcke@cse.unsw.edu.au Based on slides by Maurice Pagnucco Overview Heuristics Informed Search

More information

Artificial Intelligence. Informed search methods

Artificial Intelligence. Informed search methods Artificial Intelligence Informed search methods In which we see how information about the state space can prevent algorithms from blundering about in the dark. 2 Uninformed vs. Informed Search Uninformed

More information

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018 DIT411/TIN175, Artificial Intelligence Chapters 3 4: More search algorithms CHAPTERS 3 4: MORE SEARCH ALGORITHMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 23 January, 2018 1 TABLE OF CONTENTS

More information

Informed Search. CS 486/686: Introduction to Artificial Intelligence Fall 2013

Informed Search. CS 486/686: Introduction to Artificial Intelligence Fall 2013 Informed Search CS 486/686: Introduction to Artificial Intelligence Fall 2013 1 Outline Using knowledge Heuristics Bestfirst search Greedy bestfirst search A* search Variations of A* Back to heuristics

More information

Heuristic (Informed) Search

Heuristic (Informed) Search Heuristic (Informed) Search (Where we try to choose smartly) R&N: Chap. 4, Sect. 4.1 3 1 Recall that the ordering of FRINGE defines the search strategy Search Algorithm #2 SEARCH#2 1. INSERT(initial-node,FRINGE)

More information

CPS 170: Artificial Intelligence Search

CPS 170: Artificial Intelligence   Search CPS 170: Artificial Intelligence http://www.cs.duke.edu/courses/spring09/cps170/ Search Instructor: Vincent Conitzer Search We have some actions that can change the state of the world Change resulting

More information

Introduction to Computer Science and Programming for Astronomers

Introduction to Computer Science and Programming for Astronomers Introduction to Computer Science and Programming for Astronomers Lecture 9. István Szapudi Institute for Astronomy University of Hawaii March 21, 2018 Outline Reminder 1 Reminder 2 3 Reminder We have demonstrated

More information