Introduction HEURISTIC SEARCH. Introduction. Heuristics. Two main concerns of AI researchers. Two problems with the search process

Similar documents
HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Artificial Intelligence (part 4c) Strategies for State Space Search. (Informed..Heuristic search)

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Artificial Intelligence (part 4d)

Artificial Intelligence (part 4d)

HEURISTIC SEARCH. Heuristics: Rules for choosing the branches in a state space that are most likely to lead to an acceptable problem solution.

Monotonicity. Admissible Search: That finds the shortest path to the Goal. Monotonicity: local admissibility is called MONOTONICITY

Artificial Intelligence

State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

mywbut.com Informed Search Strategies-I

Artificial Intelligence

Downloaded from ioenotes.edu.np

Artificial Intelligence

Artificial Intelligence (Heuristic Search)

The wolf sheep cabbage problem. Search. Terminology. Solution. Finite state acceptor / state space

STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

DFS. Depth-limited Search

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Artificial Intelligence Fall, 2010

Algorithm Design Techniques (III)

Problem Solving & Heuristic Search

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

Downloded from: CSITauthority.blogspot.com

H=1. H=0 Goal state H=2 H=2

CS 380: ARTIFICIAL INTELLIGENCE PROBLEM SOLVING: INFORMED SEARCH, A* Santiago Ontañón

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

INTRODUCTION TO HEURISTIC SEARCH

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

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

Problem Solving and Search

Artificial Intelligence Informed search. Peter Antal

CS 380: ARTIFICIAL INTELLIGENCE

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,

Lecture 2: Problem Solving and Search

Lecture 4: Informed/Heuristic Search

Informed/Heuristic Search

Artificial Intelligence

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Heuristic (Informed) Search

Search. Search Trees

Computer Science and Software Engineering University of Wisconsin - Platteville. 3. Search (Part 1) CS 3030 Lecture Notes Yan Shi UW-Platteville

Structures and Strategies For Space State Search

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

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

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

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

1 Introduction and Examples

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

Heuristic (Informed) Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Informed (Heuristic) Search. Idea: be smart about what paths to try.

Informed search algorithms

Heuristic Search. Heuristic Search. Heuristic Search. CSE 3401: Intro to AI & LP Informed Search

Informed search strategies (Section ) Source: Fotolia

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

Informed search methods

Solving Problems: Blind Search

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

Efficient memory-bounded search methods

CS 188: Artificial Intelligence. Recap Search I

Best-First Search! Minimizing Space or Time!! RBFS! Save space, take more time!

Searching. Assume goal- or utilitybased. Next task to achieve is to determine the best path to the goal

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

Artificial Intelligence

SRI VIDYA COLLEGE OF ENGINEERING & TECHNOLOGY REPRESENTATION OF KNOWLEDGE PART A

COMP9414: Artificial Intelligence Informed Search

Algorithm Design Techniques. Hwansoo Han

Informed Search Methods

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016

Notes. Video Game AI: Lecture 5 Planning for Pathfinding. Lecture Overview. Knowledge vs Search. Jonathan Schaeffer this Friday

ITCS 6150 Intelligent Systems. Lecture 5 Informed Searches

CSC384: Intro to Artificial Intelligence Search III

Heuristic Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA

Informed Search. CMU Snake Robot. Administrative. Uninformed search strategies. Assignment 1 was due before class how d it go?

Artificial Intelligence (part 4a) Problem Solving Using Search: Structures and Strategies for State Space Search

Artificial Intelligence

CS 520: Introduction to Artificial Intelligence. Lectures on Search

Artificial Intelligence CS 6364

Chapters 3-5 Problem Solving using Search

Data Structures and Algorithms

Problem Solving: Informed Search

Heuristic Optimisation

Advanced A* Improvements

Blind (Uninformed) Search (Where we systematically explore alternatives)

Informed search methods

Outline. Best-first search

Informed Search A* Algorithm

Outline. Best-first search

Informed search algorithms. Chapter 4

Review Adversarial (Game) Search ( ) Review Constraint Satisfaction ( ) Please review your quizzes and old CS-271 tests

3 SOLVING PROBLEMS BY SEARCHING

Lecture 14: March 9, 2015

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Problem Space and Search Tree

Program of Study. Artificial Intelligence 1. Shane Torbert TJHSST

Today s s lecture. Lecture 3: Search - 2. Problem Solving by Search. Agent vs. Conventional AI View. Victor R. Lesser. CMPSCI 683 Fall 2004

COMP9414: Artificial Intelligence Informed Search

CS 771 Artificial Intelligence. Informed Search

Lecture 9. Heuristic search, continued. CS-424 Gregory Dudek

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Transcription:

HEURISTIC SERCH George F Luger RTIFICIL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Introduction Two main concerns of I researchers 1) Representation of the knowledge ddresses the capturing of the full range of knowledge using a proper language 2) Search for a logical alternative Concerned with the searching of an alternative solution based on the knowledge 1 2 Introduction Two problems with the search process problem may not have an exact solution due to inherent ambiguities in the problem statement or available data E.g. medical diagnosis problem may have an exact solution, but the computational cost of finding it may be prohibitive E.g. chess Heuristics are often used to solve the two problems Heuristics In state space search, heuristics are rules for choosing the branches that will most likely lead to an acceptable problem solution (a goal state) heuristic is an informed guess of the next step to be taken in solving a problem It is often based on experience or intuition It can lead to a suboptimal solution or fail to find any solution at all 3 4

Heuristic Search It is helpful to think of heuristic search from two perspectives The heuristic measure n algorithm that uses the heuristics to search for the state space Tic-Tac-Toe Example The combinatorics for exhaustive search are high but not insurmountable Total number of states = 9! Many problem configurations are equivalent under symmetric operations of the game board Use of symmetry reduces initial moves from nine to three Use of symmetry on the second level further reduces the number of states to 12 7! 5 6 Fig 4.1 First three levels of the tic-tac-toe state space reduced by symmetry Tic-Tac-Toe Example-Continued simple heuristic can almost eliminate exhaustive search entirely Move to the state with the most winning opportunities If two states have the same number of opportunities, move to the first state found Total number of states will be reduced from 9! To less than 25 7 8

Fig 4.2 The most wins heuristic applied to the first children in tic-tac-toe. Fig 4.3 Heuristically reduced state space for tic-tac-toe. 9 10 Hill-Climbing Hill-Climbing The simplest way to implement heuristic search It starts with an arbitrary solution to a problem Then it finds a better solution by incrementally changing a single element of the solution It repeats until no further improvements can be found To determine if a solution is better, it uses a heuristic function to estimate how close a given state is to the goal state Tic-tac-toe ( take the state with the most possible wins ) is an example of hill-climbing algorithm It expands the current state of the search and evaluates its children The best child is selected for further expansion Neither its siblings nor its parents are retained Since it keeps no history, it cannot recover (backtrack) from failures of its strategy 11 12

Hill-Climbing Fig 4.4 The local maximum problem for hill-climbing with 3-level look ahead major problem with hill-climbing strategy is their tendency to become stuck at local maxima E.g.: In the 8-puzzle game, in order to move a tile to its destination, other tiles already in goal position need be moved out, worsening the board state It cannot distinguish between local and global maxima 13 14 Best-First Search Best-First Search Depth-first search: not all competing branches having to be expanded. Breadth-first search: not getting trapped on deadend paths. Combining the two is to follow a single path at a time, but switch paths whenever some competing path look more promising than the current one. 15 It uses a heuristic function to estimate how close the end of a path is to a solution (goal) The paths which are judged to be closer to a solution are extended first It does not search all the space Unlike hill-climbing, it can recover from errors and find the correct goal The best-first search algorithm uses two queues open: keeps states generated but not examined close: records states already visited 16

Fig 4.10 Heuristic search of a hypothetical state space. 17 The heuristic is fallible: O has a lower value than the goal P. 18 trace of the execution of best_first_search for Figure 4.4 Fig 4.11 Heuristic search of a hypothetical state space with open and closed states highlighted. 19 20

Best-First Search Fig 4.12 The start state, first moves, and goal state for an example-8 puzzle. B C D 3 5 1 B 3 C 5 E 4 D F 6 B C G H 5 E 6 5 4 D F 6 B C D G H 5 E 6 5 I J 2 1 F 6 21 22 Heuristics for Solving the 8-Puzzle Fig 4.14 Three heuristics applied to states in the 8-puzzle. 1) Count the tiles out of place in each state when compared with the goal It does not take into account the distance the tiles must be moved 2) Sum all the distances by which the tiles are out of place Both 1) & 2) fail to acknowledge the difficulty of tile reversal 3) Multiply a small number (e.g. 2) times each direct tile reversal 4) dd the sum of the distances the tiles are out of place and 2 times the number of direct reversals 23 24

Evaluation Function for 8-Puzzle Fig 4.15 The heuristic f applied to states in the 8-puzzle. If two states have the same or nearly the same heuristic evaluations, choose the state that is nearer to the root state Evaluation function: f(n) = g(n) + h(n) g(n): actual length of the path from state n to the start state h(n): a heuristic estimate of the distance from state n to a goal 25 26 Implement f(n) with Best First Search The successive stages of open and closed that generate this graph are: Operations on states generate children of the state under examination Each new state is checked to see if it has occurred before (on either open or closed queue) to prevent loops Each state n is given an f value States on open are sorted by their f values to allow the algorithm to recover from dead ends 27 28

Fig 4.16 State space generated in heuristic search of the 8-puzzle graph. 29 Fig 4.17 Open and clos sed as they appear after the 3rd iterat tion of heuristic search 30 dmissibility search algorithm is admissible if it is guaranteed to find a minimal path to a solution whenever such a path exists E.g. breath-first search (too inefficient for practical use) If an algorithm uses a heuristic function whose value for any state n is less than or equal to the actual cost from n to the goal, it is called * ll * algorithms are admissible E.g. the three heuristics from 8-puzzle examples are admissible and guarantee optimal solutions 31 32

Monotonicity Informedness monotonic heuristic is everywhere admissible, reaching each state along the shortest path from its ancestors Number of tiles out of place heuristic is more informed than breath-first search where h(n)=0 Sum of distances out of place heuristic is more informed than number of tiles out of place heuristic If h 2 is more informed than h 1, h 2 needs less space to expand to get the optimal solution (both will find the optimal path) 33 34 Fig 4.18 (see next slide) compares the state space searched using heuristic search with the state space searched by breadth-first search. The proportion of the graph searched heuristically is shaded. The optimal search selection is in bold. Heuristic used is f(n) = g(n) + h(n) where h(n) is number of tiles out of place. 35 36