Problem Solving and Search Andrea Danyluk September 9, 2013.

Slides:



Advertisements
Similar presentations
Announcements Course TA: Danny Kumar
Advertisements

Uninformed search strategies
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Blind Search by Prof. Jean-Claude Latombe
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Blind (Uninformed) Search (Where we systematically explore alternatives) R&N: Chap. 3, Sect. 3.3–5.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
1 Lecture 3: 18/4/1435 Uninformed search strategies Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence for Games Uninformed search Patrick Olivier
Artificial Intelligence (CS 461D)
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Artificial Intelligence Chapter 3: Solving Problems by Searching
1 Solving Problems by Searching. 2 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space.
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
Announcements Project 0: Python Tutorial
Solving problems by searching
1 Lecture 3 Uninformed Search
CS 188: Artificial Intelligence Fall 2009 Lecture 2: Queue-Based Search 9/1/2009 Dan Klein – UC Berkeley Multiple slides from Stuart Russell, Andrew Moore.
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
1 Problem Solving and Searching CS 171/271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
Problem Solving and Search Andrea Danyluk September 11, 2013.
CSE 511a: Artificial Intelligence Spring 2012
CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #3 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Vilalta&Eick:Uninformed Search Problem Solving By Searching Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States/Looping.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
Advanced Artificial Intelligence Lecture 2: Search.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Uninformed Search ECE457 Applied Artificial Intelligence Spring 2007 Lecture #2.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
Implementation: General Tree Search
CS 343H: Artificial Intelligence
Solving problems by searching A I C h a p t e r 3.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
AI Adjacent Fields  Philosophy:  Logic, methods of reasoning  Mind as physical system  Foundations of learning, language, rationality  Mathematics.
1 CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Search Instructors: David Suter and Qince Li Course Harbin Institute of Technology [Many slides adapted from those.
Artificial Intelligence Solving problems by searching.
Lecture 3: Uninformed Search
CS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Fall 2008
Presentation transcript:

Problem Solving and Search Andrea Danyluk September 9, 2013

Announcements Progamming Assignment 0: Python Tutorial – Should have received my about it – Due Wednesday at 10am Should not take long to complete Talk to me if the due date/time is a real problem – Turnin should be fixed today – Grading for this one is mainly a sanity check – Any trouble with accounts: let me know!

Today’s Lecture Agents Goal-directed problem-solving and search Uninformed search – Breadth-first – Depth-first and variants – Uniform-cost search (Wednesday)

Rational Agents An agent perceives and acts. “Doing the right thing” captured by a performance measure that evaluates a given sequence of environment states. A rational agent: selects an action that is expected to maximize the performance measure, given evidence provided by the percept sequence and whatever built-in knowledge the agent has.

Rational ≠ omniscient – Percepts may not supply all relevant information Rational ≠ clairvoyant – Action outcomes may not be as expected Rational ≠ successful [ Adapted from Russell]

Reflex Agents Act on the basis of the current percept (and possibly what they remember from the past). May have memory or a model of the world’s state. Do not consider future consequences of their actions. [Adapted from CS 188 UC Berkeley]

Goal-based Agents Plan ahead Ask “what if” Decisions based on (hypothesized) consequences of actions Have a model of how the world evolves in response to actions [Adapted from CS 188 UC Berkeley]

Building a goal-based agent Determine the percepts available to the agent Select/devise a representation for world states Determine the task knowledge the agent will need Clearly articulate the goal Select/devise a problem-solving technique so that the agent can decide what to do

Search as a Fundamental Problem- Solving Technique Originated with Newell and Simon’s work on problem solving in the late 60s.

Search Problems A search problem consists of A state space – A set of states – As set of actions – A transition model that specifies results of applying actions to states Successor function: Result(s, a) An initial state A goal test

An Example: the 8-Puzzle Initial StateGoal State # possible distinct states = 9! = 362,880 (but only 9!/2 reachable)

Real world examples Navigation Vehicle parking Parsing (natural and artificial languages) – The old dog slept on the porch – The old dog the footsteps of the young

And back to the 8-Puzzle States: – Puzzle configurations Actions: – Move blank N, S, E, or W Start state: – As given Goal test: – Is current state = specified goal state?

State Space Graph S S G

Finding a solution in a problem graph Solving the puzzle = finding a path through the graph from initial state to goal state Simple graph search algorithms: – Breadth-first search – Depth-first search

Breadth-first Graph Search: Review a a b b h h g g c c f f e e d d i i Fringe is a FIFO queue Start: a Goal: i Explore vertices (really edges closest to the start state first.

Depth-first Graph Search: Review a a b b h h g g c c f f e e d d i i Fringe is a LIFO stack Start: a Goal: i Explore deepest vertex (really edge) first.

State Space Search in the AI World Rarely given a graph to begin with We don’t build the graph before doing the search – Our search problems are BIG

Search Trees {N, E, S, W} Search tree for BFS White nodes = explored (i.e., expanded) Orange nodes = frontier Maintains an “explored” set of states to avoid redundant search

Search Tree A “what if” tree of plans and outcomes Start state at the root node Children correspond to successors Nodes contain states; correspond to plans to those states Aim to build as little as possible Because we build the tree “on the fly” the representations of states and actions matter! [Adapted from CS 188 UC Berkeley]

Formalizing State Space Search A state space is a graph (V, E), where V is the set of states and E is a set of directed edges between states. The edges may have associated weights (costs). Our exploration of the state space using search generates a search tree. [Adapted from Eric Eaton]

Formalizing State Space Search A node in a search tree typically contains: – A state description – A reference to the parent node – The name of the operator that generated it from its parent – The cost of the path from the initial state to itself The node that is the root of the search tree typically represents the initial state

Formalizing State Space Search Child nodes are generated by applying legal operators to a node – The process of expanding a node means to generate all of its successor nodes and to add them to the frontier. A goal test is a function applied to a state to determine whether its associated node is a goal node

Formalizing State Space Search A solution is either – A sequence of operators that is associated with a path from start state to goal or – A state that satisfies the goal test The cost of a solution is the sum of the arc costs on the solution path – If all arcs have the same (unit) cost, then the solution cost is just the length of the solution (i.e., the length of the path)

Evaluating Search Strategies Completeness – Is the strategy guaranteed to find a solution when there is one? Optimality – Does the strategy find the highest-quality solution when there are several solutions? Time Complexity – How long does it take (in the worst case) to find a solution? Space Complexity – How much memory is required (in the worst case)?

Evaluating BFS Complete? – Yes Optimal? – Not in general. When is it optimal? Time Complexity? – How do we measure it? Space Complexity?

Time and Space Complexity Let b = branching factor (i.e., max number of successors) m = maximum depth of the search tree d = depth of shallowest solution For BFS Time: O(b d ) If we check for goal as we generate a node! Not if we check as we get ready to expand! Space: O(b d )

Evaluating DFS Complete? – Not in general – Can be if space is finite and we modify tree search to account for loops and redundant paths Optimal? – No Time Complexity? – O(b m ) Space Complexity? – O(mb)

Depth-Limited DFS? Let l be the depth limit Complete? – No Optimal? – No Time Complexity? – O(b l ) Space Complexity? – O(m l )

Iterative Deepening? Complete? – Yes (if b is finite) Optimal? – Yes (if costs of all actions are the same) Time Complexity? – O(b d ) Space Complexity? – O(bd)