Informed Search. Topics. Review: Tree Search. What is Informed Search? Best-First Search

Similar documents
Artificial Intelligence. Informed search methods

Solving Problems using Search

Artificial Intelligence: Search Part 2: Heuristic search

Introduction to Artificial Intelligence. Informed Search

Informed search algorithms

TDT4136 Logic and Reasoning Systems

Informed search algorithms. Chapter 4, Sections 1 2 1

CS414-Artificial Intelligence

COSC343: Artificial Intelligence

Informed Search Algorithms. Chapter 4

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

Solving Problems by Searching

CS486/686 Lecture Slides (c) 2015 P.Poupart

Artificial Intelligence

Informed search algorithms

Informed Search and Exploration

CS486/686 Lecture Slides (c) 2014 P.Poupart

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2.

CS:4420 Artificial Intelligence

Searching and NetLogo

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

Foundations of Artificial Intelligence

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

Planning, Execution & Learning 1. Heuristic Search Planning

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Informed Search and Exploration

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Informed Search and Exploration

Introduction to Artificial Intelligence (G51IAI)

Artificial Intelligence. 2. Informed Search

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Informed Search and Exploration

Robot Programming with Lisp

Outline. Informed search algorithms. Best-first search. Review: Tree search. A search Heuristics. Chapter 4, Sections 1 2 4

Informed search algorithms

Problem solving and search

Foundations of Artificial Intelligence

4. Solving Problems by Searching

Problem solving and search

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

Artificial Intelligence

AGENTS AND ENVIRONMENTS. What is AI in reality?

Problem solving and search

Informed search algorithms. Chapter 4

Algorithm. December 7, Shortest path using A Algorithm. Phaneendhar Reddy Vanam. Introduction. History. Components of A.

CS 380: Artificial Intelligence Lecture #4

AGENTS AND ENVIRONMENTS. What is AI in reality?

Artificial Intelligence

DFS. Depth-limited Search

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 2: Search 1.

Artificial Intelligence: Search Part 1: Uninformed graph search

Foundations of Artificial Intelligence

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n

Automated Planning & Artificial Intelligence

Informed search algorithms. Chapter 4

Informatics 2D: Tutorial 2 (Solutions)

16.1 Introduction. Foundations of Artificial Intelligence Introduction Greedy Best-first Search 16.3 A Weighted A. 16.

Solving Problems by Searching

Solving Problems by Searching

Artificial Intelligence, CS, Nanjing University Spring, 2016, Yang Yu. Lecture 5: Search 4.

Contents. Foundations of Artificial Intelligence. General Algorithm. Best-First Search

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km

Introduction to Artificial Intelligence 2 nd semester 2016/2017. Chapter 4: Beyond Classical Search

Artificial Intelligence CS 6364

ARTIFICIAL INTELLIGENCE. Informed search

Problem Solving and Search. Geraint A. Wiggins Professor of Computational Creativity Department of Computer Science Vrije Universiteit Brussel

Solving Problems by Searching. Artificial Intelligence Santa Clara University 2016

Informed search methods

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,

PEAS: Medical diagnosis system

Outline. Solving Problems by Searching. Introduction. Problem-solving agents

Problem solving and search

Planning and search. Lecture 1: Introduction and Revision of Search. Lecture 1: Introduction and Revision of Search 1

Optimal Control and Dynamic Programming

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms. Wolfram Burgard & Bernhard Nebel

Chapter4. Tree Search (Reviewed, Fig. 3.9) Best-First Search. Search Strategies. Best-First Search (cont.-2) Best-First Search (cont.

Clustering (Un-supervised Learning)

Shortest path using A Algorithm

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search:

CS-E4800 Artificial Intelligence

Outline. Best-first search. Greedy best-first search A* search Heuristics Local search algorithms

Artificial Intelligence

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

Informed (heuristic) search (cont). Constraint-satisfaction search.

2006/2007 Intelligent Systems 1. Intelligent Systems. Prof. dr. Paul De Bra Technische Universiteit Eindhoven

Seminar: Search and Optimization

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

Artificial Intelligence Informed search. Peter Antal

Summary. Search CSL302 - ARTIFICIAL INTELLIGENCE 1

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Transcription:

Topics Informed Search Best-First Search Greedy Search A* Search Sattiraju Prabhakar CS771: Classes,, Wichita State University 3/6/2005 AI_InformedSearch 2 Review: Tree Search What is Informed Search? The search strategies use problem specific knowledge, in addition to the problem definition Examples: In Romania Touring Example: Problem Specific knowledge is the distance of a city from Bucharest (goal state) In 8-Puzzle problem: Problem specific knowledge is how many tiles are out of place with the goal state Uninformed search strategies are inefficient Informed searches can be very efficient 3/6/2005 AI_InformedSearch 3 3/6/2005 AI_InformedSearch 4 1

Map of Romania Romania Distances Arad Bucharest Craiova Dobreta Eforie Fagaras Giurgiu Hirsova Iasi Lugoj 366 0 0 242 1 176 77 1 226 244 Mehadia Neamt Oradea Pitesti Rimnicu Vilcea Sibiu Timisoara Urziceni Vaslui Zerind 241 234 380 100 193 253 329 80 199 374 3/6/2005 AI_InformedSearch 5 3/6/2005 AI_InformedSearch 6 General Approach: Best-first Search Greedy Search 3/6/2005 AI_InformedSearch 7 3/6/2005 AI_InformedSearch 8 2

What is Greedy Search? Greedy Search Example 3/6/2005 AI_InformedSearch 9 3/6/2005 AI_InformedSearch 10 Greedy Search Example Greedy Search Example 3/6/2005 AI_InformedSearch 11 3/6/2005 AI_InformedSearch 3

Greedy Search Example Modifying Tree Search Algorithm INSERT-ALL: Before insert, the fringe is already sorted over h(n) (Consider the queue is an array, A f ) From the expansion of popped out node, create an array of children nodes (A c ) Combine these two arrays to result in a new array that is sorted over h(n) It is the new fringe Retrieving h(n) To the tree search, now a table of h(n) values for each state is available When you expand a node, you need to retrieve the h(n) values 3/6/2005 AI_InformedSearch 3/6/2005 AI_InformedSearch IMPORTANT! Admissible Heuristics Performance of your algorithm depends upon the heuristic function It can improve or decrease based on the type of heuristic function The best heuristic function needs to try only one node in all the children of a node The worst heuristic function will try all the children of a node Equivalent to depth-first search Your need to specify heuristic function The algorithm cannot figure out the heuristic function by itself 3/6/2005 AI_InformedSearch 3/6/2005 AI_InformedSearch 4

Tutorial Properties of Greedy Search For the following two examples write their h(n) functions and then apply the greedy search algorithm 8-Puzzle problem Blocks World Problem 3/6/2005 AI_InformedSearch 17 3/6/2005 AI_InformedSearch 18 A* Search Basic Idea 3/6/2005 AI_InformedSearch 19 3/6/2005 AI_InformedSearch 20 5

A* Search Example A* Search Example 3/6/2005 AI_InformedSearch 21 3/6/2005 AI_InformedSearch 22 A* Search Example A* Search Example 3/6/2005 AI_InformedSearch 23 3/6/2005 AI_InformedSearch 24 6

A* Search Example A* Search Example 3/6/2005 AI_InformedSearch 25 3/6/2005 AI_InformedSearch 26 Algorithm Tutorial You need to modify Greed Search by using f(n) = g(n) + h(n) in place of h(n) For the following problems apply A* algorithm 8-Puzzle problem 3/6/2005 AI_InformedSearch 27 3/6/2005 AI_InformedSearch 28 7

Properties of A* Local Search 3/6/2005 AI_InformedSearch 29 3/6/2005 AI_InformedSearch 30 Topics Local Search Hill-Climbing Search Genetic Algorithms Two types of problems: Type1: Solutions with sequences of actions Type2: Solutions that show that goal has reached, without a need for path Examples; 8-queens problem Problem of Type1: Informed and Uninformed searches explore search spaces systematically We keep the search paths in memory We record which alternatives we searched and which we have not Problems of Tyep2: Local Search 3/6/2005 AI_InformedSearch 31 3/6/2005 AI_InformedSearch 32 8

Applications of Local Search Characteristics of Local Search I Integrated-circuit design Factory-floor layout Job-shop scheduling Automated Programming Telecommunications Network Optimization Vehicle Routing Portfolio Management Not concerned with paths in the tree. These algorithms start at a current state Explore only in the neighborhood Paths followed by search are not retained Advantages: They use very little memory They can find solutions in large or infinite state spaces 3/6/2005 AI_InformedSearch 33 3/6/2005 AI_InformedSearch 34 Characteristics of Local Search II One Dimensional State Space Landscape Search satisfying an objective function: Objective function specifies constraint on search Examples: Optimization, fitness function Search Space Landscapes: They have both a location and elevation Location: Current state Elevation: Cost (global minimum) Objective: To explore the landscape to find a goal (Completeness) To find a global minimum or a global maximum (Optimality) objective function shoulder global maximum current state local maximum flat local maximum state space 3/6/2005 AI_InformedSearch 35 3/6/2005 AI_InformedSearch 36 9

Hill-Climbing Search Algorithm Goal is at the peak of hill Terminates when it reaches peak Search strategy: to move up the hill Does not maintain a search tree Records only the state and its value for objective function 3/6/2005 AI_InformedSearch 37 3/6/2005 AI_InformedSearch 38 Algorithm 8-queens example Complete State Formulation: Description has all aspects Example: All queens are on board one per column Successor Function: Generates all states following a local condition Example: Moving a queen from a location to another in the same column 8 columns and 7 positions = 56 successors Heuristic Cost Function (h): Number of pairs of queens that are attacking each other Global minimum is zero 3/6/2005 AI_InformedSearch 39 3/6/2005 AI_InformedSearch 40 10

8-Queens Problem 8-queens for Hill Climbing 18 17 18 17 18 8-queens state with h = 17 18 17 18 3/6/2005 AI_InformedSearch 41 3/6/2005 AI_InformedSearch 42 8-Queens Example: Local Minima Analysis State has h = 1 It is a greedy local search Does not think ahead Can get stuck: Local Maxima: Several maxima Ridges: Sequence of local maxima Plateau: Flat area of objective function 3/6/2005 AI_InformedSearch 43 3/6/2005 AI_InformedSearch 44 11

Local Maxima Genetic Algorithms 3/6/2005 AI_InformedSearch 45 3/6/2005 AI_InformedSearch 46 Local Beam Search Characteristics of Genetic Algorithms (1) Keeps track of k states rather than one state Begins with k randomly generated states At each step the successors of all k states are generated If any one is a goal, the algorithm halts. Otherwise, it selects k best successors from the complete list and repeats State Space: Individuals and Populations: Each state is an individual A set of states the search strategy keeps at each stage is a population Representing States: A string over a finite alphabet Successor Function: Combining two current states (parents) produces a successor state 3/6/2005 AI_InformedSearch 47 3/6/2005 AI_InformedSearch 48

Characteristics of Genetic Algorithm (2) Population and Its changes Actions: Crossover: Part of a state is combined with part of another state Mutation: To randomly change the value of an element of string of the state Objective Function: 24748552 32752411 2444 325432 24 23 20 11 31% 29% 26% % 32752411 24748552 32752411 2444 32748552 24752411 327524 244411 327482 24752411 322524 244417 Fitness Function: A measure that can assign a number which can be used to compare different states (a) Initial Population (b) Fitness Function Solution: h(n) = 28 (c) Selection (d) Crossover (e) Mutation 3/6/2005 AI_InformedSearch 49 3/6/2005 AI_InformedSearch 50 8-quuens states for crossover Algorithm (1) + = function GENETIC-ALGORITHM(population, FITNESS-FN) returns an individual inputs: population, a set of individuals FITNESS-FN, a function that measures the fitness of an individual repeat new-population empty set (Continued on next page) 3/6/2005 AI_InformedSearch 51 3/6/2005 AI_InformedSearch 52

Algorithm (2) Algorithm (3) loop for i from 1 to SIZE(population) do x RANDOM-SELECTION (population, FITNESS-FN) Y RANDOM-SELECTION (population, FITNESS-FN) child REPRODUCE(x, y) if (small random probability) then child MUTATE(child) add child to new-population until some individual is fit enough, or enough time has elapsed return the best individual in population, according to FITNESS-FN function REPRODUCE(x, y) returns an individual inputs: x, y, parent individuals n LENGTH(x) c random number from 1 to n return APPEND (SUBSTRING (x, 1, c) SUBSTRING(y, c+1, n)) 3/6/2005 AI_InformedSearch 53 3/6/2005 AI_InformedSearch 54