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.

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.
Artificial Intelligence Solving problems by searching
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
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.
A RTIFICIAL I NTELLIGENCE Problem-Solving Solving problems by searching.
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.
1 Search Problems (Where reasoning consists of exploring alternatives) R&N: Chap. 3, Sect. 3.1–
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.
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.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms,
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.
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
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 State Space Search
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Solving problems by searching
Solving problems by searching A I C h a p t e r 3.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Problem Solving as Search Foundations of Artificial Intelligence.
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
Constraint satisfaction
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
ECE 448 Lecture 4: Search Intro
Introduction to Artificial Intelligence
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
Solving problems by searching
Instructor: Kris Hauser
Solving Problems by Searching
Solving problems by searching
Presentation transcript:

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 problem solving mechanism Systematically explores the alternatives Systematically explores the alternatives Finds the sequence of steps towards a solution Finds the sequence of steps towards a solution Problem Space Hypothesis (Allen Newell, Herbert Simon SOAR: An Architecture for General Intelligence.) SOAR: An Architecture for General Intelligence.) All goal-oriented symbolic activities occur in a problem space All goal-oriented symbolic activities occur in a problem space Search in a problem space is claimed to be a completely general model of intelligence Search in a problem space is claimed to be a completely general model of intelligence

Search and Intelligence The ability to achieve goals in the face of variations, difficulties, and complexities posed by the task environment is an essential characteristic of intelligence. The Physical Symbol System Hypothesis together with the idea of Heuristic Search constitute Newell and Simon's proposal for how to computationally realize intelligence

Physical Symbol System A physical symbol system "consists of a set of entities, called symbols, which are physical patterns that can occur as components of another type of entity called an expression (or symbol structure). Thus, a symbol structure is composed of a number of instances (or tokens) of symbols related in some physical way (such as one token being next to another). At any instant of time the system will contain a collection of these symbol structures. Besides these structures, the system also contains a collection of processes that operate on expressions to produce other expressions: processes of creation, modification, reproduction and destruction. A physical symbol system is a machine that produces through time an evolving collection of symbol structures. Such a system exists in a world of objects wider than just these symbolic expressions themselves." "A physical symbol system has the necessary and sufficient means for intelligent action." Newell and Simon

Stating a Problem as a Search Problem  State space S  Successor function: x  S  SUCCESSORS (x)  Cost of a move  Initial state s 0  Goal test: for state x in S  GOAL? (x) =T or F S 1 3 2

Example (Romania) Initial Situation On Holiday in Romania; currently in Arad On Holiday in Romania; currently in Arad Flight leaves tomorrow from Bucharest Flight leaves tomorrow from Bucharest Formulate Goal be in Bucharest be in Bucharest Formulate Problem states: various cities states: various cities operators: drive between cities operators: drive between cities Find Solution sequence of cities sequence of cities must start at starting state and end in the goal state must start at starting state and end in the goal state

Example (Romania)

Problem formulation A problem is defined by four items: initial state e.g., ``at Arad'' e.g., ``at Arad'' operators (or successor function S(x)) e.g., Arad ==> ZerindArad ==> Sibiu e.g., Arad ==> ZerindArad ==> Sibiu goal test, can be explicit, e.g., x = ``at Bucharest'' explicit, e.g., x = ``at Bucharest'' implicit, e.g., NoDirt(x) implicit, e.g., NoDirt(x) path cost (additive) e.g., sum of distances, number of operators executed, etc. e.g., sum of distances, number of operators executed, etc. A solution is a sequence of operators leading from the initial state to a goal state

Selecting a state space Real world is too complex state space must be abstracted for problem solving state space must be abstracted for problem solving (Abstract) state = set of real states (Abstract) operator = complex combination of real actions e.g., “Arad ==> Zerind” represents a complex set of possible routes, detours, rest stops, etc. 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

Example: Vacuum World Vacuum World Let the world consist of two rooms Each room may contain dirt The agent may be in either room initial: both rooms dirty goal: both rooms clean problem: states: each state has two rooms which may contain dirt (8 possible) actions: go from room to room; vacuum the dirt Solution: sequence of actions leading to clean rooms

Example: Vacuum World States? integer dirt and robot locations (ignore dirt amounts) Operators? Left, Right, Suck Goal Test? no dirt Path Cost? one per move Goal states

Example: The 8-Puzzle States?integer location of tiles Operators? move blank left, right, up, down Goal Test?= goal state (given) Path Cost?One per move

8-Puzzle: Successor Function

State-Space Graph A representation of all possible legal configurations of the problem resulting from applications of legal operators each node in the graph is a representation a possible legal state each node in the graph is a representation a possible legal state each transition is a representation of a possible legal move applied to a state (resulting in a new state of the problem) each transition is a representation of a possible legal move applied to a state (resulting in a new state of the problem)States: representation of states should provide all information necessary to describe relevant features of a problem state representation of states should provide all information necessary to describe relevant features of a problem stateOperators: Operators may be simple functions representing legal actions; Operators may be simple functions representing legal actions; Operators may be rules specifying an action given that a condition (set of constraints) on the current state is satisfied Operators may be rules specifying an action given that a condition (set of constraints) on the current state is satisfied In the latter case, the rules are sometimes referred to as “production rules” and the system is referred to as a production system. In the latter case, the rules are sometimes referred to as “production rules” and the system is referred to as a production system.

Vacuum World State-Space Graph State-space graph does not include initial or goal states Search Problem: Given specific initial and goal states, find a path in the graph from an initial to a goal state An instance of a search problem can be represented as a “search tree” whose root note is the initial state An instance of a search problem can be represented as a “search tree” whose root note is the initial state

Solution to the Search Problem A solution is a path connecting the initial to a goal node (any one) The cost of a path is the sum of the edge costs along this path An optimal solution is a solution path of minimum cost There might be no solution !

State Spaces Can be Very Large 8-puzzle  9! = 362,880 states 15-puzzle  16! ~ 1.3 x 1012 states 24-puzzle  25! ~ 1025 states

Searching the State Space Often it is not feasible to build a complete representation of the state graph A problem solver must construct a solution by exploring a small portion of the graph For a specific search problem (with a given initial and goal state) we can view the relevant portion as a search tree

Searching the State Space

Search tree

Searching the State Space Search tree

Searching the State Space Search tree

Searching the State Space Search tree

Searching the State Space Search tree

... Portion of Search Tree for an Instance of the 8-Puzzle Problem

Simple Problem-Solving Agent Algorithm s0  sense/read initial state GOAL?  select/read goal test Succ  select/read successor function solution  search(s0, GOAL?, Succ) perform(solution)

Some Other Problems

8-Queens Problem Place 8 queens in a chessboard so that no two queens are in the same row, column, or diagonal. A solutionNot a solution

Formulation #1  States: all arrangements of 0, 1, 2,..., or 8 queens on the board  Initial state: 0 queen on the board  Successor function: each of the successors is obtained by adding one queen in an empty square  Arc cost: irrelevant  Goal test: 8 queens are on the board, with no two of them attacking each other  64 x 63 x... x 53 ~ 3 x states

Formulation #2  States: all arrangements of k = 0, 1, 2,..., or 8 queens in the k leftmost columns with no two queens attacking each other  Initial state: 0 queen on the board  Successor function: each successor is obtained by adding one queen in any square that is not attacked by any queen already in the board, in the leftmost empty column  Arc cost: irrelevant  Goal test: 8 queens are on the board  2,057 states

Path Planning What is the state space ?

Formulation #1 Cost of one horizontal/vertical step = 1 Cost of one diagonal step =  2

Optimal Solution This path is the shortest in the discretized state space, but not in the original continuous space

Formulation #2 Cost of one step: length of segment

Formulation #2 Cost of one step: length of segment Visibility graph

Solution Path The shortest path in this state space is also the shortest in the original continuous space

Search Strategies Uninformed (blind, exhaustive) strategies use only the information available in the problem definition Breadth-first search Breadth-first search Depth-first search Depth-first search Uniform-cost search Uniform-cost search Heuristic strategies use “rules of thumb” based on the knowledge of domain to pick between alternatives at each step Graph Searching Applet: