Problem-solving agents. Solving Problems by Searching. Outline. Example: Romania. Chapter 3

Size: px
Start display at page:

Download "Problem-solving agents. Solving Problems by Searching. Outline. Example: Romania. Chapter 3"

Transcription

1 Problem-solving agents olving Problems by earching hapter 3 function imple-problem-olving-gent( percept) returns an action static: seq, an action sequence, initially empty state, some description of the current world state goal, a goal, initially null problem, a problem formulation state Update-tate(state, percept) if seq is empty then goal Formulate-Goal(state) problem Formulate-Problem(state, goal) seq earch( problem) if seq is failure then return a null action action First(seq) seq est(seq) return action Note: this is offline problem solving; solution executed eyes closed. Online problem solving involves acting without complete knowledge. hapter 3 1 hapter 3 3 Outline Example: omania Problem-solving agents Problem types Problem formulation Example problems asic search algorithms On holiday in omania; currently in rad. Flight leaves tomorrow from ucharest Formulate goal: be in ucharest Formulate problem: states: various cities actions: drive between cities Find solution: sequence of cities, e.g., rad, ibiu, Fagaras, ucharest hapter 3 2 hapter 3 4

2 Example: omania Oradea 71 Neamt 75 Zerind 151 rad 140 ibiu 99 Fagaras Timisoara imnicu Vilcea 111 ugoj 97 Pitesti Mehadia 75 Dobreta ucharest raiova 90 Giurgiu 87 Iasi Urziceni Vaslui Hirsova 86 Eforie ingle-state, start in #5. olution?? Example: vacuum world hapter 3 5 hapter 3 7 Problem types Example: vacuum world Deterministic, fully observable = single-state problem gent knows exactly which state it will be in; solution is a sequence Non-observable = conformant problem gent may have no idea where it is; solution (if any) is a sequence Nondeterministic and/or partially observable = contingency problem percepts provide new information about current state solution is a contingent plan or a policy often interleave search, execution Unknown state space = exploration problem ( online ) ingle-state, start in #5. olution?? [ight, uck] onformant, start in {1,2,3,4,5,6,7,8} e.g., ight goes to {2,4,6,8}. olution?? hapter 3 6 hapter 3 8

3 Example: vacuum world ingle-state problem formulation ingle-state, start in #5. olution?? [ight, uck] onformant, start in {1,2,3,4,5,6,7,8} e.g., ight goes to {2,4,6,8}. olution?? [ight, uck, ef t, uck] ontingency Murphy s aw (non-deterministic): uck can dirty a clean carpet; start in #5 ocal sensing (partially-observable): dirt, location only, start in {#5,#7}. olution?? problem is defined by four items: initial state e.g., at rad successor function (x) = set of action state pairs e.g., (rad) = { rad Zerind,Zerind,...} goal test, can be explicit, e.g., x = at ucharest implicit, e.g., N odirt(x) path cost (additive) e.g., sum of distances, number of actions executed, etc. c(x,a,y) is the step cost, assumed to be 0 solution is a sequence of actions leading from the initial state to a goal state hapter 3 9 hapter 3 11 Example: vacuum world electing a state space ingle-state, start in #5. olution?? [ight, uck] onformant, start in {1,2,3,4,5,6,7,8} e.g., ight goes to {2,4,6,8}. olution?? [ight, uck, ef t, uck] ontingency Murphy s aw (non-deterministic): uck can dirty a clean carpet; start in #5 ocal sensing (partially-observable): dirt, location only, start in {#5,#7}. olution?? [ight, while dirt do uck] [ight, if dirt then uck] eal world is absurdly complex state space must be abstracted for problem solving (bstract) state = set of real states (bstract) action = complex combination of real actions e.g., rad Zerind represents a complex set of possible routes, detours, rest stops, etc. For guaranteed realizability, any real state in rad must get to some real state in Zerind (bstract) solution = set of real paths that are solutions in the real world Each abstract action should be easier than the original problem! hapter 3 10 hapter 3 12

4 Example: vacuum world state space graph states?? actions?? goal test?? path cost?? hapter 3 13 Example: vacuum world state space graph states??: integer dirt and robot locations (ignore dirt amounts etc.) actions?? goal test?? path cost?? hapter 3 14 Example: vacuum world state space graph states??: integer dirt and robot locations (ignore dirt amounts etc.) actions??: eft, ight, uck, NoOp goal test?? path cost?? hapter 3 15 Example: vacuum world state space graph states??: integer dirt and robot locations (ignore dirt amounts etc.) actions??: eft, ight, uck, NoOp goal test??: no dirt path cost?? hapter 3 16

5 Example: vacuum world state space graph Example: The 8-puzzle tart tate Goal tate states??: integer dirt and robot locations (ignore dirt amounts etc.) actions??: eft, ight, uck, NoOp goal test??: no dirt path cost??: 1 per action (0 for NoOp) states??: integer locations of tiles (ignore intermediate positions) actions?? goal test?? path cost?? hapter 3 17 hapter 3 19 Example: The 8-puzzle Example: The 8-puzzle tart tate Goal tate tart tate Goal tate states?? actions?? goal test?? path cost?? states??: integer locations of tiles (ignore intermediate positions) actions??: move blank left, right, up, down (ignore unjamming etc.) goal test?? path cost?? hapter 3 18 hapter 3 20

6 Example: The 8-puzzle Example: robotic assembly P tart tate Goal tate states??: integer locations of tiles (ignore intermediate positions) actions??: move blank left, right, up, down (ignore unjamming etc.) goal test??: = goal state (given) path cost?? states??: real-valued coordinates of robot joint angles parts of the object to be assembled actions??: continuous motions of robot joints goal test??: complete assembly with no robot included! path cost??: time to execute hapter 3 21 hapter Example: The 8-puzzle 2 3 tart tate Goal tate states??: integer locations of tiles (ignore intermediate positions) actions??: move blank left, right, up, down (ignore unjamming etc.) goal test??: = goal state (given) path cost??: 1 per move [Note: optimal solution of n-puzzle family is NP-hard] Tree search algorithms asic idea: offline, simulated exploration of state space by generating successors of already-explored states (a.k.a. expanding states) function Tree-earch( problem, strategy) 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 based on strategy if the node contains a goal state then return the corresponding solution else expand the chosen node and add the resulting nodes to the frontier end hapter 3 22 hapter 3 24

7 Tree search example Tree search example rad rad ibiu Timisoara Zerind ibiu Timisoara Zerind rad Fagaras Oradea imnicu Vilcea rad ugoj rad Oradea rad Fagaras Oradea imnicu Vilcea rad ugoj rad Oradea hapter 3 25 hapter 3 27 Tree search example states vs. nodes ibiu rad Timisoara Zerind state is a (representation of) a physical configuration node is a data structure constituting part of a search tree includes parent, children, depth, path cost g(x) tates do not have parents, children, depth, or path cost! parent, action rad Fagaras Oradea imnicu Vilcea rad ugoj rad Oradea tate state Node depth = 6 g = 6 The Expand function creates new nodes, filling in the various fields and using the uccessorfn of the problem to create the corresponding states. hapter 3 26 hapter 3 28

8 earch strategies strategy is defined by picking the order of node expansion trategies are evaluated along the following 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 optimality does it always find a least-cost solution? Time and space complexity are measured in terms of b maximum branching factor of the search tree d depth of the shallowest solution m maximum depth of the state space (may be ) Expand shallowest unexpanded node readth-first search frontier is a FIFO queue, i.e., new successors go at end hapter 3 29 hapter 3 31 Uninformed search strategies Uninformed strategies use only the information available in the problem definition readth-first search Uniform-cost search Expand shallowest unexpanded node readth-first search frontier is a FIFO queue, i.e., new successors go at end Depth-first search Depth-limited search Iterative deepening search hapter 3 30 hapter 3 32

9 readth-first search Properties of breadth-first search Expand shallowest unexpanded node frontier is a FIFO queue, i.e., new successors go at end omplete?? hapter 3 33 hapter 3 35 Expand shallowest unexpanded node readth-first search frontier is a FIFO queue, i.e., new successors go at end Properties of breadth-first search omplete?? Yes (if b is finite) Time?? hapter 3 34 hapter 3 36

10 Properties of breadth-first search omplete?? Yes (if b is finite) Time (# of visited nodes)?? 1+b+b 2 +b b d = O(b d ) Time (# of generated nodes)?? b+b 2 +b b d +(b d+1 b) = O(b d+1 ) pace?? Properties of breadth-first search omplete?? Yes (if b is finite) Time (# of generated nodes)?? b+b 2 +b b d +(b d+1 b) = O(b d+1 ) pace?? O(b d+1 ) (keeps every node in memory) Optimal?? Yes (if cost = 1 per step); not optimal in general pace is the big problem; can easily generate nodes at 100M/sec so 24hrs = 8640G. hapter 3 37 hapter 3 39 Properties of breadth-first search omplete?? Yes (if b is finite) Time (# of generated nodes)?? b+b 2 +b b d +(b d+1 b) = O(b d+1 ) pace?? O(b d+1 ) (keeps every node in memory) Optimal?? Expand least-cost unexpanded node Uniform-cost search frontier = queue ordered by path cost, lowest first Equivalent to breadth-first if step costs all equal omplete?? Yes, if step cost ǫ (lowest step cost) Time?? # of nodes with g cost of optimal solution, O(b /ǫ ) where is the cost of the optimal solution pace?? # of nodes with g cost of optimal solution, O(b /ǫ ) Optimal?? Yes nodes expanded in increasing order of g(n) hapter 3 38 hapter 3 40

11 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 41 hapter 3 43 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 42 hapter 3 44

12 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 45 hapter 3 47 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 46 hapter 3 48

13 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 49 hapter 3 51 Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front Expand deepest unexpanded node Depth-first search frontier = IFO queue, i.e., put successors at front H I J K M N O H I J K M N O hapter 3 50 hapter 3 52

14 Properties of depth-first search Properties of depth-first search omplete?? omplete?? Yes: in finite spaces No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first pace?? hapter 3 53 hapter 3 55 Properties of depth-first search omplete?? Yes: in finite spaces No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path Properties of depth-first search omplete?? Yes: in finite spaces No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path Time?? Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first pace?? O(bm), i.e., linear space! Optimal?? hapter 3 54 hapter 3 56

15 Properties of depth-first search omplete?? Yes: in finite spaces No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Iterative deepening search function Iterative-Deepening-earch( problem) returns a solution inputs: problem, a problem for depth 0 to do result Depth-imited-earch( problem, depth) if result cutoff then return result end pace?? O(bm), i.e., linear space! Optimal?? No hapter 3 57 hapter 3 59 Depth-limited search = depth-first search with depth limit l, i.e., nodes at depth l have no successors imit = 0 Iterative deepening search l = 0 ecursive implementation: function Depth-imited-earch( problem, limit) returns soln/fail/cutoff ecursive-d(make-node(initial-tate[problem]), problem, limit) function ecursive-d(node, problem, limit) returns soln/fail/cutoff cutoff-occurred? false if Goal-Test(problem, tate[node]) then return node else if Depth[node] = limit then return cutoff else for each successor in Expand(node, problem) do result ecursive-d(successor, problem, limit) if result = cutoff then cutoff-occurred? true else if result failure then return result if cutoff-occurred? then return cutoff else return failure hapter 3 58 hapter 3 60

16 Iterative deepening search l = 1 Iterative deepening search l = 3 imit = 1 imit = 3 H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O H I J K M N O hapter 3 61 hapter 3 63 Iterative deepening search l = 2 Properties of iterative deepening search imit = 2 omplete?? hapter 3 62 hapter 3 64

17 Properties of iterative deepening search omplete?? Yes Time?? Properties of iterative deepening search omplete?? Yes Time (# of generated nodes)?? db 1 +(d 1)b b d = O(b d ) pace?? O(bd) Optimal?? hapter 3 65 hapter 3 67 Properties of iterative deepening search omplete?? Yes Time (# of generated nodes)?? db 1 +(d 1)b b d = O(b d ) pace?? Properties of iterative deepening search omplete?? Yes Time (# of generated nodes)?? db 1 +(d 1)b b d = O(b d ) pace?? O(bd) Optimal?? Yes, if step cost = 1 an be modified to explore uniform-cost tree Numerical comparison for b = 10 and d = 5, solution at far right leaf: N(ID) = ,000+20, ,000 = 123,450 N visited (F) = ,000+10, ,000 = 111,110 N generated (F) = ,000+10, , ,990 = 1,111,100 F can be modified to apply goal test when a node is generated hapter 3 66 hapter 3 68

18 ummary of algorithms riterion readth- Uniform- Depth- Depth- Iterative First ost First imited Deepening omplete? Yes Yes No Yes, if l d Yes Time (big-o) b d b /ǫ b m b l b d pace (big-o) b d b /ǫ bm bl bd Optimal? Yes Yes No No Yes Graph search function Graph-earch( problem) returns a solution, or failure frontier a list with node from the initial state of problem explored an empty set loop do if frontier is empty then return failure node emove-front(frontier) if node contains a goal state then return olution(node) add tate[node] to explored expand node add to frontier the resulting nodes that are not in explored or not in frontier or [better than the corresponding nodes in frontier in some algs] end frontier (aka fringe or open); explored (aka visited or closed) hapter 3 69 hapter 3 71 epeated states Failure to detect repeated states can turn a linear problem into an exponential one! Informed earch o far the search algorithms are uninformed independent to the problems Informed search incorporating knowledge related to the problem for guiding search D hapter 3 70 hapter 3 72

19 est-first search Idea: use an evaluation function for each node estimate of desirability Expand most desirable unexpanded node frontier is a queue sorted in decreasing order of desirability Greedy search Evaluation function h(n) (heuristic) = estimate of cost from n to the closest goal E.g., h D (n) = straight-line distance from n to ucharest Greedy search expands the node that appears to be closest to goal pecial cases: greedy search search hapter 3 73 hapter 3 75 omania with step costs in km Greedy search example Oradea 71 Neamt 87 Zerind Iasi rad ibiu 99 Fagaras Vaslui Timisoara imnicu Vilcea ugoj 97 Pitesti Hirsova Mehadia Urziceni ucharest 120 Dobreta 90 raiova Giurgiu Eforie traight line distance to ucharest rad 366 ucharest 0 raiova 160 Dobreta 242 Eforie 161 Fagaras 178 Giurgiu 77 Hirsova 151 Iasi 226 ugoj 244 Mehadia 241 Neamt 234 Oradea 380 Pitesti 98 imnicu Vilcea 193 ibiu 253 Timisoara 329 Urziceni 80 Vaslui 199 Zerind 374 rad 366 hapter 3 74 hapter 3 76

20 Greedy search example Greedy search example rad rad ibiu Timisoara Zerind ibiu Timisoara Zerind rad Fagaras Oradea imnicu Vilcea ibiu ucharest hapter 3 77 hapter 3 79 Greedy search example Properties of greedy search rad omplete?? ibiu Timisoara Zerind rad Fagaras Oradea imnicu Vilcea hapter 3 78 hapter 3 80

21 Properties of greedy search omplete?? Yes omplete in finite space with repeated-state checking No can get stuck in loops, e.g., with Oradea as goal, Iasi Neamt Iasi Neamt Properties of greedy search omplete?? Yes omplete in finite space with repeated-state checking No can get stuck in loops, e.g., Iasi Neamt Iasi Neamt Time?? Time?? O(b m ), but a good heuristic can give dramatic improvement pace?? O(b m ), but a good heuristic can give dramatic improvement Optimal?? hapter 3 81 hapter 3 83 Properties of greedy search omplete?? Yes omplete in finite space with repeated-state checking No can get stuck in loops, e.g., Iasi Neamt Iasi Neamt Properties of greedy search omplete?? Yes omplete in finite space with repeated-state checking No can get stuck in loops, e.g., Iasi Neamt Iasi Neamt Time?? O(b m ), but a good heuristic can give dramatic improvement pace?? Time?? O(b m ), but a good heuristic can give dramatic improvement pace?? O(b m ), but a good heuristic can give dramatic improvement Optimal?? No hapter 3 82 hapter 3 84

22 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 to goal from n f(n) = estimated total cost of path through n to goal search uses an admissible heuristic i.e., h(n) h (n) where h (n) is the true cost from n. (lso require h(n) 0, so h(g) = 0 for any goal G.) E.g., h D (n) never overestimates the actual road distance Theorem: search is optimal ibiu 393= search example rad Timisoara Zerind 447= = hapter 3 85 hapter 3 87 search example search example rad 366=0+366 rad ibiu Timisoara Zerind 447= = rad Fagaras Oradea imnicu Vilcea 646= = = = hapter 3 86 hapter 3 88

23 search example search example rad rad ibiu Timisoara Zerind 447= = ibiu Timisoara Zerind 447= = rad Fagaras 646= = Oradea 671= imnicu Vilcea rad 646= Fagaras Oradea 671= imnicu Vilcea raiova Pitesti ibiu 526= = = ibiu ucharest raiova Pitesti ibiu 591= = = = ucharest raiova imnicu Vilcea 418= = = hapter 3 89 hapter 3 91 rad 646= ibiu Fagaras ibiu ucharest Oradea 671= search example imnicu Vilcea rad Timisoara raiova Pitesti ibiu 591= = = = = Zerind 447= = Optimality of (standard proof) uppose some suboptimal goal G 2 has been generated and is in the queue. et n be an unexpanded node on a shortest path to an optimal goal G. n G Want to prove: f(g 2 ) > f(n) [ will never select G 2 for expansion] tart G 2 f(g 2 ) = g(g 2 ) since h(g 2 ) = 0 g(g 2 ) > g(g) since G 2 is suboptimal g(g) f(n) since h is admissible hapter 3 90 hapter 3 92

24 Properties of Properties of omplete?? omplete?? Yes, unless there are infinitely many nodes with f f(g) Time?? Exponential in [relative error in h d] pace?? hapter 3 93 hapter 3 95 Properties of omplete?? Yes, unless there are infinitely many nodes with f f(g) Time?? Properties of omplete?? Yes, unless there are infinitely many nodes with f f(g) Time?? Exponential in [relative error in h d] pace?? Exponential Optimal?? hapter 3 94 hapter 3 96

25 Properties of omplete?? Yes, unless there are infinitely many nodes with f f(g) Time?? Exponential in [relative error in h d] pace?? Exponential Optimal?? Yes cannot expand f i+1 until f i is finished, where f i+1 > f i * vs Uniform-cost earch f(n) = g(n)+h(n) Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? onsider h(n) is perfect, f(n) is? is the cost for the optimal solution: expands all nodes with f(n) < expands some nodes with f(n) = expands no nodes with f(n) > hapter 3 97 hapter 3 99 * vs Uniform-cost earch f(n) = g(n)+h(n) Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? * vs Uniform-cost earch f(n) = g(n)+h(n) Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? onsider h(n) is perfect, f(n) is the actual total path cost. hapter 3 98 hapter 3 100

26 f(n) = g(n)+h(n) * vs Uniform-cost earch Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? onsider h(n) is perfect, f(n) is the actual total path cost. If n doesn t lead to a goal state, f(n) = *? U? f(n) = g(n)+h(n) * vs Uniform-cost earch Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? onsider h(n) is perfect, f(n) is the actual total path cost. If n doesn t lead to a goal state, f(n) = * doesn t explore n. U doesn t know and keeps on exploring n (and its sucessors). If n doesn t lead to the optimal goal, but n does: f(n) > f(n ) * doesn t explore n and *only* explores n! U doesn t know and keeps on exploring n (and its sucessors). In terms of speed, the worst case for * is when h(n) is zero, but we don t use h(n) = 0. hapter hapter f(n) = g(n)+h(n) * vs Uniform-cost earch Isn t U just * with h(n) being zero (admissible)? oth are optimal, why is * usually faster? onsider h(n) is perfect, f(n) is the actual total path cost. If n doesn t lead to a goal state, f(n) = * doesn t explore n. U doesn t know and keeps on exploring n (and its sucessors). If n doesn t lead to the optimal goal, but n does: f(n) > f(n ) *? U? onsistency onsidern isasuccessorofn,aheuristicisconsistentif h(n) c(n,a,n )+h(n ), et s find the relationship between f(n) and f(n ): f(n ) = g(n )+h(n ) f(n ) = g(n)+c(n,a,n )+h(n ) f(n ) g(n)+h(n) [since h is consistent] f(n ) f(n) c(n,a,n ) n n h(n ) h(n) i.e. f(n) values for a sequence of nodes along *any* path are nondecreasing (similar to g(n) values in U). * using GPH-EH is optimal if h(n) is consistent (using a similar argument as U). G hapter hapter 3 104

27 Optimality of (consistent heuristics) emma: expands nodes in order of increasing f value Gradually adds f-contours of nodes (cf. breadth-first adds layers) ontour i has all nodes with f = f i, where f i < f i+1 T Z 380 O D M 400 F P 420 G N I U V H E E.g., for the 8-puzzle: dmissible heuristics 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 () =?? h 2 () =?? tart tate Goal tate hapter hapter dmissible vs onsistent Heuristics onsistency is a slightly stronger/stricter requirement than admissibility. consistentheuristics admissibleheuristics dmissible heuristics are usually consistent. Not easy to concort admissible, but not consistent heuristics. E.g., for the 8-puzzle: dmissible heuristics h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance (i.e., no. of squares from desired location of each tile) tart tate Goal tate h 1 () =?? 6 h 2 () =?? = 14 hapter hapter 3 108

28 Dominance If h 2 (n) h 1 (n) for all n (both admissible) then h 2 dominates h 1 and is faster for search Typical search costs: d = 14 ID = 3,473,941 nodes (h 1 ) = 539 nodes (h 2 ) = 113 nodes d = 24 ID 54,000,000,000 nodes (h 1 ) = 39,135 nodes (h 2 ) = 1,641 nodes Given any admissible heuristics h a, h b, h(n) = max(h a (n),h b (n)) elaxed problems contd. Well-known example: travelling salesperson problem (TP) Find the shortest tour visiting all cities exactly once Minimum spanning tree can be computed in O(n 2 ) and is a lower bound on the shortest (open) tour is also admissible and dominates h a, h b hapter hapter elaxed problems dmissible 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 ummary Problem formulation usually requires abstracting away real-world details to define a state space that can feasibly be explored Variety of uninformed search strategies Iterative deepening search uses only linear space and not much more time than other uninformed algorithms Graph search can be exponentially more efficient than tree search hapter hapter 3 112

29 ummary Heuristic functions estimate costs of shortest paths Good heuristics can dramatically reduce search cost Greedy best-first search expands lowest h incomplete and not always optimal search expands lowest g +h complete and optimal also optimally efficient (up to tie-breaks, for forward search) dmissible heuristics can be derived from exact solution of relaxed problems hapter 3 113

Problem solving and search

Problem solving and search Problem solving and search hapter 3 hapter 3 1 Outline Problem-solving agents Problem types Problem formulation Example problems asic search algorithms hapter 3 2 estricted form of general agent: Problem-solving

More information

Problem solving by search

Problem solving by search Problem solving by search based on tuart ussel s slides (http://aima.cs.berkeley.edu) February 27, 2017, E533KUI - Problem solving by search 1 Outline Problem-solving agents Problem types Problem formulation

More information

Problem solving and search

Problem solving and search Problem solving and search hapter 3 hapter 3 1 eminders ssignment 0 due midnight Thursday 9/8 ssignment 1 posted, due 9/20 (online or in box in 283) hapter 3 2 Outline Problem-solving agents Problem types

More information

Reminders. Problem solving and search. Problem-solving agents. Outline. Assignment 0 due 5pm today

Reminders. Problem solving and search. Problem-solving agents. Outline. Assignment 0 due 5pm today ssignment 0 due 5pm today eminders Problem solving and search ssignment 1 posted, due 2/9 ection 105 will move to 9-10am starting next week hapter 3 hapter 3 1 hapter 3 2 Outline Problem-solving agents

More information

Problem-solving agents. Problem solving and search. Example: Romania. Reminders. Example: Romania. Outline. Chapter 3

Problem-solving agents. Problem solving and search. Example: Romania. Reminders. Example: Romania. Outline. Chapter 3 Problem-solving agents Problem solving and search hapter 3 function imple-problem-olving-gent( percept) returns an action static: seq, an action sequence, initially empty state, some description of the

More information

Outline. Problem solving and search. Problem-solving agents. Example: Romania. Example: Romania. Problem types. Problem-solving agents.

Outline. Problem solving and search. Problem-solving agents. Example: Romania. Example: Romania. Problem types. Problem-solving agents. Outline Problem-solving agents Problem solving and search hapter 3 Problem types Problem formulation Example problems asic search algorithms hapter 3 1 hapter 3 3 estricted form of general agent: Problem-solving

More information

Problem solving and search

Problem solving and search Problem solving and search hapter 3 hapter 3 1 Outline Problem-solving agents Problem types Problem formulation Example problems asic search algorithms hapter 3 3 Example: omania On holiday in omania;

More information

Problem solving and search: Chapter 3, Sections 1 5

Problem solving and search: Chapter 3, Sections 1 5 Problem solving and search: hapter 3, Sections 1 5 S 480 2 Outline Problem-solving agents Problem types Problem formulation Example problems asic search algorithms Problem-solving agents estricted form

More information

Problem solving and search: Chapter 3, Sections 1 5

Problem solving and search: Chapter 3, Sections 1 5 Problem solving and search: hapter 3, Sections 1 5 1 Outline Problem-solving agents Problem types Problem formulation Example problems asic search algorithms 2 Problem-solving agents estricted form of

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

Problem Solving and Search. Chapter 3

Problem Solving and Search. Chapter 3 Problem olving and earch hapter 3 Outline Problem-solving agents Problem formulation Example problems asic search algorithms In the simplest case, an agent will: formulate a goal and a problem; Problem-olving

More information

Solving problems by searching

Solving problems by searching olving problems by searching Uninformed search lides from ussell & Norvig book, revised by ndrea oli Problem-solving agents Problem types Problem formulation Example problems asic search algorithms Outline

More information

Outline. Solving problems by searching. Prologue. Example: Romania. Uninformed search

Outline. Solving problems by searching. Prologue. Example: Romania. Uninformed search Outline olving problems by searching Uninformed search lides from ussell & Norvig book, revised by ndrea oli Problem-solving agents Problem types Problem formulation Example problems asic search algorithms

More information

Problem solving and search

Problem solving and search Problem solving and search hapter 3 hapter 3 1 Outline Problem-solving agents Problem types Problem formulation Example problems asic search algorithms hapter 3 3 Restricted form of general agent: Problem-solving

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

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

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

Artificial Intelligence: Search Part 1: Uninformed graph search

Artificial Intelligence: Search Part 1: Uninformed graph search rtificial Intelligence: Search Part 1: Uninformed graph search Thomas Trappenberg January 8, 2009 ased on the slides provided by Russell and Norvig, hapter 3 Search outline Part 1: Uninformed search (tree

More information

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

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 2: Search 1. rtificial Intelligence, S, Nanjing University Spring, 2018, Yang Yu Lecture 2: Search 1 http://lamda.nju.edu.cn/yuy/course_ai18.ashx Problem in the lecture 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State

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

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 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

Planning and search. Lecture 1: Introduction and Revision of Search. Lecture 1: Introduction and Revision of Search 1

Planning and search. Lecture 1: Introduction and Revision of Search. Lecture 1: Introduction and Revision of Search 1 Planning and search Lecture 1: Introduction and Revision of Search Lecture 1: Introduction and Revision of Search 1 Lecturer: Natasha lechina email: nza@cs.nott.ac.uk ontact and web page web page: http://www.cs.nott.ac.uk/

More information

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

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 How to Solve a (Simple) Problem 7 2 4 1 2 5 6 3 4 5 8 3 1 6 7 8 Start State Goal State Chapter 3 2 Introduction Simple goal-based agents can solve problems

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 Problem formulation & examples Basic search algorithms Outline Chapter 3 2 On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest

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

Artificial Intelligence Problem Solving and Uninformed Search

Artificial Intelligence Problem Solving and Uninformed Search Artificial Intelligence Problem Solving and Uninformed Search Maurizio Martelli, Viviana Mascardi {martelli, mascardi}@disi.unige.it University of Genoa Department of Computer and Information Science AI,

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

Multiagent Systems Problem Solving and Uninformed Search

Multiagent Systems Problem Solving and Uninformed Search Multiagent Systems Problem Solving and Uninformed Search Viviana Mascardi viviana.mascardi@unige.it MAS, University of Genoa, DIBRIS Classical AI 1 / 36 Disclaimer This presentation may contain material

More information

Solving problems by searching

Solving problems by searching Solving problems by searching Chapter 3 Systems 1 Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Systems 2 Problem-solving agents Systems 3 Example:

More information

Outline. Solving problems by searching. Problem-solving agents. Example: Romania

Outline. Solving problems by searching. Problem-solving agents. Example: Romania Outline Solving problems by searching Chapter 3 Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Systems 1 Systems 2 Problem-solving agents Example: Romania

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

Chapter 2. Blind Search 8/19/2017

Chapter 2. Blind Search 8/19/2017 Chapter 2 1 8/19/2017 Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms 8/19/2017 2 8/19/2017 3 On holiday in Romania; currently in Arad. Flight leaves tomorrow

More information

CS 380: Artificial Intelligence Lecture #3

CS 380: Artificial Intelligence Lecture #3 CS 380: Artificial Intelligence Lecture #3 William Regli Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms 1 Problem-solving agents Example: Romania

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence S:4420 rtificial Intelligence Spring 2018 Uninformed Search esare Tinelli The University of Iowa opyright 2004 18, esare Tinelli and Stuart Russell a a These notes were originally developed by Stuart Russell

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

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

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

Solving Problem by Searching. Chapter 3

Solving Problem by Searching. Chapter 3 Solving Problem by Searching Chapter 3 Outline Problem-solving agents Problem formulation Example problems Basic search algorithms blind search Heuristic search strategies Heuristic functions Problem-solving

More information

Solving problems by searching

Solving problems by searching Solving problems by searching 1 C H A P T E R 3 Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Outline 2 Problem-solving agents 3 Note: this is offline

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

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

Solving Problems by Searching. AIMA Sections , 3.6

Solving Problems by Searching. AIMA Sections , 3.6 AIMA Sections 3.1 3.3, 3.6 Outline Problem-solving agents Problem types Problem formulation Example problems General search algorithm Problem-solving agents function Simple-Problem--Agent( percept) returns

More information

4. Solving Problems by Searching

4. Solving Problems by Searching COMP9414/9814/3411 15s1 Search 1 COMP9414/ 9814/ 3411: Artificial Intelligence 4. Solving Problems by Searching Russell & Norvig, Chapter 3. Motivation Reactive and Model-Based Agents choose their actions

More information

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3. COMP9414/9814/3411 17s1 Search 1 COMP9414/ 9814/ 3411: Artificial Intelligence Week 3: Path Search Russell & Norvig, Chapter 3. Motivation Reactive and Model-Based Agents choose their actions based only

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 3, 4/6/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes 4/6/2005 EE562 1 Today: Basic

More information

ITCS 6150 Intelligent Systems. Lecture 3 Uninformed Searches

ITCS 6150 Intelligent Systems. Lecture 3 Uninformed Searches ITCS 6150 Intelligent Systems Lecture 3 Uninformed Searches Outline Problem Solving Agents Restricted form of general agent Problem Types Fully vs. partially observable, deterministic vs. stochastic Problem

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

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

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

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

Solving problems by searching. Chapter 3

Solving problems by searching. Chapter 3 Solving problems by searching Chapter 3 Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms 2 Example: Romania On holiday in Romania; currently in

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

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

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

AI: problem solving and search

AI: problem solving and search : problem solving and search Stefano De Luca Slides mainly by Tom Lenaerts Outline Problem-solving agents A kind of goal-based agent Problem types Single state (fully observable) Search with partial information

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

CS 8520: Artificial Intelligence

CS 8520: Artificial Intelligence CS 8520: Artificial Intelligence Solving Problems by Searching Paula Matuszek Spring, 2013 Slides based on Hwee Tou Ng, aima.eecs.berkeley.edu/slides-ppt, which are in turn based on Russell, aima.eecs.berkeley.edu/slides-pdf.

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

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

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

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

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

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

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems Uninformed Search Problem-solving agents Tree search algorithms Single-State Problems Breadth-First Search Depth-First Search Limited-Depth Search Iterative Deepening Extensions Graph search algorithms

More information

Problem Solving by Searching

Problem Solving by Searching Problem Solving by Searching R&N: 3.1-3.3 Michael Rovatsos University of Edinburgh 20 th January 2015 Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching CS486/686 University of Waterloo Sept 11, 2008 1 Outline Problem solving agents and search Examples Properties of search algorithms Uninformed search Breadth first Depth first

More information

CS486/686 Lecture Slides (c) 2015 P.Poupart

CS486/686 Lecture Slides (c) 2015 P.Poupart 1 2 Solving Problems by Searching [RN2] Sec 3.1-3.5 [RN3] Sec 3.1-3.4 CS486/686 University of Waterloo Lecture 2: May 7, 2015 3 Outline Problem solving agents and search Examples Properties of search algorithms

More information

CS486/686 Lecture Slides (c) 2014 P.Poupart

CS486/686 Lecture Slides (c) 2014 P.Poupart 1 2 1 Solving Problems by Searching [RN2] Sec 3.1-3.5 [RN3] Sec 3.1-3.4 CS486/686 University of Waterloo Lecture 2: January 9, 2014 3 Outline Problem solving agents and search Examples Properties of search

More information

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search Overview Last time Depth-limited, iterative deepening and bi-directional search Avoiding repeated states Today Show how applying knowledge

More information

Outline. Solving Problems by Searching. Introduction. Problem-solving agents

Outline. Solving Problems by Searching. Introduction. Problem-solving agents Outline Solving Problems by Searching S/ University of Waterloo Sept 7, 009 Problem solving agents and search Examples Properties of search algorithms Uninformed search readth first Depth first Iterative

More information

Solving problems by searching

Solving problems by searching Solving problems by searching Chapter 3 CS 2710 1 Outline Problem-solving agents Problem formulation Example problems Basic search algorithms CS 2710 - Blind Search 2 1 Goal-based Agents Agents that take

More information

KI-Programmierung. Basic Search Algorithms

KI-Programmierung. Basic Search Algorithms KI-Programmierung Basic Search Algorithms Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2007/2008 B. Beckert: KI-Programmierung p.1 Example: Travelling in Romania Scenario On holiday in Romania;

More information

Artificial Intelligence Uninformed search

Artificial Intelligence Uninformed search Artificial Intelligence Uninformed search A.I. Uninformed search 1 The symbols&search hypothesis for AI Problem-solving agents A kind of goal-based agent Problem types Single state (fully observable) Search

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

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

Chapter 3 Solving problems by searching

Chapter 3 Solving problems by searching 1 Chapter 3 Solving problems by searching CS 461 Artificial Intelligence Pinar Duygulu Bilkent University, Slides are mostly adapted from AIMA and MIT Open Courseware 2 Introduction Simple-reflex agents

More information

Solving Problems using Search

Solving Problems using Search Solving Problems using Search Artificial Intelligence @ Allegheny College Janyl Jumadinova September 11, 2018 Janyl Jumadinova Solving Problems using Search September 11, 2018 1 / 35 Example: Romania On

More information

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search 1 Class Tests Class Test 1 (Prolog): Tuesday 8 th November (Week 7) 13:00-14:00 LIFS-LT2 and LIFS-LT3 Class Test 2 (Everything but Prolog)

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

Solving Problems by Searching. Artificial Intelligence Santa Clara University 2016

Solving Problems by Searching. Artificial Intelligence Santa Clara University 2016 Solving Problems by Searching Artificial Intelligence Santa Clara University 2016 Problem Solving Agents Problem Solving Agents Use atomic representation of states Planning agents Use factored or structured

More information

Pengju XJTU 2016

Pengju XJTU 2016 Introduction to AI Chapter03 Solving Problems by Uninformed Searching(3.1~3.4) Pengju Ren@IAIR Outline Problem-solving agents Problem types Problem formulation Search on Trees and Graphs Uninformed algorithms

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

SOLVING PROBLEMS BY SEARCHING

SOLVING PROBLEMS BY SEARCHING ontents Foundations of rtificial Intelligence 3. olving Problems by earching Problem-olving gents, Formulating Problems, earch trategies Wolfram urgard, ernhard Nebel, and Martin iedmiller lbert-udwigs-universität

More information

AGENTS AND ENVIRONMENTS. What is AI in reality?

AGENTS AND ENVIRONMENTS. What is AI in reality? AGENTS AND ENVIRONMENTS What is AI in reality? AI is our attempt to create a machine that thinks (or acts) humanly (or rationally) Think like a human Cognitive Modeling Think rationally Logic-based Systems

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

A2 Uninformed Search

A2 Uninformed Search 2 Uninformed Search Hantao Zhang http://www.cs.uiowa.edu/ hzhang/c145 The University of Iowa Department of omputer Science rtificial Intelligence p.1/82 Example: The 8-puzzle 2 8 3 1 7 6 4 5 It can be

More information

Example: The 8-puzzle. A2 Uninformed Search. It can be generalized to 15-puzzle, 24-puzzle, or. (n 2 1)-puzzle for n 6. Department of Computer Science

Example: The 8-puzzle. A2 Uninformed Search. It can be generalized to 15-puzzle, 24-puzzle, or. (n 2 1)-puzzle for n 6. Department of Computer Science 2 Uninformed Search Hantao Zhang http://www.cs.uiowa.edu/ hzhang/c145 The University of Iowa Department of omputer Science rtificial Intelligence p.1/82 Example: The 8-puzzle 2 1 7 8 3 6 4 5 It can be

More information

Search. Intelligent agents. Problem-solving. Problem-solving agents. Road map of Romania. The components of a problem. that will take me to the goal!

Search. Intelligent agents. Problem-solving. Problem-solving agents. Road map of Romania. The components of a problem. that will take me to the goal! Search Intelligent agents Reflex agent Problem-solving agent T65 rtificial intelligence and Lisp Peter alenius petda@ida.liu.se epartment of omputer and Information Science Linköping University Percept

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

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search 1 Class Tests Class Test 1 (Prolog): Friday 17th November (Week 8), 15:00-17:00. Class Test 2 (Everything but Prolog) Friday 15th December

More information

AGENTS AND ENVIRONMENTS. What is AI in reality?

AGENTS AND ENVIRONMENTS. What is AI in reality? AGENTS AND ENVIRONMENTS What is AI in reality? AI is our attempt to create a machine that thinks (or acts) humanly (or rationally) Think like a human Cognitive Modeling Think rationally Logic-based Systems

More information

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics, Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics, performance data Pattern DBs? General Tree Search function

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

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

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

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

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