Problem Solving and Searching

Similar documents
Solving Problems by Searching

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.

Solving Problem by Searching. Chapter 3

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

CS 8520: Artificial Intelligence

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search

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

CS 520: Introduction to Artificial Intelligence. Review

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 Strategies

Ar#ficial)Intelligence!!

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

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

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

Problem Solving and Search

AI: problem solving and search

ITCS 6150 Intelligent Systems. Lecture 3 Uninformed Searches

CS 151: Intelligent Agents, Problem Formulation and Search

Uninformed Search Methods

Artificial Intelligence

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

CS 4100 // artificial intelligence

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

Chapter 3 Solving problems by searching

Problem solving and search

CS540 Uninformed Search

Problem Solving. Russell and Norvig: Chapter 3

CS242 Uninformed Search

Solving problems by searching

Solving problems by searching. Chapter 3

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

CS 380: Artificial Intelligence Lecture #3

Artificial Intelligence

Solving Problems: Blind Search

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

Uninformed search strategies (Section 3.4) Source: Fotolia

Problem Solving as Search. CMPSCI 383 September 15, 2011

Solving problems by searching

CSC 2114: Artificial Intelligence Search

Solving problems by searching

Artificial Intelligence Problem Solving and Uninformed Search

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

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

521495A: Artificial Intelligence

Artificial Intelligence Uninformed search

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

Solving problems by searching

Search EECS 395/495 Intro to Artificial Intelligence

Lecture 3. Uninformed Search

Search EECS 348 Intro to Artificial Intelligence

Multiagent Systems Problem Solving and Uninformed Search

Search. (Textbook Chpt ) Computer Science cpsc322, Lecture 2. May, 10, CPSC 322, Lecture 2 Slide 1

Search : Lecture 2. September 9, 2003

Chapter 2. Blind Search 8/19/2017

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3

Chapter 3: Solving Problems by Searching

Pengju XJTU 2016

AGENTS AND ENVIRONMENTS. What is AI in reality?

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

Announcements. Project 0: Python Tutorial Due last night

AGENTS AND ENVIRONMENTS. What is AI in reality?

Artificial Intelligence

CAP 4630 Artificial Intelligence

State-Space Search. Computer Science E-22 Harvard Extension School David G. Sullivan, Ph.D. Solving Problems by Searching

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 19 January, 2018

Artificial Intelligence

Chapter 4. Uninformed Search Strategies

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

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

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

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

Solving Problems by Searching

Search. CS 3793/5233 Artificial Intelligence Search 1

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

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

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

Goal-Based Agents Problem solving as search. Outline

Problem solving and search

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

Searching. Assume goal- or utilitybased. Next task to achieve is to determine the best path to the goal

Uninformed Search. Day 1 & 2 of Search. Russel & Norvig Chap. 3. Material in part from

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

Pengju

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

Computer Science and Software Engineering University of Wisconsin - Platteville. 3. Search (Part 1) CS 3030 Lecture Notes Yan Shi UW-Platteville

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

CPS 170: Artificial Intelligence Search

Robot Programming with Lisp

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

Informed search strategies (Section ) Source: Fotolia

Uninformed Search (Ch )

Solving problems by searching

Solving problems by searching

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

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

Topic 1 Uninformed Search

4. Solving Problems by Searching

ARTIFICIAL INTELLIGENCE. Pathfinding and search

CS 5522: Artificial Intelligence II

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

Transcription:

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 Agent finds an action sequence to achieve a goal Requires problem formulation Determine goal Formulate problem based on goal Searches for an action sequence that solves the problem Actions are then carried out, ignoring percepts during that period 3

Problem Initial state Possible actions / Successor function Goal test Path cost function * State space can be derived from the initial state and the successor 4

Example: Vacuum World Environment consists of two squares, A (left) and B (right) Each square may or may not be dirty An agent may be in A or B An agent can perceive whether a square is dirty or not An agent may move left, move right, suck dirt (or do nothing) Question: is this a complete PEAS description? 5

Vacuum World Problem Initial state: configuration describing location of agent dirt status of A and B Successor function R, L, or S, causes a different configuration Goal test Check whether A and B are both not dirty Path cost Number of actions 6

State Space 2 possible locations x 2 x 2 com binations ( A is clean/ dirty, B is clean/ dirty ) = 8 states 7

Sample Problem and Solution Initial State: 2 Action Sequence: Suck, Left, Suck (brings us to which state?) 8

States and Successors 9

Example: 8- Puzzle Initial state: as shown Actions? successor function? Goal test? Path cost? 10

Example: 8- Queens Problem Position 8 queens on a chessboard so that no queen attacks any other queen Initial state? Successor function? Goal test? Path cost? 11

Example: Route- finding Given a set of locations, links (with values) between locations, an initial location and a destination, find the best route Initial state? Successor function? Goal test? Path cost? 12

Some Considerations Environment ought to be be static, determ inistic, and observable Why? If some of the above properties are relax ed, what happens? Toy problems versus real- world problem s 13

Searching for Solutions Searching through the state space Search tree rooted at initial state A node in the tree is expanded by applying successor function for each valid action Children nodes are generated with a different path cost and depth Return solution once node with goal state is reached 14

Tree- Search Algorithm 15

frin ge: in itially- em p ty con tain er Wh at is retu rn e d? 16

Search Strategy Strategy: specifies the order of node ex pansion Uninformed search strategies: no additional information beyond states and successors Informed or heuristic search: expands more promising states 17

Evaluating Strategies Com pleteness does it always find a solution if one exists? Time complexity number of nodes generated Space complexity maximum number of nodes in memory Optim ality does it always find a least- cost solution? 18

Time and space complexity Expressed in terms of: b: branching factor depends on possible actions max number of successors of a node d: depth of shallowest goal node m: maximum path- length in state space 19

Uninformed Search Strategies Breadth- First Search Uniform- Cost Search Depth- First Search Depth- Lim ited Search Iterative Deepening Search 20

Breadth- First Search fringe is a regular first- in- first- out queue Start with initial state; then process the successors of initial state, followed by their successors, and so on Shallow nodes first before deeper nodes Complete Optimal (if path- cost = node depth) Time Complexity: O(b + b 2 + b 3 + + b d+ 1 ) Space Complex ity: same 21

Uniform- Cost Search Prioritize nodes that have least path- cost (fringe is a priority queue) If path- cost = number of steps, this degenerates to BFS Complete and optimal As long as zero step costs are handled properly The route- finding problem, for example, have varying step costs Dijkstra s shortest- path algorithm < - > UCS Time and space complex ity? 22

Depth- First Search fringe is a stack (last- in- first- out container) Go as deep as possible and then backtrack Often im plem ented using recursion Not complete and might not term inate Time Complexity: O(b m ) Space complexity: O(bm) 23

Depth- Limited Search DFS with a pre- determined depth- limit l Guaranteed to terminate Still incomplete Worse, we might choose l < m (shallowest goal node) Depth- limit l can be based on problem definition e.g., graph diameter in route- finding problem Time and space complexity depend on l 24

Iterative Deepening Search Depth- Limited Search for l = 0, 1, 2, Stops when goal is found (when l becomes d) Complete and optimal (if path- cost = node- depth) Time and space complexity? 25

Comparing Search Strategies 26

Bi- directional Search Run two simultaneous searches One forward from initial state One backward from goal state Stops when node in one search is in fringe of the other search Rationale: two half- searches quicker than a full search Caveat: not always easy to search backwards 27

Caution: Repeated States Can occur specially in environments where actions are reversible Introduces the possibility of infinite search trees Time complexity blows up even with fix ed depth limits Solution: detect repeated states by storing node history 28

Summary A problem is defined by its initial state, a successor function, a goal test, and a path cost function Problem s environment < - > state space Different strategies drive different tree- search algorithms that return a solution (action sequence) to the problem Coming up: informed search strategies 29