ARTIFICIAL INTELLIGENCE. Pathfinding and search

Size: px
Start display at page:

Download "ARTIFICIAL INTELLIGENCE. Pathfinding and search"

Transcription

1 INFOB2KI Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Pathfinding and search Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from

2 Pathfinding `Physical world: open space or structured? 2

3 Pathfinding in Romania 3

4 1. State space Searching E.g. all cities on a map, or all possible paths in a grid or (waypoint) graph 2. Operators or production rules E.g. change from one path to another by changing some arcs 3. Strategy How to search through the state space E.g. Systematic (desirable, not always possible): All states are visited No state is visited more than once 4

5 Selecting a state space Real world is absurdly complex state space must be abstracted for problem solving (Abstract) state S represents (set of) real state(s) A problem typically assigns an initial state (e.g "in Arad ) and a goal state (e.g. "in Zerind ) (Abstract) action S S represents complex combination of real actions Each abstract action should be "easier" than the original problem e.g., "Arad Zerind" represents a complex set of possible routes, detours, rest stops, etc. (Abstract) solutions represent solutions in the real world for guaranteed realizability, a sequence of actions maps initial state to goal state E.g list of connections = real path 5

6 State space and path finding Often the state space is too large to represent all solutions create while searching (! Simple search algorithms typically build trees (tree search) or graphs (graph search) with solutions; these terms do not refer to the representation of physical world or state space!) Create (portions of) all paths while finding a good path between two points Be careful, in pathfinding state space is NOT necessarily the same as all nodes of the grid/waypoint graph! State space could be the set of all paths (lists of connections) on this grid/graph! 6

7 Dijkstra s algorithm Bookkeeping: Open list (seen, but not processed) Closed list (completely processed) Cost so far + connection followed to get there Edsger W. Dijkstra Init: Open list (start node, cost so far=0) Iteration: Process node from open list with smallest cost so far Terminate: When open list is empty Follow back connections to retrieve path 7

8 Dijkstra s algorithm Open: (Arad,0) Closed: 8

9 Dijkstra s algorithm Open: (Z,75) Arrad, (S,140) A, (T,118) A Closed: (Arad,0) 9

10 Dijkstra s algorithm Open: (S,140) A, (T,118) A, (O,146) Z Closed: (Arad,0), (Z,75) A 10

11 Dijkstra s algorithm Open: (S,140) A, (O,146) Z, (L,229) T Closed: (Arad,0), (Z,75) A, (T,118) A 11

12 Dijkstra s algorithm > 146 Open: (O,146) Z, (L,229) T, (R,220) S, (F,239) S Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A 12

13 Dijkstra s algorithm Open: (L,229) T, (R,220) S, (F,239) S Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (O,146) Z 13

14 Dijkstra s algorithm Open: (L,229) T, (F,239) S, (C,366) R, (P,317) R Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (O,146) Z, (R,220) S 14

15 Dijkstra s algorithm Open: (F,239) S, (C,366) R, (P,317) R, (M,299) L Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (O,146) Z, (R,220) S, (L,229) T 15

16 Dijkstra s algorithm Open: (C,366) R, (P,317) R, (M,299) L, Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (B,450) F (O,146) Z, (R,220) S, (L,229) T, (F,239) S 16

17 Dijkstra s algorithm Open: (C,366) R, (P,317) R, (B,450) F, Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (D,374) M (O,146) Z, (R,220) S, (L,229) T, (F,239) S, (M,299) L 17

18 Dijkstra s algorithm >366 Open: (C,366) R, (B,450) F, (D,374) M, Closed:(Arad,0), (Z,75) A, (T,118) A, (S,140) A, (B,418) P (O,146) Z, (R,220) S, (L,229) T, (F,239) S, (M,299) L, (P,317) R 18

19 Dijkstra s algorithm >374 Open: (D,374) M, (B,418) P Closed:(Arad,0), (Z,75) A, (T,118) A, (S,140) A, (O,146) Z, (R,220) S, (L,229) T, (F,239) S, (M,299) L, (P,317) R, (C,366) R 19

20 Dijkstra s algorithm Open: (B,418) P Etc. Closed: (Arad,0), (Z,75) A, (T,118) A, (S,140) A (O,146) Z, (R,220) S, (L,229) T, (F,239) S, (M,299) L, (P,317) R, (C,366) R, (Dijkstra continues, we stop ) (D,374) M 20

21 Dijkstra s algorithm Retrieve path to Bucharest (Arad,0), (Z,75) A, (T,118) A, (S,140) A, (O,146) Z, (R,220) S, (L,229) T, (F,239) S, (M,299) L, (P,317) R, (C,366) R, (D,374) M, (B,418) P 21

22 Dijkstra s algorithm Start with paths of length 1 and expand the one with lowest (non negative!) cost first Graph search algorithm that solves the single source shortest path problem All paths in the graph will be found (and no path will be found more than once) Not aimed at finding path to one specific goal 22

23 Tree search algorithms Simulated exploration of state space by generating successors of already explored states (a.k.a. expanding) start state initial node of tree expand: generate leafs for successors fringe (= frontier = open list) with all leafs goal state: used in goal test Note: goal test when node is considered for expansion, not already upon generation! 23

24 Implementation: states vs. nodes As before: a state S is an abstract representation of a physical configuration A node x is part of a search tree or search graph; it is a data structure containing info on: state S parent node action path cost g(x), depth, Expand: function that creates new nodes fills in the various node fields uses problem associated Successor Fn to generate successors 25

25 Tree search example Node for initial state Arad in fringe 26

26 Tree search example Node related to state Arad is expanded and removed from fringe Nodes related to states Sibiu (~path from Arad to Sibiu), Timisoara and Zerind are generated and added to the fringe 27

27 Tree search example Suppose strategy selects node related to state Sibiu for expansion: a.o. node related to state Arad is generated and added to the fringe oops.there s a loop.! 28

28 Repeated states Failure to detect repeated states can turn a linear problem into an exponential one! 29

29 Avoiding loops Method 1: Don t add a node to the fringe if we generated a node for the associated state before What if there are multiple paths to a node and we want to be sure to get the shortest? Method 2: Graph search Don t add a node to the fringe if we expanded a node for the associated state before Keep a closed (=explored=visited) list of expanded states (c.f. Dijkstra) This is not for free: takes up time and memory! 30

30 Search strategies A search strategy defines the order of node expansion Strategies are evaluated along the following dimensions: completeness: does it always find a solution if one exists? optimality: does it always find a least cost solution? time complexity: how long does it take to find a solution? space complexity: how much memory is needed? Time and space complexity are measured in terms of b: maximum branching factor of the search tree (max # succ.) d: depth of the least cost solution (start with d=0) m: maximum length of path in state space (may be ) total number of nodes generated (= time) maximum number of nodes in memory (= space) Solution quality Search complexity 32

31 Uninformed search strategies Use only the information available in the problem definition (a.k.a. blind search) Breadth first search Uniform cost search Depth first search Depth limited search Iterative deepening search (BFS) (UCS) (DFS) (DLS) (IDS) Can only generate successors and distinguish goalstate from non goal state 33

32 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end ties:(in this case) queue in alphabetical order fringe = A 34

33 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end ties:(in this case) queue in alphabetical order fringe = BC 35

34 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end ties:(in this case) queue in alphabetical order fringe = CDE 36

35 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end ties:(in this case) queue in alphabetical order fringe = DEFG 37

36 Properties of BFS Assumption: goal test upon generation, finite d Complete? Yes, as long as b is finite Optimal? Yes, if step costs equal shallowest == optimal Time? 1+b+b 2 +b 3 + +b d = O(b d ) (if goal test upon expansion: + b(b d 1) = O(b d+1 )) Space? same as time dominate costs for closed list in graph search Exponential space is bigger problem (even more than time) works only for smaller instances 38

37 Uniform-cost search Expand least cost unexpanded node Like Dijkstra, but now with goal test Implementation: fringe = priority queue, ordered by path cost g(n) Equivalent to breadth first search if step costs all equal! But step costs need not be equal (even though the name may suggest otherwise)! 39

38 Properties of UCS Assumption: finite d; ε = minimal step cost; C* = cost of cheapest solution Complete? Yes, if ε > 0 and b is finite Optimal? Yes: nodes expanded in increasing order of g(n) Time? O(b ceiling(c*/ ε) ) (# of nodes with path cost g C * ) Space? O(b ceiling(c*/ ε) ) typically dominate costs for closed list in graph search 40

39 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = A 41

40 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = BC 42

41 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = DEC 43

42 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = HIEC 44

43 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = IEC done at H 45

44 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = EC done at I done at D 46

45 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = JKC 47

46 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = KC done at J 48

47 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = C done at K done at E done at B 49

48 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = FG 50

49 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = LMG 51

50 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front ties:(in this case) stack in reverse alphabetical order fringe = MG Etc. done at L 52

51 Properties of DFS Complete? No, unless graph search in finite state space, finite d Optimal? No, it finds left most solution, regardless of cost Time? O(b m ) terrible if m is much larger than d but if solutions are dense, may be much faster than breadth first Space? O(bm), in case of tree search ( black nodes are removed from memory) Advantage may be lost in graph search due to costs for closed list! 53

52 Depth-limited search = depth first search with depth limit l, i.e., nodes at depth l do not generate successors solves infinite path problem (m = ) Recursive implementation: 54

53 Properties of DLS Note: DFS is special case of DLS with l = m (possibly ) Complete? Not if l < d (do we know d??) Optimal? Not if d < l Time? O(b l ) Space? O(bl) Again advantage may be lost in graph search due to costs for closed list! 55

54 Iterative deepening search Repeats DFS for increasing depth limit Finds best depth limit Combines benefits of BFS and DFS 56

55 Iterative deepening search limit=0 57

56 Iterative deepening search limit=1 58

57 Iterative deepening search limit=2 59

58 Iterative deepening search limit=3 60

59 Iterative deepening search Number of nodes generated in a depth limited search (DLS) to depth d with branching factor b: N DLS = b 0 + b 1 + b b d 2 + b d 1 + b d Number of nodes generated in an iterative deepening search (ITS) to depth d with branching factor b: N IDS = (d+1)b 0 + d b 1 + (d 1)b b d 2 +2b d 1 + 1b d For b = 10, d = 5: N DLS = , , ,000 = 111,111 N IDS = , , ,000 = 123,456 Overhead = (123, ,111)/111,111 = 11% 61

60 Assumption: finite d Properties of IDS Complete? Yes Optimal? Yes Inherited from BFS; same assumptions apply Time? O(b d ) (d+1)b 0 + d b 1 + (d 1)b b d Space? O(bd) Inherited from DFS, but max depth restricted to d; same observations wrt graph search apply 62

61 Summary of search algorithms This overview assumes tree search, with goal test upon expansion, and finite solution depth d. Recall (!): most yes s and no s depend on additional assumptions Space complexity may be different if graph search is employed Is there one best algorithm? 63

62 Summary pathfinding and uninformed search Algorithms find path to goal Problem specific ingredients used only for: Goal test Path cost (used in solution, and sometimesfor expansion) 64

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

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

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 771 Artificial Intelligence. Problem Solving by Searching Uninformed search

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search CS 771 Artificial Intelligence Problem Solving by Searching Uninformed search Complete architectures for intelligence? Search? Solve the problem of what to do. Learning? Learn what to do. Logic and inference?

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

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

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

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

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

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/ Solving problems by searching

More information

CS 4700: Foundations of Artificial Intelligence. Bart Selman. Search Techniques R&N: Chapter 3

CS 4700: Foundations of Artificial Intelligence. Bart Selman. Search Techniques R&N: Chapter 3 CS 4700: Foundations of Artificial Intelligence Bart Selman Search Techniques R&N: Chapter 3 Outline Search: tree search and graph search Uninformed search: very briefly (covered before in other prerequisite

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

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

Uninformed search strategies (Section 3.4) Source: Fotolia

Uninformed search strategies (Section 3.4) Source: Fotolia Uninformed search strategies (Section 3.4) Source: Fotolia Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information

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

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

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

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

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

Uninformed (also called blind) search algorithms

Uninformed (also called blind) search algorithms Uninformed (also called blind) search algorithms First Lecture Today (Thu 30 Jun) Read Chapters 18.6.1-2, 20.3.1 Second Lecture Today (Thu 30 Jun) Read Chapter 3.1-3.4 Next Lecture (Tue 5 Jul) Chapters

More information

Solving Problems: Blind Search

Solving Problems: Blind Search Solving Problems: Blind 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 are

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

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

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

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

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

Uninformed Search. CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop. Reading: R&N

Uninformed Search. CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop. Reading: R&N Uninformed Search CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop Reading: R&N 3.1-3.4 Uninformed search strategies Uninformed (blind): You have no clue whether one non-goal

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

Lecture 3. Uninformed Search

Lecture 3. Uninformed Search Lecture 3 Uninformed Search 1 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any other. Your search is blind. You don t know if your

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

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

Basic Search. Fall Xin Yao. Artificial Intelligence: Basic Search

Basic Search. Fall Xin Yao. Artificial Intelligence: Basic Search Basic Search Xin Yao Fall 2017 Fall 2017 Artificial Intelligence: Basic Search Xin Yao Outline Motivating Examples Problem Formulation From Searching to Search Tree Uninformed Search Methods Breadth-first

More information

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3 ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING Chapter 3 1 PROBLEM SOLVING We want: To automatically solve a problem We need: A representation of the problem Algorithms that use some strategy to

More information

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING BY SEARCH Gabriela Ochoa http://www.cs.stir.ac.uk/~goc/ OUTLINE Problem solving by searching Problem formulation Example problems Search

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

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

CAP 4630 Artificial Intelligence

CAP 4630 Artificial Intelligence CAP 4630 Artificial Intelligence Instructor: Sam Ganzfried sganzfri@cis.fiu.edu 1 http://www.ultimateaiclass.com/ https://moodle.cis.fiu.edu/ 2 Solving problems by search 3 8-puzzle 4 8-queens 5 Search

More information

Uninformed search strategies

Uninformed search strategies Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the informa:on available in the problem defini:on Breadth- first search

More information

Search EECS 395/495 Intro to Artificial Intelligence

Search EECS 395/495 Intro to Artificial Intelligence Search EECS 395/495 Intro to Artificial Intelligence Doug Downey (slides from Oren Etzioni, based on Stuart Russell, Dan Weld, Henry Kautz, and others) What is Search? Search is a class of techniques for

More information

CSC 2114: Artificial Intelligence Search

CSC 2114: Artificial Intelligence Search CSC 2114: Artificial Intelligence Search Ernest Mwebaze emwebaze@cit.ac.ug Office: Block A : 3 rd Floor [Slide Credit Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. Reference materials

More information

Search EECS 348 Intro to Artificial Intelligence

Search EECS 348 Intro to Artificial Intelligence Search EECS 348 Intro to Artificial Intelligence (slides from Oren Etzioni, based on Stuart Russell, Dan Weld, Henry Kautz, and others) What is Search? Search is a class of techniques for systematically

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

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

521495A: Artificial Intelligence

521495A: Artificial Intelligence 521495A: Artificial Intelligence Search Lectured by Abdenour Hadid Associate Professor, CMVS, University of Oulu Slides adopted from http://ai.berkeley.edu Agent An agent is an entity that perceives the

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

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

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

Chapter 3. A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states.

Chapter 3. A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states. Chapter 3 A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states. A problem can be defined by four components : 1. The

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

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

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

Chapter3. Problem-Solving Agents. Problem Solving Agents (cont.) Well-defined Problems and Solutions. Example Problems.

Chapter3. Problem-Solving Agents. Problem Solving Agents (cont.) Well-defined Problems and Solutions. Example Problems. Problem-Solving Agents Chapter3 Solving Problems by Searching Reflex agents cannot work well in those environments - state/action mapping too large - take too long to learn Problem-solving agent - is one

More information

Set 2: State-spaces and Uninformed Search. ICS 271 Fall 2015 Kalev Kask

Set 2: State-spaces and Uninformed Search. ICS 271 Fall 2015 Kalev Kask Set 2: State-spaces and Uninformed Search ICS 271 Fall 2015 Kalev Kask You need to know State-space based problem formulation State space (graph) Search space Nodes vs. states Tree search vs graph search

More information

Uninformed Search Strategies AIMA 3.4

Uninformed Search Strategies AIMA 3.4 Uninformed Search Strategies AIMA 3.4 CIS 391-2015 1 The Goat, Cabbage, Wolf Problem (From xkcd.com) CIS 391-2015 2 But First: Missionaries & Cannibals Three missionaries and three cannibals come to a

More information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic Problem Solving: Uninformed Search Simple reflex agent only transfers the current percept

More information

Graph Search. Chris Amato Northeastern University. Some images and slides are used from: Rob Platt, CS188 UC Berkeley, AIMA

Graph Search. Chris Amato Northeastern University. Some images and slides are used from: Rob Platt, CS188 UC Berkeley, AIMA Graph Search Chris Amato Northeastern University Some images and slides are used from: Rob Platt, CS188 UC Berkeley, AIMA What is graph search? Start state Goal state Graph search: find a path from start

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

Announcements. Project 0: Python Tutorial Due last night

Announcements. Project 0: Python Tutorial Due last night Announcements Project 0: Python Tutorial Due last night HW1 officially released today, but a few people have already started on it Due Monday 2/6 at 11:59 pm P1: Search not officially out, but some have

More information

Vorlesung Grundlagen der Künstlichen Intelligenz

Vorlesung Grundlagen der Künstlichen Intelligenz Vorlesung Grundlagen der Künstlichen Intelligenz Reinhard Lafrenz / Prof. A. Knoll Robotics and Embedded Systems Department of Informatics I6 Technische Universität München www6.in.tum.de lafrenz@in.tum.de

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Berlin Chen 2004 Reference: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 3 1 Introduction Problem-Solving Agents vs. Reflex Agents Problem-solving

More information

TDDC17. Physical Symbol System Hypothesis. Designation and Interpretation. Physical Symbol Systems

TDDC17. Physical Symbol System Hypothesis. Designation and Interpretation. Physical Symbol Systems Physical Symbol System Hypothesis Computer Science as Empirical Enquiry: Symbols and Search Newell and Simon (1976) TDDC17 Seminar II Search I Physical Symbol Systems Uninformed Search Newell and Simon

More information

Solving Problems by Searching (Blindly)

Solving Problems by Searching (Blindly) Solving Problems by Searching (Blindly) R&N: Chap. 3 (many of these slides borrowed from Stanford s AI Class) Problem Solving Agents Decide what to do by finding a sequence of actions that lead to desirable

More information

Uninformed Search Methods

Uninformed Search Methods Uninformed Search Methods Search Algorithms Uninformed Blind search Breadth-first uniform first depth-first Iterative deepening depth-first Bidirectional Branch and Bound Informed Heuristic search Greedy

More information

521495A: Artificial Intelligence

521495A: Artificial Intelligence 521495A: Artificial Intelligence Informed Search Lectured by Abdenour Hadid Adjunct Professor, CMVS, University of Oulu Slides adopted from http://ai.berkeley.edu Today Informed Search Heuristics Greedy

More information

Problem Solving as Search. CMPSCI 383 September 15, 2011

Problem Solving as Search. CMPSCI 383 September 15, 2011 Problem Solving as Search CMPSCI 383 September 15, 2011 1 Today s lecture Problem-solving as search Uninformed search methods Problem abstraction Bold Claim: Many problems faced by intelligent agents,

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

Search I. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig

Search I. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig Search I slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig Problem-Solving Agents Intelligent agents can solve problems by searching a state-space State-space Model the agent s model of

More information

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

COMP219: Artificial Intelligence. Lecture 7: Search Strategies COMP219: Artificial Intelligence Lecture 7: Search Strategies 1 Overview Last time basic ideas about problem solving; state space; solutions as paths; the notion of solution cost; the importance of using

More information

UNINFORMED SEARCH. What to do if teammates drop? Still have 3 or more? No problem keep going. Have two or fewer and want to be merged?

UNINFORMED SEARCH. What to do if teammates drop? Still have 3 or more? No problem keep going. Have two or fewer and want to be merged? UNINFORMED SEARCH EECS492 January 14, 2010 Administrative What to do if teammates drop? Still have 3 or more? No problem keep going. Have two or fewer and want to be merged? We ll do what we can. Submitting

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

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

CS 4100 // artificial intelligence

CS 4100 // artificial intelligence CS 4100 // artificial intelligence instructor: byron wallace Search I Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials Thanks to John DeNero

More information

Uninformed Search strategies. AIMA sections 3.4,3.5

Uninformed Search strategies. AIMA sections 3.4,3.5 AIMA sections 3.4,3.5 search use only the information available in the problem denition Breadth-rst search Uniform-cost search Depth-rst search Depth-limited search Iterative deepening search Breadth-rst

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

CMU-Q Lecture 2: Search problems Uninformed search. Teacher: Gianni A. Di Caro

CMU-Q Lecture 2: Search problems Uninformed search. Teacher: Gianni A. Di Caro CMU-Q 15-381 Lecture 2: Search problems Uninformed search Teacher: Gianni A. Di Caro RECAP: ACT RATIONALLY Think like people Think rationally Agent Sensors? Actuators Percepts Actions Environment Act like

More information

Search Algorithms. Uninformed Blind search. Informed Heuristic search. Important concepts:

Search Algorithms. Uninformed Blind search. Informed Heuristic search. Important concepts: Uninformed Search Search Algorithms Uninformed Blind search Breadth-first uniform first depth-first Iterative deepening depth-first Bidirectional Branch and Bound Informed Heuristic search Greedy search,

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

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Agents, Goal-Based Agents, Problem-Solving Agents Search Problems Blind Search Strategies Agents sensors environment percepts actions? agent effectors Definition. An agent

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Agents, Goal-Based Agents, Problem-Solving Agents Search Problems Blind Search Strategies Agents sensors environment percepts actions? agent effectors Definition. An agent

More information

Chapter 3: Solving Problems by Searching

Chapter 3: Solving Problems by Searching Chapter 3: Solving Problems by Searching Prepared by: Dr. Ziad Kobti 1 Problem-Solving Agent Reflex agent -> base its actions on a direct mapping from states to actions. Cannot operate well in large environments

More information

Chapter 4. Uninformed Search Strategies

Chapter 4. Uninformed Search Strategies Chapter 4. Uninformed Search Strategies An uninformed (a.k.a. blind, brute-force) search algorithm generates the search tree without using any domain specific knowledge. The two basic approaches differ

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

Uninformed Search Strategies AIMA

Uninformed Search Strategies AIMA Uninformed Search Strategies AIMA 3.3-3.4 CIS 421/521 - Intro to AI - Fall 2017 1 Review: Formulating search problems Formulate search problem States: configurations of the puzzle (9! configurations) Actions:

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

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

Blind (Uninformed) Search (Where we systematically explore alternatives)

Blind (Uninformed) Search (Where we systematically explore alternatives) Blind (Uninformed) Search (Where we systematically explore alternatives) R&N: Chap. 3, Sect. 3.3 5 Slides from Jean-Claude Latombe at Stanford University (used with permission) Simple Problem-Solving-Agent

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

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches Blind Searches Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL-STATE[problem]))

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

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems S 331: rtificial Intelligence Uninformed Search 1 Real World Search Problems 2 1 Simpler Search Problems 3 Static Observable Discrete Deterministic Single-agent ssumptions bout Our Environment 4 2 Search

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

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II CS 5522: Artificial Intelligence II Search Algorithms Instructor: Wei Xu Ohio State University [These slides were adapted from CS188 Intro to AI at UC Berkeley.] Today Agents that Plan Ahead Search Problems

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

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems S 331: rtificial Intelligence Uninformed Search 1 Real World Search Problems 2 1 Simpler Search Problems 3 ssumptions bout Our Environment Fully Observable Deterministic Sequential Static Discrete Single-agent

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

Uninformed Search. Chapter 3

Uninformed Search. Chapter 3 Uninformed Search Chapter 3 (Based on slides by Stuart Russell, Subbarao Kambhampati, Dan Weld, Oren Etzioni, Henry Kautz, Richard Korf, and other UW-AI faculty) Agent s Knowledge Representation Type State

More information

PEAS: Medical diagnosis system

PEAS: Medical diagnosis system PEAS: Medical diagnosis system Performance measure Patient health, cost, reputation Environment Patients, medical staff, insurers, courts Actuators Screen display, email Sensors Keyboard/mouse Environment

More information