1 Solving problems by searching 171, Class 2 Chapter 3.

Slides:



Advertisements
Similar presentations
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Advertisements

INTRODUÇÃO AOS SISTEMAS INTELIGENTES
Additional Topics ARTIFICIAL INTELLIGENCE
Solving problems by searching
Announcements Course TA: Danny Kumar
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
Artificial Intelligence Problem Solving Eriq Muhammad Adams
Blind Search1 Solving problems by searching Chapter 3.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
PSU CS 370 – Artificial Intelligence Dr. Mohamed Tounsi Artificial Intelligence 3. Solving Problems By Searching.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
CS 380: Artificial Intelligence Lecture #3 William Regli.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Artificial Intelligence Chapter 3: Solving Problems by Searching
Solving problems by searching
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Solving problems by searching This Lecture Read Chapters 3.1 to 3.4 Next Lecture Read Chapter 3.5 to 3.7 (Please read lecture topic material before and.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Basic concepts of Searching
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Prof. Carla P. Gomes Module: Search I (Reading R&N: Chapter.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
Problem Solving Agents
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 3 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Pengantar Kecerdasan Buatan
Problem Solving by Searching
1 Solving problems by searching Chapter 3. 2 Outline Problem types Example problems Assumptions in Basic Search State Implementation Tree search Example.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Solving problems by searching Chapter 3. Types of agents Reflex agent Consider how the world IS Choose action based on current percept Do not consider.
Solving problems by searching
State Space Representations and Search Algorithms
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Lecture 2: Problem Solving using State Space Representations
ECE 448 Lecture 4: Search Intro
Problem Solving by Searching
Problem Solving as Search
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Solving problems by searching
Solving Problems by Searching
Solving Problems by Searching
Solving problems by searching
Presentation transcript:

1 Solving problems by searching 171, Class 2 Chapter 3

2 Overview Intelligent agents: problem solving as search Search consists of state space operators start state goal states The search graph A Search Tree is an efficient way to represent the search process There are a variety of search algorithms, including Depth-First Search Breadth-First Search Others which use heuristic knowledge (in future lectures)

3 Example: Romania On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest Formulate goal: be in Bucharest Formulate problem: states: various cities actions: drive between cities Find solution: sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest

4 Example: Romania

5 Problem types Static / Dynamic Previous problem was static: no attention to changes in environment Observable / Partially Observable / Unobservable Previous problem was observable: it knew its initial state. Deterministic / Stochastic Previous problem was deterministic: no new percepts were necessary, we can predict the future perfectly Discrete / continuous Previous problem was discrete: we can enumerate all possibilities

6 Example: vacuum world Observable, start in #5. Solution?

7 Example: vacuum world Observable, start in #5. Solution? [Right, Suck] Unobservable, start in {1,2,3,4,5,6,7,8} e.g., Solution?

8 Example: vacuum world Unobservable, start in {1,2,3,4,5,6,7,8} e.g., Solution? [Right,Suck,Left,Suck]

9

10 Problem-Solving Agents Intelligent agents can solve problems by searching a state-space State-space Model the agent’s model of the world usually a set of discrete states e.g., in driving, the states in the model could be towns/cities Goal State(s) a goal is defined as a desirable state for an agent there may be many states which satisfy the goal e.g., drive to a town with a ski-resort or just one state which satisfies the goal e.g., drive to Mammoth Operators operators are legal actions which the agent can take to move from one state to another

11 State-Space Problem Formulation A problem is defined by four items: initial state e.g., "at Arad“ actions or successor function S(x) = set of action–state pairs e.g., S(Arad) = {, … } goal test, e.g., x = "at Bucharest”, Checkmate(x) path cost (additive) e.g., sum of distances, number of actions executed, etc. c(x,a,y) is the step cost, assumed to be ≥ 0 A solution is a sequence of actions leading from the initial state to a goal state

12 Selecting a state space Real world is absurdly complex  state space must be abstracted for problem solving (Abstract) state = set of real states (Abstract) action = complex combination of real actions e.g., "Arad  Zerind" represents a complex set of possible routes, detours, rest stops, etc. For guaranteed realizability, any real state "in Arad” must get to some real state "in Zerind” (Abstract) solution = set of real paths that are solutions in the real world Each abstract action should be "easier" than the original problem

13 Vacuum world state space graph states? discrete: dirt and robot location initial state? any actions? Left, Right, Suck goal test? no dirt at all locations path cost? 1 per action

14 Example: 8-queen problem

15 Example: 8-Queens states? -any arrangement of n<=8 queens -or arrangements of n<=8 queens in leftmost n columns, 1 per column, such that no queen attacks any other. initial state? no queens on the board actions? -add queen to any empty square -or add queen to leftmost empty square such that it is not attacked by other queens. goal test? 8 queens on the board, none attacked. path cost? 1 per move

16 Example: robotic assembly states?: real-valued coordinates of robot joint angles parts of the object to be assembled initial state?: rest configuration actions?: continuous motions of robot joints goal test?: complete assembly path cost?: time to execute

17 Robot block world Given a set of blocks in a certain configuration, Move the blocks into a goal configuration. Example : (c,b,a)  (b,c,a) A B C A C B Move (x,y)

18 Operator Description

19 Example: The 8-puzzle states? initial state? actions? goal test? path cost? Try yourselves

20 Example: The 8-puzzle states? locations of tiles initial state? given actions? move blank left, right, up, down goal test? goal state (given) path cost? 1 per move [Note: optimal solution of n-Puzzle family is NP-hard]

21 The Sliding Tile Problem Up Down Left Right

22 The “8-Puzzle” Problem Goal State Start State

23 State space of the 8 puzzle problem

24 The Traveling Salesperson Problem Find the shortest tour that visits all cities without visiting any city twice and return to starting point. State: sequence of cities visited S 0 = A C DA E F B

25 The Traveling Salesperson Problem Find the shortest tour that visits all cities without visiting any city twice and return to starting point. State: sequence of cities visited S 0 = A S G = a complete tour C DA E F B

26 The state-space graph Graphs: nodes, arcs, directed arcs, paths Search graphs: States are nodes operators are directed arcs solution is a path from start to goal Problem formulation: Give an abstract description of states, operators, initial state and goal state. Problem solving: Generate a part of the search space that contains a solution

27 Tree search algorithms Basic idea: Exploration of state space graph by generating successors of already-explored states (a.k.a. expanding states). Every states is evaluated: is it a goal state?

28 Tree search example

29 Tree search example

30 Tree search example

31 Implementation: states vs. nodes A state is a (representation of) a physical configuration A node is a data structure constituting part of a search tree contains info such as: state, parent node, action, path cost g(x), depth The Expand function creates new nodes, filling in the various fields and using the SuccessorFn of the problem to create the corresponding states.

32 Search strategies A search strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: completeness: does it always find a solution if one exists? time complexity: number of nodes generated space complexity: maximum number of nodes in memory optimality: does it always find a least-cost solution? Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be ∞)

33 Searching the search space Uninformed Blind search Breadth-first uniform first depth-first Iterative deepening depth-first Bidirectional Branch and Bound Informed Heuristic search (next class) Greedy search, hill climbing, Heuristics

34 Next time Search Strategies Questions?