Copyright R. Weber Search in Problem Solving Search in Problem Solving INFO 629 Dr. R. Weber.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Announcements Course TA: Danny Kumar
State Space Representation and Search
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Comp 307 Problem Solving and Search Formalize a problem as State Space Search Blind search strategies Heuristic search.
Problem-solving as search. History Problem-solving as search – early insight of AI. Newell and Simon’s theory of human intelligence and problem-solving.
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.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Blind Search1 Solving problems by searching Chapter 3.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Lets remember about Goal formulation, Problem formulation and Types of Problem. OBJECTIVE OF TODAY’S LECTURE Today we will discus how to find a solution.
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
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence (CS 461D)
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
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.
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.
Review: Search problem formulation
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
1 Chapter 5 Advanced Search. 2 Chapter 5 Contents l Constraint satisfaction problems l Heuristic repair l The eight queens problem l Combinatorial optimization.
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
Artificial Intelligence Chapter 3: Solving Problems by Searching
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?
CSC344: AI for Games Lecture 4: Informed search
Solving problems by searching
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.
Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
1 Shanghai Jiao Tong University Informed Search and Exploration.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Vilalta&Eick:Uninformed Search Problem Solving By Searching Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States/Looping.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
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.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
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.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Solving problems by searching A I C h a p t e r 3.
Local Search Algorithms and Optimization Problems
Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Problem Solving Agents
Introduction to Artificial Intelligence
Problem Solving by Searching
Artificial Intelligence
Artificial Intelligence
CS 2710, ISSP 2160 Foundations of Artificial Intelligence
Presentation transcript:

Copyright R. Weber Search in Problem Solving Search in Problem Solving INFO 629 Dr. R. Weber

Copyright R. Weber Outline problem-solving problem-solving algorithms algorithms parts of a problem: formulation parts of a problem: formulation state space model state space model example problems example problems general search algorithm general search algorithm search strategies search strategies additional problems and strategies additional problems and strategies

Copyright R. Weber Problem solving What if deductive reasoning does not work? What if deductive reasoning does not work? What if case-based reasoning does not work? What if case-based reasoning does not work? What if inductive reasoning does not work? What if inductive reasoning does not work?

Copyright R. Weber Problem solving (ii) Some problems motivate us to list all its possible solutions, these are well understood problems. E.g., travel from Philly to NYC Some problems motivate us to list all its possible solutions, these are well understood problems. E.g., travel from Philly to NYC Some problems have clear allowed actions but you don’t know which ones will take you to the solution. E.g., some puzzles, route to arrive at the train station in Hartford Some problems have clear allowed actions but you don’t know which ones will take you to the solution. E.g., some puzzles, route to arrive at the train station in Hartford

Copyright R. Weber Problem solving (iii) Others have clear allowable actions but you don’t know which will take you to the goal more efficiently (faster, cheaper, economical design). E.g., designing a chip, design layout of parts in autoclave, schedule parts for production, schedule experts in call center. Others have clear allowable actions but you don’t know which will take you to the goal more efficiently (faster, cheaper, economical design). E.g., designing a chip, design layout of parts in autoclave, schedule parts for production, schedule experts in call center. Others also have constraints and may not be feasible. E.g. travel planning, schedule exams for university. Others also have constraints and may not be feasible. E.g. travel planning, schedule exams for university. Others you are simply not capable of solving because of combinatorial explosion. E.g., travel salesman Others you are simply not capable of solving because of combinatorial explosion. E.g., travel salesman

Copyright R. Weber Search search consists of a set of methods to systematically determine the next best action in order to search for a solution of a problem search consists of a set of methods to systematically determine the next best action in order to search for a solution of a problem parts of a problem: initial state, operators, goal test function, (path cost function). parts of a problem: initial state, operators, goal test function, (path cost function).

Copyright R. Weber Algorithm a search algorithm takes a problem as input and returns a solution in the form of an action sequence. a search algorithm takes a problem as input and returns a solution in the form of an action sequence. Formulate the problem in terms of sequences of actions to perform search Formulate the problem in terms of sequences of actions to perform search Environment: state space, path, solution. Environment: state space, path, solution. State space consists of all possible states e.g., (3,3,1), (1,1,0), (0,0,0), (2,2,1) State space consists of all possible states e.g., (3,3,1), (1,1,0), (0,0,0), (2,2,1) Path represents the steps taken to reach a solution Path represents the steps taken to reach a solution

Copyright R. Weber CANNIBALS AND MISSIONARIES CANNIBALS AND MISSIONARIES An example:

Copyright R. Weber CANNIBALS AND MISSIONARIES initial state is (3,3,1) initial state is (3,3,1) operators are five: CC, MM, CM, C, M operators are five: CC, MM, CM, C, M goal test is (0,0,0) goal test is (0,0,0) path cost: number of crossings path cost: number of crossings STATE SPACE MODEL

Copyright R. Weber Problem Solving with Search Formulate problem Formulate problem goal and problem formulation goal and problem formulation Choose search algorithm Choose search algorithm determine the next best action in order to search for a solution of a problem determine the next best action in order to search for a solution of a problem Execute Execute execute search method until solution is found execute search method until solution is found

Copyright R. Weber General Search Algorithm identify initial state identify initial state expand (generate new states) expand (generate new states) choose option choose option test goal function test goal function expand until goal not attained/no more states to expand expand until goal not attained/no more states to expand

Copyright R. Weber The NY tourist algorithm 1.identify initial state: - you are in a corner in NY 2.expand (use operators to generate new states) - identify legal operations 3.choose option (search strategy) - always make a right if you can otherwise go left - go to the side which is closest to your visual view of the goal 4.test goal function: Are you there yet? 5.If goal not attained (and there are still states to expand), continue from 2

Copyright R. Weber Example problems toy problems toy problems used to test search algorithms used to test search algorithms real world problems real world problems used to solve real problems used to solve real problems

Copyright R. Weber Toy problems

Copyright R. Weber The 8-puzzle (Russel&Norvig)

Copyright R. Weber Cryptarithmetic (Russel&Norvig)

Copyright R. Weber General puzzles algorithm 1. identify initial state as origin 2. expand to all possible locations 3. the blank space changes place with tile on its right 4. test goal function, is it the destiny? 5. if yes, return configuration else, return to 2

Copyright R. Weber Real world problems

Copyright R. Weber Applications of route finding Route planning Route planning Routing in computer networks Routing in computer networks Automated travel advisory systems Automated travel advisory systems Airline travel planning Airline travel planning Garbage collection/cleaning trucks Garbage collection/cleaning trucks Food/document delivery Food/document delivery Does this mean that search is the only method to perform route planning?? Does this mean that search is the only method to perform route planning??

Copyright R. Weber General route finding algorithm 1. identify initial state as origin 2. expand to all possible locations 3. choose location with smallest cost/fastest route/favor highways 4. test goal function, is it the destiny? 5. if yes, return location else, return to 2

Copyright R. Weber Traveling salesperson problems is a category of problems is a category of problems each city has to be visited once each city has to be visited once goal is to find the shortest tour goal is to find the shortest tour Exams in university Exams in university Nurses in hospitals Nurses in hospitals Experts in call centers Experts in call centers Scheduling

Copyright R. Weber VLSI layout Very large scale integration Very large scale integration Design of silicon chip Design of silicon chip Define the position and connections of a million gates in a chip Define the position and connections of a million gates in a chip Tasks: cell layout, channel routing Tasks: cell layout, channel routing Goal is to min area & connection length Goal is to min area & connection length

Copyright R. Weber Robot navigation Generalization of route finding problem Generalization of route finding problem Any route can be chosen in a continuous space Any route can be chosen in a continuous space Possible actions and states in a continuous space are infinite Possible actions and states in a continuous space are infinite The more actions a robot can perform the more dimensions are needed to describe states and actions The more actions a robot can perform the more dimensions are needed to describe states and actions To identify the result of an action, a robot must use vision To identify the result of an action, a robot must use vision

Copyright R. Weber Assembly sequencing Many industries use automatic assembly of objects Many industries use automatic assembly of objects Find an order to assemble parts of an object Find an order to assemble parts of an object Find an order to submit parts to a given process Find an order to submit parts to a given process Design for autoclave layout Design for autoclave layout Layout Design

Copyright R. Weber Constraint Satisfaction Problem 1. Initial is given by values of variables 2. Expand to all possible values 3. Variables change values 4. Do the variables’ values respect constraints? 5. if yes, return values else, return to 2 Another class of problems Another class of problems Design and scheduling problems Design and scheduling problems Algorithms designed specifically for CSP perform better than general ones Algorithms designed specifically for CSP perform better than general ones

Copyright R. Weber Constraint Satisfaction Search type of formulation indicated for many design and scheduling problems type of formulation indicated for many design and scheduling problems specific algorithms for CSP assign values for all variables and iteratively improve the solution within the area of the constraints specific algorithms for CSP assign values for all variables and iteratively improve the solution within the area of the constraints scheduling, PERT/CPM scheduling, PERT/CPM project planning and management project planning and management42

Copyright R. Weber Search strategies

Copyright R. Weber Uninformed search strategies breadth-first search breadth-first search uniform cost search uniform cost search depth-first search depth-first search depth-limited search depth-limited search iterative deepening search iterative deepening search bidirectional search bidirectional search Informed /heuristic strategies Informed /heuristic strategies best-first search best-first search A* A* Heuristic functions Heuristic functions memory bounded search memory bounded search simulated annealing simulated annealing Hill-climbing Hill-climbing

Copyright R. Weber Breadth-first search all nodes at depth d are expanded before the nodes at depth d+1 all nodes at depth d are expanded before the nodes at depth d+1 if there is a solution, it will find if there is a solution, it will find if there are more than one, it will find the shallowest if there are more than one, it will find the shallowest planning puzzles; large memory requirements planning puzzles; large memory requirements

Copyright R. Weber Depth-first search expands the deepest node to the deepest level of a tree expands the deepest node to the deepest level of a tree only expands nodes at shallower levels after reaching the end only expands nodes at shallower levels after reaching the end it does not guarantee a solution (neither complete or optimal) it does not guarantee a solution (neither complete or optimal) less memory requirements less memory requirements may be faster than breadth-first, but it may get stuck on a bad path may be faster than breadth-first, but it may get stuck on a bad path

Copyright R. Weber Depth-limited search imposes a bound on the maximum depth of a path imposes a bound on the maximum depth of a path guarantees that a solution is found if it exists guarantees that a solution is found if it exists Iterative deepening search tries to bound the search iteratively tries to bound the search iteratively it is optimal and complete it is optimal and complete implement depth first search up to the Nth level. N should start at either 0 or 1 and be incremented after each search up to N is complete. implement depth first search up to the Nth level. N should start at either 0 or 1 and be incremented after each search up to N is complete.

Copyright R. Weber Uniform cost search expands the lowest-cost node expands the lowest-cost node to find the best solution it requires that all operators have positive costs (the cost of a path does not decrease as we go along that path) to find the best solution it requires that all operators have positive costs (the cost of a path does not decrease as we go along that path) route-finding route-finding

Copyright R. Weber Bidirectional search start searching from the origin and from the goal and stop when searches meet start searching from the origin and from the goal and stop when searches meet

Copyright R. Weber Informed strategies best-first search best-first search nodes are ordered by an evaluation function nodes are ordered by an evaluation function A* A* uses an estimated cost uses an estimated cost Heuristic functions Heuristic functions memory bounded search memory bounded search simulated annealing simulated annealing to escape local maxima Hill-climbing Hill-climbing continually moves in the direction of increasing value

Copyright R. Weber Search strategies When do you solve a problem using a search strategy? When there is an algorithm to solve it when: it is guaranteed to find a solution it is guaranteed to find a solution when it finds a solution in a timely manner when it finds a solution in a timely manner when the memory requirements are reasonable when the memory requirements are reasonable when it can find the best solution or at least one of the best when it can find the best solution or at least one of the best sometimes, one can combine searches to improve the quality of a solution sometimes, one can combine searches to improve the quality of a solution