Goal-Based Agents Problem solving as search. Outline

Size: px
Start display at page:

Download "Goal-Based Agents Problem solving as search. Outline"

Transcription

1 Goal-Based Agents Problem solving as search Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery Outline Goal-based agents Design of simple goal-based agents Discrete, fully observable states Discrete actions Problem formulation Problem solving as search State space search Example problems (Review of) Basic (Uninformed) Search Algorithms 1

2 Problem Formulation Formulate the goals Explicit specification Implicit specification (goal predicate) Formulate the actions Preconditions (before) Post-conditions (after) Design a representation that Captures relevant aspects of the world Abstracts away unimportant details Example: 8-puzzle States? Position of each tile on the board Initial state? Any state can be initial Actions? {Left, Right, Up, Down} Goal test? Check whether goal configuration is reached 2

3 Problem Formulation Simplifying assumptions Discrete, fully observable states in class, at home Discrete actions Mary executes action Go home in state in class to reach the at home state In this setup, we can t speak of Mary being on her way home Passive environment All state changes due to the agent s action Mary can t end up at home because her mom picked her up Representation A representation Maps each (physical) state of the external environment into the corresponding abstract state via sensors Maps each (physical) action on an environmental state into an abstract action on the corresponding abstract state Maps effects of an abstract action on an abstract state into a corresponding effect on the corresponding environmental state via effectors The mapping from environmental states and abstract states is many to one abstract state to an environmental state is one to many 3

4 Representation The mapping from environmental states and abstract states is many to one abstract state to an environmental state is one to many A representation induces a partition over environmental states 4 abstract states, 12 abstract actions (if we allow only lateral or vertical moves not all environmental state transitions can be thought about by the agent) Representation Effects of abstract actions in the abstract state space is fully deterministic and predictable.. But.. The corresponding effects of the physical actions on the environmental state space are predictable to the extent allowed by the resolution of the representation and the fidelity of sensors and effectors 4

5 Representation A representation Is a surrogate inside an agent s brain for entities that exist in the external world Is not just a data structure why? Derives its semantics through grounding (sensors, effectors) Embodies a set of ontological commitments assumptions about the entities, properties, relationships, and actions that we care about Properties of representations expressive power complexity,.. More on representations later Problem Formulation Formulate the goals Explicit specification Implicit specification (goal predicate) Formulate the actions Preconditions (before) Post-conditions (after) Design a representation that Captures relevant aspects of the world Abstracts away unimportant details 5

6 Example: Missionaries and Cannibals Initial state: 3 missionaries, 3 cannibals, and the boat on the left bank of the river Goal: all on the right bank Constraints: The boat which can carry at most 2 people at a time If missionaries are outnumbered by cannibals, the cannibals will eat the missionaries States: The positions of missionaries, cannibals, and the boat on either side of the river Actions: Movement of the boat with its occupants from one side of the river to the other Solution: A sequence of boat trips across the river complete with their passenger lists Example: Getting around in Romania 6

7 Example: Getting around in Romania On holiday in Romania; currently in Arad Flight leaves tomorrow from Bucharest Formulate goal Be in Bucharest Formulate problem States: various cities Actions: drive between cities Find solution Sequence of cities; e.g. Arad, Sibiu, Fagaras, Bucharest, Problem formulation in the observable, deterministic case A problem is defined by: An initial state, e.g. Arad Successor function S(X)= set of action-state pairs e.g. S(Arad)={<Arad Zerind, Zerind>, } Goal test, can be Explicit, e.g. x= at bucharest Implicit, e.g. checkmate(x) Initial state + successor function defines a state space A solution is a sequence of actions from the initial to goal state 7

8 Basic State Space Search Problem A state space search problem is specified by a 3-tuple (s, A, G) where s is a start state s S, the set of possible start states O is the set of actions (operators) Partial functions that map a state into another G the set of goal states G may be explicitly enumerated or implicitly specified using a goal predicate goal (g) = True iff g G Solution to a state space search problem is a sequence of action applications leading from the start state s to a goal g G Problem formulation finding an optimal solution A problem is defined by: An initial state, e.g. Arad Successor function S(X)= set of action-state pairs e.g. S(Arad)={<Arad Zerind, Zerind>, } intial state and the successor function together define the state space Goal test Explicit, e.g. x= at bucharest Implicit, e.g. checkmate(x) Path cost (additive) e.g. sum of distances, number of actions executed, c(x,a,y) is the step cost, assumed to be 0 Optimal solution has the lowest path cost 8

9 Finding an optimal solution All operator applications may not be equally expensive Suppose we have a cost function c: Q x O + c (q,o,r) = cost of applying operator o in state q to reach state r Path cost is typically assumed to be the sum of costs of operator applications along the path An optimal solution is one with the lowest cost path from the specified start state s to a goal g G State space representation Real world can be absurdly complex State space representation is an abstraction (Abstract) state corresponds to a set of real world states (Abstract) action corresponds to a complex combination of real world actions e.g. Arad Zerind represents a complex set of possible routes, detours, rest stops, etc. The abstraction is valid if the path between two states is reflected in the real world. (Abstract) solution = set of real paths that are solutions in the real world. 9

10 Importance of Representation Sticks and Squares Problem 17 sticks arranged in 6 squares Goal remove 5 sticks so we are left with exactly 3 squares (no extra sticks) What is the size of the state space? Importance of Representation Sticks and Squares Problem 17 sticks arranged in 6 squares Goal remove 5 sticks so we are left with exactly 3 squares (no extra sticks) What is the size of the state space? Depends on the representation 10

11 Importance of representation Ontological commitment matters Abstraction matters Granularity of the representation matters Good representations preserve the relevant aspects of the problem expose the relevant problem structure Bad representations Lose potentially relevant information obscure the relevant problem structure How to automatically discover good representations is a fundamental problem in AI Millions of years of evolution have given humans a head start Example: vacuum world States? Initial state? Actions? Goal test? Path cost? 11

12 Example: vacuum world States? two locations with or without dirt, with or without the vacuum cleaner: 2 x 2 2 =8 states. Initial state? Any state can be initial Actions? {Left, Right, Suck} Goal test? Check whether both locations are clean. Path cost? Number of actions to reach goal Example: 8-puzzle States? Initial state? Actions? Goal test? Path cost? 12

13 Example: 8-puzzle States? Integer location of each tile Initial state? Any state can be initial Actions? {Left, Right, Up, Down} Goal test? Check whether goal configuration is reached Path cost? Number of actions to reach goal Example: 8-queens problem Constraints: No two queens can share A row A column A diagonal States? Initial state? Actions? Goal test? Path cost? 13

14 Example: 8-queens problem Problem formulation States? Any arrangement of 0 to 8 queens on the board Initial state? Empty board (no queens) Actions? Add a queen in empty square Goal test? 8 queens on board and none under attack State space representation: 8-queens problem Solution 1 Any arrangement of 0 to 8 queens on the board 64 squares, 8 queens (64)(63)(62)(61)..(57) states! 14

15 State space representation: 8-queens problem Solution 2 Any arrangement of 0 to 8 queens on the board 8 rows need to specify the column in which a queen is placed in each row (8)(7)(6)(5)(4)(3)(2) states! Absorbed the `no two queens can share a row constraint into the representation! Example: 8-queens problem Solution 3 Any arrangement of 0 to 8 queens on the board States: n (0 n 8) queens on the board, one per column in the n leftmost columns with no queen attacking another Actions: Add a queen to the leftmost empty column so as not to attack the other queens Number of states = 2057 Representation matters! 15

16 Finding solution State space search Let L be a list of nodes yet to be expanded 1. Let L = (s) 2. If L is empty, return failure else pick a node n from L (which node?) 3. If n is a goal node, a. return path from s to n and stop. b. Otherwise i. Delete n from L ii. Expand n: Add to L all of n s successors (where?) 4. Return to 2. State space search A state is an (internal representation of) a physical configuration A node is a data structure that is used to construct a search tree A node has a parent, successors, and includes bookkeeping information e.g., depth, node = <state, parent-node, action, depth..> Each arc corresponds to an operator application Each node in the search tree implicitly represents a candidate partial solution 16

17 Basic Search strategies A search strategy specifies a particular order of node expansion Search strategies are evaluated in terms of: Completeness: Does it always find a solution if one exists? Admissibility Russell and Norvig call this optimality Does it always find an optimal solution? Time Complexity Number of nodes generated or expanded Space Complexity memory needed to store L during search Optimality Optimal in its use of space, time, or both Analysis of Basic Search strategies Time and space complexity are measured in terms of problem difficulty defined by: b - maximum branching factor of the search tree d - depth of the least-cost solution m - maximum depth of the state space (may be ) Assumptions Uniform, finite branching factor b A single goal node exists at a finite depth d Goal is uniformly distributed at depth d Maximum depth of search space is m 17

18 Uninformed (blind) search strategies Use only information available in problem definition Blind search strategies: Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search Bidirectional search BF search, an example Expand shallowest unexpanded node Implementation: L is a FIFO queue Nodes on L = (A) A 18

19 BF search, an example Expand shallowest unexpanded node Implementation: L is a FIFO queue A L = (B, C) B C BF-search, an example Expand shallowest unexpanded node Implementation: L is a FIFO queue L = (C, D, E) A B C D E 19

20 BF search, an example Expand shallowest unexpanded node Implementation: L is a FIFO queue L = (D, E, F, G) A B C D E E F G BF search (BFS) Is BFS complete? Is BFS guaranteed to find a solution if one exists? Yes (b is finite, d is finite) 20

21 BFS space complexity Worst case space complexity Every node at depth d must be on the list L before a solution at depth d can be found In the worst case, all successors of depth d non-goal nodes must be on the list before a solution at depth d can be found BFS time complexity Worst case time complexity - Number of nodes generated - Number of nodes expanded 21

22 BFS time complexity - Average case time complexity - number of nodes expanded - Best case = - Worst case = - The goal is uniformly distributed at depth d - Expected case time complexity BFS Is BFS admissible? Yes, if all operator costs are equal Otherwise, in general, No Is BFS optimal? As we will see later, No We can do significantly better than BFS in terms of space requirement 22

23 BFS Summary Memory requirements are more problematic than execution time Uninformed search methods are infeasible for all but the smallest problem instances DEPTH NODES TIME MEMORY seconds 1 megabyte seconds 106 megabytes minutes 10 gigabytes hours 1 terabyte days 101 terabytes years 10 petabytes years 1 exabyte b = 10, processing speed = 10,000 nodes / sec space = 1000 bytes per node Depth first search (DFS) Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) L = (A) A 23

24 DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) B A C L = (B C) DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (=stack) A L = (D E C) BB C C D E 24

25 DFS, an example Expand the deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E H I I DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (=stack) A B C D E H I 25

26 DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) B A C D E H I DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E H I J K 26

27 DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E H I J K DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E H I J K 27

28 DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E F G H I J K DFS, an example Expand deepest unexpanded node Implementation: L is a LIFO queue (stack) A B C D E F G H I J K L M 28

29 DFS Completeness Is DFS guaranteed to find a solution if one exists? No! unless search space is finite and no loops are possible Admissibility Is DFS guaranteed to find an optimal solution? No! DFS Space Complexity b-1 b-1 Space complexity where m = maximum depth of the search space 29

30 DFS Space Complexity Unlike BFS, DFS has space complexity that grows linearly in b and m Space complexity of DFS can be further improved to O(m) with backtracking search Each partially expanded node remembers which successor to generate next Avoids the need to put all successors on the list DFS Summary Worst case time complexity: Space complexity O(mb) or even O(m) Complete? No Admissible? No Optimal? No 30

31 BFS and DFS BFS is complete, but has terrible space complexity DFS has attractive space complexity, but is not complete Can we get the best of both worlds? Iterative deepening search (IDS) Combines benefits of DFS and BFS 1. Set depth limit l =1 2. Perform DFS with depth limit l 3. If solution is found, return solution 4. Otherwise, increment depth limit l and return to step 2 Space complexity O(bd) or O(d) if backtracking is used Time complexity 31

32 Summary of IDS IDS is complete IDS is admissible (if actions have equal cost) IDS is an optimal blind search algorithm Time complexity Solution located at depth d Cannot avoid examining O( b d ) nodes Time complexity of IDS is optimal Space complexity Run time O( b d ) Must be able to count up to b d Counter needs O(d) bits IDS, example Limit=0 32

33 IDS, example Limit=1 IDS, example Limit=2 33

34 IDS, example Limit=3 Bidirectional search Two simultaneous searches from start and goal states Check whether a node belongs to the other fringe before expansion The predecessor of a node must be easy to compute helps if the actions are reversible Complete and optimal if both searches are BF 34

35 Criterion Summary of algorithms Breadth -First Depth- First Iterative deepening Bidirectional Complete? YES NO YES YES* Time b d+1 b m b d b d/2 Space b d+1 bm bd b d/2 Admissible? YES NO YES YES* Optimal? NO NO YES NO Assuming all arc costs are equal m max depth of search d depth of solution, b finite branching factor * Assuming forward and backward search are BFS Repeated states Failure to detect repeated states can turn a solvable problems into unsolvable ones 35

36 Graph search algorithm Use an open list to store the list of nodes to be expanded Use a closed list to store previously expanded nodes Maintaining closed list means space complexity of DFS and IDS can t be linear Cycles need to be dealt with Search with partial information Previous assumption: Environment is fully observable Environment is deterministic Agent knows the effects of its actions What if knowledge of states or actions is incomplete? 36

37 Search with partial information Partial knowledge of states and actions: Sensorless or conformant problem Agent may have no idea the state it is in Agent knows the effects of its actions contingency problem Percepts provide new information about current state solution is a tree or policy interleave search and execution If uncertainty is caused by actions of another agent: adversarial problem exploration problem When states and actions of the environment are unknown Start in {1,2,3,4,5,6,7,8} e.g Right goes to {2,4,6,8} Solution? [Right, Suck, Left,Suck] When the world is not observable reason about a set of states that might be reached Actions correspond to transitions between sets of states (belief states) Sensorless problems 37

38 Search space of belief states Solution = belief state with each member being a goal state If the state space has S states then there are 2 S belief states in the worst case what if the environment is non deterministic? Conformant problems Belief state of vacuum-world 38

39 Contingency problems Contingency, start in {1,3} Murphy s law, Suck can dirty a clean carpet Local sensing: dirt, location only Percept = [L,Dirty] ={1,3} [Suck] = {5,7} [Right] ={6,8} [Suck] in {6}={8} (Success) BUT [Suck] in {8} = failure Contingency problems Solution? [Suck, Right, if [R,dirty] then Suck] It is hard to account for every possible contingency before acting Select actions based on contingencies arising during execution 39

40 Exploration problems Can be viewed as an extreme case of contingency problems Often solved using reinforcement learning 40

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Problem Solving. Russell and Norvig: Chapter 3

Problem Solving. Russell and Norvig: Chapter 3 Problem Solving Russell and Norvig: Chapter 3 Example: Route finding Example: 8-puzzle 8 2 3 4 7 6 5 6 Initial state 7 8 Goal state Example: 8-puzzle 8 2 7 8 2 3 4 5 6 3 4 7 5 6 8 2 8 2 3 4 7 3 4 7 5 6

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

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

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

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

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

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

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

CS 151: Intelligent Agents, Problem Formulation and Search

CS 151: Intelligent Agents, Problem Formulation and Search CS 151: Intelligent Agents, Problem Formulation and Search How do we make a computer "smart?" Computer, clean the house! Um OK?? This one's got no chance How do we represent this problem? Hmmm where to

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 2014 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 2017 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Problem-solving

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

Pengju

Pengju 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

Problem solving Basic search. Example: Romania. Example: Romania. Problem types. Intelligent Systems and HCI D7023E. Single-state problem formulation

Problem solving Basic search. Example: Romania. Example: Romania. Problem types. Intelligent Systems and HCI D7023E. Single-state problem formulation Intelligent Systems and HI 7023 Lecture 3: asic Search Paweł Pietrzak Problem solving asic search 1 2 xample: Romania On holiday in Romania; currently in rad. light leaves tomorrow from ucharest ormulate

More information

3 SOLVING PROBLEMS BY SEARCHING

3 SOLVING PROBLEMS BY SEARCHING 48 3 SOLVING PROBLEMS BY SEARCHING A goal-based agent aims at solving problems by performing actions that lead to desirable states Let us first consider the uninformed situation in which the agent is not

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

Why Search. Things to consider. Example, a holiday in Jamaica. CSE 3401: Intro to Artificial Intelligence Uninformed Search

Why Search. Things to consider. Example, a holiday in Jamaica. CSE 3401: Intro to Artificial Intelligence Uninformed Search CSE 3401: Intro to Artificial Intelligence Uninformed Search Why Search Required Readings: R & N Chapter 3, Sec. 1-4. Lecture slides adapted from those of Fahiem Bacchus. Successful Success in game playing

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

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

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

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

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

9/7/2015. Outline for today s lecture. Problem Solving Agents & Problem Formulation. Task environments

9/7/2015. Outline for today s lecture. Problem Solving Agents & Problem Formulation. Task environments Problem Solving Agents & Problem Formulation Defining Task Environments (AIMA 2.3) Environment types Formulating Search Problems Search Fundamentals AIMA 2.3, 3.1-3 2 3 Task environments To design a rational

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

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

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

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department Princess Nora University Faculty of Computer & Information Systems 1 ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department (CHAPTER-3-PART1) PROBLEM SOLVING AND SEARCH (Course coordinator) WHY

More information

ARTIFICIAL INTELLIGENCE. Pathfinding and search

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

More information

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

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

Uninformed Search. Reading: Chapter 4 (Tuesday, 2/5) HW#1 due next Tuesday

Uninformed Search. Reading: Chapter 4 (Tuesday, 2/5) HW#1 due next Tuesday Uninformed Search Reading: Chapter 4 (Tuesday, 2/5) HW#1 due next Tuesday 1 Uninformed Search through the space of possible solutions Use no knowledge about which path is likely to be best Exception: uniform

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

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

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 CS457 David Kauchak Fall 2011

Informed Search CS457 David Kauchak Fall 2011 Admin Informed Search CS57 David Kauchak Fall 011 Some material used from : Sara Owsley Sood and others Q3 mean: 6. median: 7 Final projects proposals looked pretty good start working plan out exactly

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

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

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

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

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

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

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

Today s s lecture. Lecture 2: Search - 1. Examples of toy problems. Searching for Solutions. Victor R. Lesser

Today s s lecture. Lecture 2: Search - 1. Examples of toy problems. Searching for Solutions. Victor R. Lesser Today s s lecture Lecture 2: Search - 1 Victor R. Lesser CMPSCI 683 Fall 2004 Why is search the key problem-solving technique in AI? Formulating and solving search problems. Understanding and comparing

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

COMP3702/7702 Artificial Intelligence Week2: Search (Russell & Norvig ch. 3)" Hanna Kurniawati"

COMP3702/7702 Artificial Intelligence Week2: Search (Russell & Norvig ch. 3) Hanna Kurniawati COMP3702/7702 Artificial Intelligence Week2: Search (Russell & Norvig ch. 3)" Hanna Kurniawati" Last week" What is Artificial Intelligence?" Some history" Agent defined" The agent design problem" Search:

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 1 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space Search 2 Formal State-Space Model Problem = (S, s, A,

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

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree Uninformed Search Russell and Norvig chap. 3 D E 1 Unexpanded s: the fringe Tree search nitial state t every point in the search process we keep track of a list of s that haven t been expanded yet: the

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 Agents

Problem Solving Agents Problem Solving Agents Well-defined Problems Solutions (as a sequence of actions). Examples Search Trees Uninformed Search Algorithms Well-defined Problems 1. State Space, S An Initial State, s 0 S. A

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