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

Size: px
Start display at page:

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

Transcription

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

2 Last week" What is Artificial Intelligence?" Some history" Agent defined" The agent design problem" Search: A way to solve the problem" 2

3 How to build an agent?" Formulating the agent design problem:" Defining the components involved." Defining the problem." Solving the problem" Computing what the agent should do" Basically our topic most of the semester" 3

4 The Agent Design Problem The Components" The first step to formulating an agent design problem is to set the following components:" Action space (A)" Percept space (O)" State space (S)" World dynamics (T: SXA S)" Percept function (Z: S O)" Utility function (U: S real number)"

5 Formulating the agent design problem: Defining The Problem" The agent design problem: Find a mapping from sequences of percepts to action P* A that maximizes the utility function. " Given the sequences of percepts it has seen so far, what should the agent do next, so that the utility function can be maximized."

6 In the first part of this class," Assumptions on class environment:" Fully observable vs. partially observable." Does the agent know the state of the world exactly?" Deterministic vs. non-deterministic." Does an action map one state into a single other state?" Static vs. dynamic." Can the world change while the agent is thinking?" Discrete vs. continuous." Are the actions & percepts discrete?"

7 Last week" What is Artificial Intelligence?" Some history" Agent defined" The agent design problem" Search: A way to solve the problem Today" 7

8 Today" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 8

9 What is search?" A general framework to solve problems by exploring alternatives." Alternatives come from knowledge about the problem." Example: " Twisted nail puzzle." 8-puzzle." 9 7" 2" 4" 5" 6" 8" 3" 1" Initial state" 1" 2" 3" 4" 5" 6" 7" 8" Goal state"

10 What is search?" 7" 2" 4" 5" 6" 8" 3" 1" Knowledge: world dynamics" 7" 2" 4" 7" 2" 4" 7" 4" 7" 2" 4" 5" 6" 5" 6" 5" 2" 6" 5" 3" 6" 8" 3" 1" 8" 3" 1" 8" 3" 1" 8" 1" 10

11 Today" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 12

12 Formulating a problem as a search problem" Similar to formulation of rational agent:" Action space." Percept space." State space." World dynamics." Percept function" Utility: Cost function." Initial & goal state." Formulation of rational agent." Find a sequence of actions to move the agent from being in the initial state to being in the goal state, (such that the cost of moving is minimized)." 13

13 In this part of the class," Assumptions on class environment:" Fully observable vs. partially observable." Does the agent know the state of the world exactly?" Deterministic vs. non-deterministic." Does an action map one state into a single other state?" Static vs. dynamic." Can the world change while the agent is thinking?" Discrete vs. continuous." Are the actions & percepts discrete?" 14

14 Formulating a problem as a search problem" Similar to formulation of rational agent:" Action space." Percept space." State space." World dynamics." Percept function" Utility: Cost function." Initial & goal state." Formulation of rational agent." Due to fully observable assumption." 15

15 The 8-puzzle example" Action space (A): {up, down, left, right} for the empty cell." State space (S): All possible permutations." World dynamics (SXA S)" Utility: Each move of the blank tile cost -1 (to reach the goal with smallest #steps)." Initial & goal state: Given." 7" 2" 4" 5" 6" 8" 3" 1" Initial state" 1" 2" 3" 4" 5" 6" 7" 8" Goal state" 16

16 Introduction to search" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 17

17 Recall Formulating a problem as a search problem" Similar to formulation of rational agent:" Action space." Percept space." State space." World dynamics." Percept function" Utility: Cost function." Initial & goal state." Formulation of rational agent." Find a sequence of actions to move the agent from being in the initial state to being in the goal state, (such that the cost of moving is minimized)." 18

18 State graph representation " Graph: (V, E)" Each vertex ( v V ) represents a state" Initial & goal state: Initial & goal vertices." Edges (E) " Represents world dynamics (T: SXA S)." vv' E a A Each edge labeled by an action represents the mapping T(s, a) = sʼ, where s is the state represented by v and sʼ is the state represented by vʼ." "The edge is often labeled with cost to move from the state s to sʼ too" 19

19 State graph representation " The solution is a path from initial to goal vertices in the state graph." Cost: the sum of the cost associated with each edge in the path." Optimal solution: Path with least cost." 20

20 The 8-puzzle example" ; -1" Right ; -1" Left ; -1" Down ; -1" Top ; -1"

21 State graph representation" A way to represent the problem concretely in programs. Also a way of thinking about the problem. " We may or may not explicitly represent the state graph." In problems with continuous or very large state space, state graph is often used as a compact representation of the state space." 22

22 Today" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 24

23 General structure of search algorithm" Put initial vertex in a container of states to be expanded." Loop" Select a vertex v from the container." If v is the goal vertex, then return." Expand v (i.e., put the results of successor(v) to the container )." successor(v), a function that:" Takes a vertex v as input." Output the set of immediate next vertices that can be visited from v (i.e., the end-point of out-edges from v)." 25

24 Search tree: An abstract representation of the container " State graph" Search tree" If states can be revisited, the search tree maybe infinite, even though the state graph (& state space) is finite." 26

25 Fringe nodes" Nodes in the search tree that have not been expanded yet." Fringe nodes" 27

26 General structure of search algorithm with search tree as container " Put the initial vertex as root of the search tree." Loop" Select a node t from the search tree." If t corresponds to the goal vertex, then return." Expand t" Suppose t corresponds to vertex v of the state graph." Put the results of successor(v) as children of t in the search tree." In general, only select a node from the fringe nodes." Various search methods differ in how they select a vertex from the container / a node in the search tree. " 28

27 Today" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 29

28 Performance measure of search algorithms" Completeness" Complete: The algorithm will find the solution whenever one exists." What happened when no solution exists?" Optimality" Optimal: Return a minimum cost path whenever one exists." Complexity" Amount of time & memory needed to solve the problem." Use big-o notation. " 30

29 Computational complexity" Indicates how fast the problem difficulty grows as the input size increases" Here, weʼll only use big-o notation" O(g(n)) = {f(n) there exist positive constants c and n 0 such that 0 f(n) c.g(n) for all n n 0 } " If the number of operation is f(n) where n is the size of input" We say f(n) = O(g(n)) to indicate that f(n) is a member of O(g(n))" 31

30 Computational complexity example" For (i = 1 ; i < length(a) ; i ++) {" " valuetoinsert = A[i]" holepos = i" while (holepos > 0 and valuetoinsert < A[holePos-1]) {" " " A[holePos] = A[holePos-1]" holepos = holepos-1" }" A[holePos] = valuetoinsert " "}" F(n) = c 1.( n-1) + c 2.(n-1)" "n: length(a)" Complexity: O(n 2 )" For more info, please look at the resource section of the class website." 32

31 Today" What is search?" Formulating a problem as a search problem" State graph representation" General structure of search algorithms" Performance measure of search algorithms" Blind search" Informed search" 33

32 Problem example: Navigation app" Given a map, how do I move from A to B?" I! G! State graph" Weʼll use this example throughout to explain the various search algorithms." 35

33 Blind search algorithms" Blind search: Do not use additional information to estimate the cost form the current node to the goal" Breadth first search (BFS)" Depth first search (DFS)" Iterative deepening DFS "" Uniform cost search" 36

34 Breadth first search (BFS)" Cost: #steps (ignore cost on the edges)." Select a fringe node in the same level of the search tree, before selecting fringe nodes at the next level. " I! G! 37

35 Breadth first search (BFS)" Use queue to keep fringe nodes." Queue: Abstract data structure where the most recent data is retrieved last (FIFO: First In First Out)." Set the initial vertex I as root of the search tree." Push I to the queue." Loop" t = front of the queue. " Remove t from the queue." If t is the goal vertex, then return." Otherwise," Put the results of successor(t) as children of t in the search tree." Push the results of successor(t) at the back of the queue." 38

36 Breadth first search (BFS) Properties & Analysis" b: branching factor" d: depth of shallowest goal node. " Complete?" Complete, if b is finite." Generate optimal solution?" Yes (in #steps)." Complexity" Time: O(b d ) #nodes visited" "1 + b + b b d = (b d+1-1)/(b-1)." Space: O(b d ) #nodes to remember" 39

37 Just to get some intuition " d" # Nodes" Time" Memory" 2" 110".11 msec" 107 Kbytes" 4" 11,110" 11 msec " 10.6 Mbyte" 6" ~10 6 " 1 sec" 1 Gbytes" 8" ~10 8 " ~2min" 103 Gbytes" 10" ~10 10 " ~2.8 hours" 10 Tbyte" 12" ~10 12 " ~11.6 days" 1 Pbytes" 14" ~10 14 " ~3.2 years" 99 Pbytes" Assumptions: b = 10; 1million nodes/sec; 1 Kbytes/node" 40

38 Just to get some intuition " d" # Nodes" Time" Memory" 2" 110".11 msec" 107 Kbytes" Well 4" just 11,110" wait for better 11 msec hardware " 10.6 Mbyte" After all, computer speed becomes double every 18 months " 6" ~10 6 " 1 sec" 1 Gbytes" Yeah right " The 8" waiting ~10 8 time " for ~2min" the hardware 103 maybe Gbytes" more than the 10" waiting ~10time " to solve ~2.8 hours" the problem " 10 Tbyte" 12" ~10 12 " ~11.6 days" 1 Pbytes" 14" ~10 14 " ~3.2 years" 99 Pbytes" Assumptions: b = 10; 1million nodes/sec; 1 Kbytes/node" 41

39 Bidirectional Strategy" 2 fringe queues: FRINGE1 and FRINGE2" Initial" s Goal" Time and space complexity is O(b d/2 ) << O(b d ) " 42

40 Depth first search (DFS)" Cost: #steps (ignore cost on the edges)." Expand a fringe node most recently inserted to the tree. " I! G! 43

41 Depth first search (DFS)" Use stack to keep fringe nodes." Stack: Abstract data structure where the most recent data is retrieved first (LIFO: Last In First Out)." Set the initial vertex I as root of the search tree." Push I to the stack." Loop" t = top of the stack. " Remove t from the stack." If t is the goal vertex, then return." Otherwise," Put the results of successor(t) as children of t in the search tree." Push the results of successor(t) to the stack." 44

42 Depth first search (DFS) Properties & Analysis" b: branching factor, m: maximum depth" d: depth of shallowest goal node. " Complete?" Complete, if m is finite and no loop in the state graph / avoid revisiting states." Generate optimal solution?" No." Complexity" Time: O(b m ) 1 + b + b b m = (b m+1-1)/(b-1). " Space: Can be implemented using O(bm) or O(m) using backtracking DFS. But be careful of revisiting vertices (states). " 45

43 Avoid revisiting states" Donʼt add node to the tree if a node representing the same state is already in the tree." Problem: Paths leading to the same node may have different cost." Donʼt add node to the tree if a node representing the same state has been expanded in the search tree." Valid for any search method." 46

44 Bidirectional & DFS" Will it work well?" 49

45 BFS, DFS, & Iterative Deepening DFS" BFS: " Finds minimum step path, but requires exponential space." DFS: " Efficient in space, but no path length guarantee." Iterative deepening: " Multiple DFS with increasing depth-cutoff until the goal is found." For k = 1, 2, do" Perform DFS with depth cutoff k." "Only generates nodes with depth k. " 50

46 Iterative deepening DFS" Cost: #steps (ignore cost on the edges)." Example" I! G! 51

47 Iterative Deepening DFS Properties & Analysis" b: branching factor, m: maximum depth" d: depth of shallowest goal node. " Complete?" Yes. If b is finite." Generate optimal solution?" Yes (in terms of #steps)." Complexity" Time: O(b d ) " "db + (d-1)b (1)b d " Space: O(bd) " 52

Assignment 1 is out! Due: 9 Sep 23:59! Can work in a group of 2-3 students.! NO cheating!!!! Submit in turnitin! Code + report!

Assignment 1 is out! Due: 9 Sep 23:59! Can work in a group of 2-3 students.! NO cheating!!!! Submit in turnitin! Code + report! Assignment 1 is out! Due: 9 Sep 23:59! Submit in turnitin! Code + report! Can work in a group of 2-3 students.! Please register your group in the website linked from the assignment description before tomorrow

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

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

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE https://cw.fel.cvut.cz/wiki/courses/a4b33zui/start Michal Pechoucek, Branislav Bosansky, Jiri Klema & Olga Stepankova Department of Computer Science Czech

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 1 Simple Problem-Solving-Agent Agent Algorithm 1. s 0 sense/read initial state 2. GOAL? select/read goal

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

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

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

A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE https://cw.fel.cvut.cz/wiki/courses/

A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE https://cw.fel.cvut.cz/wiki/courses/ A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE https://cw.fel.cvut.cz/wiki/courses/ Michal Pechoucek & Jiri Klema Department of Computer Science Czech Technical University in Prague In parts based

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

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

Can work in a group of at most 3 students.! Can work individually! If you work in a group of 2 or 3 students,!

Can work in a group of at most 3 students.! Can work individually! If you work in a group of 2 or 3 students,! Assignment 1 is out! Due: 26 Aug 23:59! Submit in turnitin! Code + report! Can work in a group of at most 3 students.! Can work individually! If you work in a group of 2 or 3 students,! Each member must

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

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

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

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

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

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

More information

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

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

Intelligent Agents. Foundations of Artificial Intelligence. Problem-Solving as Search. A Simple Reflex Agent. Agent with Model and Internal State

Intelligent Agents. Foundations of Artificial Intelligence. Problem-Solving as Search. A Simple Reflex Agent. Agent with Model and Internal State Intelligent s Foundations of Artificial Intelligence Problem-Solving as Search S7 Fall 007 Thorsten Joachims : Anything that can be viewed as perceiving its environment through sensors and acting upon

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

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

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

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

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

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

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

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

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

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

Goal-Based Agents Problem solving as search. Outline

Goal-Based Agents Problem solving as search. Outline Goal-Based Agents Problem solving as search Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

CS 8520: Artificial Intelligence

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

More information

Artificial Intelligence

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

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

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

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

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

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

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

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

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

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

Uninformed Search (Ch )

Uninformed Search (Ch ) Uninformed Search (Ch. 3-3.4) Announcements First homework will be posted tonight (due next Wednesday at 11:55 pm) Review We use words that have a general English definition in a technical sense nd Rational=choose

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

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

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

Uninformed Search Strategies

Uninformed Search Strategies Uninformed Search Strategies Alan Mackworth UBC CS 322 Search 2 January 11, 2013 Textbook 3.5 1 Today s Lecture Lecture 4 (2-Search1) Recap Uninformed search + criteria to compare search algorithms - Depth

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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 INF5390 Kunstig intelligens Sony Vaio VPC-Z12 Solving Problems by Searching Roar Fjellheim Outline Problem-solving agents Example problems Search programs Uninformed search Informed search Summary AIMA

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

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

Solving Problems by Searching

Solving Problems by Searching INF5390 Kunstig intelligens Solving Problems by Searching Roar Fjellheim Outline Problem-solving agents Example problems Search programs Uninformed search Informed search Summary AIMA Chapter 3: Solving

More information

A2 Uninformed Search

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

More information

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

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

More information

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

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

CPS 170: Artificial Intelligence Search

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

More information

Solving problems by searching

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

More information

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

Week 4 Lecture Notes Part 1 Blind Search cont. and Informed Search

Week 4 Lecture Notes Part 1 Blind Search cont. and Informed Search Week 4 Lecture Notes Part 1 Blind Search cont. and Informed Search Created by Nicholas Collins (s4291997) and Nicholas Mayer (s4289230) Admin Assignment 1 is due 9 September, not 4 September as it says

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

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

Search : Lecture 2. September 9, 2003

Search : Lecture 2. September 9, 2003 Search 6.825: Lecture 2 September 9, 2003 1 Problem-Solving Problems When your environment can be effectively modeled as having discrete states and actions deterministic, known world dynamics known initial

More information

Class Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 2: Search. Problem Solving Agents

Class Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 2: Search. Problem Solving Agents Class Overview COMP 3501 / COMP 4704-4 Lecture 2: Search Prof. 1 2 Problem Solving Agents Problem Solving Agents: Assumptions Requires a goal Assume world is: Requires actions Observable What actions?

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

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

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

Problem Solving and Searching

Problem Solving and Searching Problem Solving and Searching CS 171/ 271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig s published material 1 Problem Solving Agent Function 2 Problem Solving Agent

More information

CS510 \ Lecture Ariel Stolerman

CS510 \ Lecture Ariel Stolerman CS510 \ Lecture02 2012-10-03 1 Ariel Stolerman Midterm Evan will email about that after the lecture, at least 2 lectures from now. The exam will be given in a regular PDF (not an online form). We will

More information

Search. CS 3793/5233 Artificial Intelligence Search 1

Search. CS 3793/5233 Artificial Intelligence Search 1 CS 3793/5233 Artificial Intelligence 1 Basics Basics State-Space Problem Directed Graphs Generic Algorithm Examples Uninformed is finding a sequence of actions that achieve a goal from an initial state.

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

Uninformed Search. (Textbook Chpt 3.5) Computer Science cpsc322, Lecture 5. May 18, CPSC 322, Lecture 5 Slide 1

Uninformed Search. (Textbook Chpt 3.5) Computer Science cpsc322, Lecture 5. May 18, CPSC 322, Lecture 5 Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) May 18, 2017 CPSC 322, Lecture 5 Slide 1 Recap Search is a key computational mechanism in many AI agents We will study the basic

More information

Problem Solving & Heuristic Search

Problem Solving & Heuristic Search 190.08 Artificial 2016-Spring Problem Solving & Heuristic Search Byoung-Tak Zhang School of Computer Science and Engineering Seoul National University 190.08 Artificial (2016-Spring) http://www.cs.duke.edu/courses/fall08/cps270/

More information

CS540 Uninformed Search

CS540 Uninformed Search CS540 Uninformed Search Xiaojin Zhu jerryzhu@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison slide 1 Main messages Many AI problems can be formulated as search. Iterative deepening

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