Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.

Slides:



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

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
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.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
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.
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.
Lecture 2: Problem Solving using State Space Representations CS 271: Fall 2007 Instructor: Padhraic Smyth.
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?
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.
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.
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.
1 Solving problems by searching 171, Class 2 Chapter 3.
Lecture 3: 18/4/1435 Searching for solutions. Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
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.
Artificial Intelligence
Problem Solving Agents
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.
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.
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 3 –Problem Solving Agents State space search –Programming Assignment Thursday.
Solving problems by searching
Solving problems by searching A I C h a p t e r 3.
G5AIAI Introduction to AI
1 Solving problems by searching Chapter 3. 2 Outline Problem types Example problems Assumptions in Basic Search State Implementation Tree search Example.
Search Problems Russell and Norvig: Chapter 3, Sections 3.1 – 3.3 CS121 – Winter 2003.
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
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Lecture 2: Problem Solving using State Space Representations
ECE 448 Lecture 4: Search Intro
Artificial Intelligence Lecture No. 6
Problem Solving by Searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Artificial Intelligence
EA C461 – Artificial Intelligence Problem Solving Agents
Russell and Norvig: Chapter 3, Sections 3.1 – 3.3
Solving problems by searching
Solving problems by searching
ARTIFICIAL INTELLIGENCE
Solving problems by searching
Solving Problems by Searching
Solving problems by searching
Presentation transcript:

Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008

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

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 test e.g., drive to a town with a ski-resort or just one state which satisfies the goal e.g., drive to Mammoth Operators (actions, successor function) operators are legal actions which the agent can take to move from one state to another

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

Example: Romania

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

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, (or goal state) 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

Defining Search Problems A statement of a Search problem has 4 components 1. A set of states 2. A set of “operators” which allow one to get from one state to another 3. A start state S 4. A set of possible goal states, or ways to test for goal states 4a. Cost path A solution consists of a sequence of operators which transform S into a goal state G Representing real problems in a State-Space search framework may be many ways to represent states and operators key idea: represent only the relevant aspects of the problem (abstraction)

Abstraction/Modeling Definition of Abstraction: Navigation Example: how do we define states and operators? First step is to abstract “the big picture” i.e., solve a map problem nodes = cities, links = freeways/roads (a high-level description) this description is an abstraction of the real problem Can later worry about details like freeway onramps, refueling, etc Abstraction is critical for automated problem solving must create an approximate, simplified, model of the world for the computer to deal with: real-world is too detailed to model exactly good abstractions retain all important details Process of removing irrelevant detail to create an abstract representation: ``high-level”, ignores irrelevant details

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)

Operator Description

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 activity: Generate a part of the search space that contains a solution

The Traveling Salesperson Problem (a touring problem) Find the shortest tour that visits all cities without visiting any city twice and return to starting point. States: sequence of cities visited S 0 = A Goal? C DA E F B

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

Example: 8-queen problem

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

The sliding tile problem 8-puzzle: 181,440 states 15-puzzle: 1.3 trilion 24-puzzle: 10^25

The Sliding Tile Problem Up Down Left Right

The “8-Puzzle” Problem Goal State Start State

Formulating Problems; another angle Problem types Satisficing: 8-queen Optimizing: Traveling salesperson Object sought board configuration, sequence of moves A strategy (contingency plan) Satisfying leads to optimizing since “small is quick” For traveling salesperson satisficing easy, optimizing hard Semi-optimizing: Find a good solution In Russel and Norvig: single-state, multiple states, contingency plans, exploration problems

Searching the State Space States, operators, control strategies The search space graph is implicit The control strategy generates a small search tree. Systematic search Do not leave any stone unturned Efficiency Do not turn any stone more than once

Tree search example

State space of the 8 puzzle problem

Why Search can be difficult At the start of the search, the search algorithm does not know the size of the tree the shape of the tree the depth of the goal states How big can a search tree be? say there is a constant branching factor b and one goal exists at depth d search tree which includes a goal can have b d different branches in the tree (worst case) Examples: b = 2, d = 10: b d = 2 10 = 1024 b = 10, d = 10: b d = = 10,000,000,000

Summary Intelligent agents can often be viewed as searching for problem solutions in a discrete state-space Space obtained through a problem abstraction process. Search consists of state space operators start state goal states A Search Tree is an efficient way to represent a search There are a variety of general search techniques, including Depth-First Search Breadth-First Search we will look at several others in the next few lectures Assigned Reading: Nillson chapter 7 chapter 8 R&N Chapter 3