CSCI 360 Introduc/on to Ar/ficial Intelligence Week 2: Problem Solving and Op/miza/on. Instructor: Wei-Min Shen

Size: px
Start display at page:

Download "CSCI 360 Introduc/on to Ar/ficial Intelligence Week 2: Problem Solving and Op/miza/on. Instructor: Wei-Min Shen"

Transcription

1 CSCI 360 Introduc/on to Ar/ficial Intelligence Week 2: Problem Solving and Op/miza/on Instructor: Wei-Min Shen

2 Status Check and Review Status check Have you registered in Piazza? Have you run the Project-1? Have you submimed your pre-reading reports? Here are some good ones for your reference Review of last lecture Agent? Types of agents? Environment? Types of environment? Today s lecture =?

3 Class Outline Wk2 Ch3: Solving Problems How to represent a problem? states, ac/ons, ini/als, goals, (e.g., /c-tac-toe) How to solve a problem? Search: from here to there, ini/als to goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons

4 Class Outline Wk2 Ch4: Op/miza/on How to find the extremes of f(x)? Why is it so important? Why is it so hard? (no one has offered a general solu/on!) Which way to go? How much can you see? (local vs global) How many points can you remember? How big is your step? (skip THE point?) How well can you guess? How much do you know about the func/on? How do you know you are done? Will the func/on change by itself? HW: your own answers for the above ques/ons

5 This Week s Lecture Problem Solving and Search Techniques Op/miza/on Techniques Home Work 1 assignments

6 Solving Problems by Search How to represent a real-world problem? Examples, state space, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, ini/als to goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world,

7 What is a Problem? Any ideas? Hint: Think it as related to Agent

8 What is a Problem? Any ideas? Hint: Think it as related to Agent Percepts, ac/ons, environment, goals, u/li/es Problem: States, ini/al state, goal states, Solu/on: a sequence of ac/ons leads to the goal

9 Problem Examples: 8Puzzle, PAC-Man Ini/al State Goal State(s)

10 Tower of Hanoi, A Cleaning Robot Can dirt be a goal? 10

11 Travel Example and Project-1

12 State Space How to represent a real-world problem Graph Search Graph Ver/ces Edges Start ver/ces Goal ver/ces Solu/on is a (minimum cost) path from the start to the goal Search Problem State space States Ac/ons=operators Ini/al state Goal states or goal test Solu/on is a (minimum cost) ac/on sequence from the start to the goal state (or a state that sa/sfies the goal test) A BIG Ques/on: How do the sensors and percepts enter the picture?

13 Vacuum Robot and Its World

14 Traveling from Arad To Bucharest What is a state here?

15 State Graphs vs. Search Trees s b d a c e f G Each NODE in the search tree is an en/re PATH in the state graph (note how many nodes in the graph appear mul/ple /mes in the search tree) s p h r d e p q b c e h r q We almost always construct both on demand and we construct as lible as possible a a p q h q c r f G p q q c a f G a

16 State Space and Search Tree A Search Tree State space with ac/ons, costs/rewards (Fig6.1, ALFE)

17 Search Tree Nodes A node in the search tree is a data structure containing the state plus other data 17

18 Solving Problems by Search How to represent a problem? Examples (e.g., 8puzzle, TOH, Roomba, Travel),, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, from the ini/als to the goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons.

19 Problem Solving Methods (Overview) Breadth-first search Depth-first search Best-first search Goodness = (past + future) Uniform cost (es/mate past and future) A* search algorithm (es/mate the future) Dynamic Programming (back from the future)

20 Tree search algorithms Basic idea: offline, systematic exploration of simulated state-space by generating successors of explored states func(on TREE-SEARCH(problem, strategy) returns a solu/on, or failure ini/alize the search tree using the ini/al state problem loop do if there are no candidates for expansion, then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solu/on else expand the node and add resul/ng nodes to the search tree end Breath-first strategy: the least depth node Depth-first strategy: the deepest depth node

21 Implementa/on (Tree Search) func(on TREE-SEARCH(problem) return a solu/on or failure fron/er MAKE-QUEUE(MAKE-NODE(problem.INITIAL-STATE)) loop do if EMPTY?(fron/er) then return failure node CHOOSE-NODE-By-Strategy(fron/er) if problem.goal-test applied to node.state succeeds then return SOLUTION(node) fron/er INSERT-ALL(EXPAND(node, problem), fron/er) The fron/er is the set of nodes that have been generated but not yet expanded

22 Strategy: Breadth-First Search Expand shallowest nodes first Leo to right at any depth 22

23 State Graph Breath-first Search example

24 Depth-First Search Expand deepest nodes first Leo to right at any depth 24

25 Depth-First Search Expand deepest nodes first Leo to right at any depth Backtrack when hit terminal

26 Depth-first Search example State Graph Ques/on: Will the depth grow forever? Where is the terminal?

27 Loop Problems

28 Graph Search (Preven/ng Loop) func(on GRAPH-SEARCH(problem) return a solu/on or failure fron/er MAKE-QUEUE(MAKE-NODE(problem.INITIAL-STATE)) explored_set empty loop do if EMPTY?(fron/er) then return failure node CHOOSE-NODE-By-Strategy(fron/er) if problem.goal-test applied to node.state succeeds then return SOLUTION(node) explored_set INSERT(node, explored_set) for each new_node in EXPAND(node, problem) do if NOT(MEMBER?(new_node, fron/er)) and NOT(MEMBER?(new_node, explored_set)) then fron/er INSERT(new_node, fron/er)

29 Solving Problems by Search How to represent a problem? Examples (e.g., 8puzzle, TOH, Roomba, Travel),, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, from the ini/als to the goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons.

30 Best-First search algorithms func(on TREE-SEARCH(problem, strategy) returns a solu/on, or failure ini/alize the search tree using the ini/al state problem loop do if there are no candidates for expansion, then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solu/on else expand the node and add resul/ng nodes to the search tree end Best-first strategy: choose the best node: goodness = (past cost + future cost) When do we use this strategy?

31 Traveling from Arad To Bucharest We have the knowledge about the actual driving distances

32 Best-first Search example Choose the best node to expand: (past cost) + (the best future cost) Sibiu: (140) + ( ) =? Timisoanra: (118) + ( ) =? Zerind: (75) + ( ) =?

33 Two Big Ques/ons about Best? What if the best future cost is unknown to us? What if the best future cost is too expensive to compute?

34 What if we don t know the future? Goodness = past cost + the best future cost What if the best future cost is unknown to us? Es/mate Goodness: uniform cost (naïve) Es/mate Goodness = past cost + es/mated future cost Evalua/on func/on f(n) = g(n) + h(n) g(n) the cost (so far) to reach the current node n h(n) es/mated cost to get from the current node n to the goal f(n) es/mated total cost of path through n to the goal

35 Traveling from Arad To Bucharest Suppose the future driving distances to the goal is unknown to us Sensor:? But we know the straight-line distances to the goal Sensor:?

36 Using the es/mated future cost Choose the best node to expand: (past cost + es/mated future cost) Sibiu: Timisoanra: Zerind:

37 What if our es/ma/on is wrong? Examples are plenty My father told me so I did drive that road before I have an iphone Google map How wrong can we tolerate? Over-es/mate? Under-es/mate? By how much?

38 Es/mate by Admissible Heuris/cs A heuris/c is admissible if it never overes/mates the future cost to reach the goal Admissible heuris/cs are op/mis/c Formally: 1. h(n) h*(n) where h*(n) is the true cost from n to the goal 2. h(n) 0, with h(g)=0 for any goal G e.g. h SLD (n) (GPS) is admissible because it never overes/mates the actual road distance to the goal 38

39 A* search algorithm func(on TREE-SEARCH(problem, strategy) returns a solu/on, or failure ini/alize the search tree using the ini/al state problem loop do if there are no candidates for expansion, then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solu/on else expand the node and add resul/ng nodes to the search tree end Best-first strategy: choose the best node: goodness = (past cost + future cost) A* strategy: choose the admissibly es/mated best node: goodness = (past cost + admissibly es/mated future cost)

40 What if future is too hard to compute? Compute the best future cost for a node must consider all possible paths from the node to the goal This is too expensive because there are so many such paths Solu/on Use Dynamic Programming Not compute path by path But compute stage by stage (breath-first)

41 Dynamic Programming (ALFE 6.1.1) Backward recursion: compute the future cost by back from the goal* stage by stage Backward recursion equa/on:

42 Best-First by Dynamic Programming func(on TREE-SEARCH(problem, strategy) returns a solu/on, or failure ini/alize the search tree using the ini/al state problem loop do if there are no candidates for expansion, then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solu/on else expand the node and add resul/ng nodes to the search tree end Best-first strategy: choose the best node: goodness = (past cost + future cost) A* strategy: choose the best node: goodness = (past cost + admissibly es/mated future cost) Dynamic programming: choose the best node: goodness = (past cost + V(s))

43 Evalua/on of search strategies A search strategy is defined by picking the order of node expansion. Search algorithms are commonly evaluated according to the following four criteria: Completeness: does it always find a solu/on if one exists? Time complexity: how long does it take as func/on of number of nodes? Space complexity: how much memory does it require? Op(mality: does it guarantee the least-cost solu/on? Time and space complexity are measured in terms of: b max branching factor of the search tree d depth of the least-cost solu/on m max depth of the search tree (may be infinity)

44 Solving Problems by Search How to represent a problem? Examples (e.g., 8puzzle, TOH, Roomba, Travel),, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, from the ini/als to the goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons.

45 Other Search-related Techniques Itera/ve deepening Limit the search depth, incrementally increase it Bi-direc/onal search Search from the ini/al to the goal, as well as from the goal to the ini/al

46 Solving Problems by Search How to represent a problem? Examples (e.g., 8puzzle, TOH, Roomba, Travel),, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, from the ini/als to the goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening, fixed depth) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons.

47 Complexity: How big is a problem? When you solve N=64, it would be the end of the world!

48 Time complexity of depth-first In the worst case: the (only) goal node may be on the right-most branch, b 0 b 1 b d b d-1 G b d Time complexity = b d + b d = b d+1-1 Thus: O(b d ) b - 1 CS561 - Lectures Macskassy - Spring

49 Space complexity of depth-first Largest number of nodes in QUEUE is reached in bottom leftmost node. Example: m = 3, b = 3 : G... QUEUE contains all nodes. Thus: 7. In General: ((b-1) * m) + b Order: O(m*b) 49

50 Comparing uninformed search strategies Criterion Breadth- Uniform Depth- Depth- Itera/ve Bidirec/onal first cost first limited deepening (if applicable) Time b^d b^d b^m b^l b^d b^(d/2) Space b^d b^d bm bl bd b^(d/2) Op/mal? Yes Yes No No Yes Yes Complete? Yes Yes No Yes, Yes Yes if l d b max branching factor of the search tree d depth of the least-cost solu/on m max depth of the state-space (may be infinity) l depth cutoff 50

51 Summary Problem formula/on usually requires abstrac/ng away real-world details to define a state space that can be explored using computer algorithms. Once problem is formulated in abstract form, complexity analysis helps us picking out best algorithm to solve problem. Variety of uninformed search strategies; difference lies in method used to pick node that will be further expanded. Itera/ve deepening search only uses linear space and not much more /me than other uniformed search strategies. CS 561, Lectures

52 Solving Problems by Search How to represent a problem? Examples (e.g., 8puzzle, TOH, Roomba, Travel),, states, ac/ons, ini/als, goals. How to solve a problem? Search: from here to there, from the ini/als to the goals Depth-first, breadth-first How good is your solu/on? (fig 6.1, ALFE) How good is your state? How costly is an ac/on? Best-first, Dynamic Programming, A*, etc. Can you guarantee anything? (op/mal vs heuris/c) How much do you want to pay for your solu/on? How deep/wide can you go? Predetermined vs dynamic (e.g., itera/ve deepening) One way or many ways (bi-direc/onal)? How big is a problem? Can you put the whole world in your head? Tower of Hanoi, chess, robot-and-world, HM: state space for TOH, assign values for state and ac/ons.

53 Home Work Tower of Hanio (n=3) 1. Write the state space, states, ac/ons 2. Assume the cost of an ac/on to move a disk is the weight of the disk, compute the best future cost V(s 0 ) for the start state using dynamic programming Start state s 0 goal The weight of the disk: disk1=1, disk2=2, disk3=3

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

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

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

Last time: Problem-Solving

Last time: Problem-Solving Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation: Initial state??? 1 Last time: Problem-Solving Problem types:

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

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

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

AI: Week 2. Tom Henderson. Fall 2014 CS 5300 AI: Week 2 Tom Henderson Fall 2014 What s a Problem? Initial state Actions Transition model Goal Test Path Cost Does this apply to: Problem: Get A in CS5300 Solution: action sequence from initial to goal

More information

Artificial Intelligence

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

More information

Solving Problems by Searching

Solving Problems by Searching 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

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

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

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

Problem Solving and Search

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

More information

Solving 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

CS 188: Ar)ficial Intelligence

CS 188: Ar)ficial Intelligence CS 188: Ar)ficial Intelligence Search Instructors: Pieter Abbeel & Anca Dragan University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley

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

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

BIL 682 Ar+ficial Intelligence Week #2: Solving problems by searching. Asst. Prof. Aykut Erdem Dept. of Computer Engineering HaceDepe University

BIL 682 Ar+ficial Intelligence Week #2: Solving problems by searching. Asst. Prof. Aykut Erdem Dept. of Computer Engineering HaceDepe University BIL 682 Ar+ficial Intelligence Week #2: Solving problems by searching Asst. Prof. Aykut Erdem Dept. of Computer Engineering HaceDepe University Today Search problems Uninformed search Informed (heuris+c)

More information

CSE 473: Ar+ficial Intelligence

CSE 473: Ar+ficial Intelligence CSE 473: Ar+ficial Intelligence Search Instructor: Luke Ze=lemoyer University of Washington [These slides were adapted from Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials

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

State- space search algorithm

State- space search algorithm Graph Search These are slides I usually use for teaching AI, but they offer another perspec;ve on BFS, DFS, and Dijkstra s algorithm. Ignore men;ons of a problem and simply consider that the search starts

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

CS 520: Introduction to Artificial Intelligence. Review

CS 520: Introduction to Artificial Intelligence. Review CS 520: Introduction to Artificial Intelligence Prof. Louis Steinberg Lecture 2: state spaces uninformed search 1 What is AI? A set of goals Review build an artificial intelligence useful subgoals A class

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

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

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

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

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

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

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

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

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

More information

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

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

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

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

Informed Search and Exploration

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

More information

Outline for today s lecture. Informed Search I. One issue: How to search backwards? Very briefly: Bidirectional search. Outline for today s lecture

Outline for today s lecture. Informed Search I. One issue: How to search backwards? Very briefly: Bidirectional search. Outline for today s lecture Outline for today s lecture Informed Search I Uninformed Search Briefly: Bidirectional Search (AIMA 3.4.6) Uniform Cost Search (UCS) Informed Search Introduction to Informed search Heuristics 1 st attempt:

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

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

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

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

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

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

More information

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

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

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

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

Lecture 2: Fun with Search. Rachel Greenstadt CS 510, October 5, 2017

Lecture 2: Fun with Search. Rachel Greenstadt CS 510, October 5, 2017 Lecture 2: Fun with Search Rachel Greenstadt CS 510, October 5, 2017 Reminder! Project pre-proposals due tonight Overview Uninformed search BFS, DFS, Uniform-Cost, Graph-Search Informed search Heuristics,

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

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

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

More information

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

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

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

Informed Search and Exploration

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

More information

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

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

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

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

AGENTS AND ENVIRONMENTS. What is AI in reality?

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

More information

CS 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

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

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

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

PEAS: Medical diagnosis system

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

More information

Artificial Intelligence

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

More information

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

Informed Search and Exploration

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

More information

Uninformed Search. Remember: Implementation of search algorithms

Uninformed Search. Remember: Implementation of search algorithms Uninformed Search Lecture 4 Introduction to Artificial Intelligence Hadi Moradi moradi@usc.edu Remember: Implementation of search algorithms Function General-Search(problem, Queuing-Fn) returns a solution,

More information

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

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

More information

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

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

State Spaces

State Spaces Unit-2: CONTENT: Introduction to Search: Searching for solutions, Uninformed search strategies, Informed search strategies, Local search algorithms and optimistic problems, Adversarial Search, Search for

More information

CS:4420 Artificial Intelligence

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

More information

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

Artificial Intelligence

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

More information

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

521495A: Artificial Intelligence

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

More information

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

Informed Search Algorithms

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

More information

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

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

Informed search strategies (Section ) Source: Fotolia

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

More information

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

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

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

More information

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

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

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

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

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

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

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

More information