Inconsistent Heuristics

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Chapter 4: Informed Heuristic Search
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
Informed search algorithms
1 Dual lookups in Pattern Databases Ariel Felner, Ben-Gurion Univ. Israel Uzi Zahavi, Bar-Ilan Univ. Israel Jonathan Schaeffer, Univ. of Alberta, Canada.
Review: Search problem formulation
Heuristic Search techniques
Informed search strategies
Informed Search Problems
Artificial Intelligence Presentation
An Introduction to Artificial Intelligence
Problems and Their Classes
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
an incremental version of A*
Informed Search Methods How can we improve searching strategy by using intelligence? Map example: Heuristic: Expand those nodes closest in “as the crow.
Solving Problem by Searching
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
Search in AI.
Best-First Search: Agendas
Slide 1 Search: Advanced Topics Jim Little UBC CS 322 – Search 5 September 22, 2014 Textbook § 3.6.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
Game Playing CSC361 AI CSC361: Game Playing.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
Cooperating Intelligent Systems Informed search Chapter 4, AIMA.
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
Non-Conservative Cost Bound Increases in IDA* Doug Demyen.
Using Abstraction to Speed Up Search Robert Holte University of Ottawa.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Distributed Constraint Optimization Michal Jakob Agent Technology Center, Dept. of Computer Science and Engineering, FEE, Czech Technical University A4M33MAS.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Informed State Space Search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Heuristic Search Foundations of Artificial Intelligence.
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
Adversarial Search 2 (Game Playing)
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.
Adversarial Search In this lecture, we introduce a new search scenario: game playing 1.two players, 2.zero-sum game, (win-lose, lose-win, draw) 3.perfect.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
SMAG* A memory-bounded graph search
Abstraction Transformation & Heuristics
Artificial Intelligence Problem solving by searching CSC 361
Search: Advanced Topics Computer Science cpsc322, Lecture 9
EA C461 – Artificial Intelligence
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
More advanced aspects of search
CS 416 Artificial Intelligence
A Guaranteed Bidirectional Search
Presentation transcript:

Inconsistent Heuristics Mounica Atluri Sruthi Vemulapalli CSCE 580

Introduction It is assumed that admissible heuristics are consistent Issue of inconsistent heuristics was never fully investigated after the invention of IDA* Perceptions about inconsistent heuristics are wrong In the field of heuristic search it is usually assumed that admissible heuristics are consistent, implying that consistency is a desirable attribute. The term “inconsistent heuristic” has, been portrayed negatively, as something to be avoided. Issue of inconsistent heuristics was never fully investigated after the invention of IDA*. This paper shows that these . . . .

Consistent and Inconsistent heuristics Admissibility is a desirable property Consistency: An admissible heuristic h is consistent if, for every two states x and y, if there is a path from x to y, then h(x) ≤ c(x, y) + h(y) Admissibility is a desirable property for a heuristic since it guarantees that the solution returned by A* and IDA* will be optimal. Another attribute for a heuristic is that it can be consistent ..

Inconsistent heuristics An admissible heuristic h is inconsistent if for at least one pair of states x and y, h(x) > c(x, y) + h(y) Two types of inconsistencies h decreases from parent to child h increases from parent to child

Inconsistent heuristics h decreases from parent to child f(p)=5+5=10 f(c1) = 6+2 = 8 lower bound on the total cost of reaching the goal through c1 information provided by evaluating c1 is “inconsistent” Since the heuristic is admissible, any path from the start node to the goal node that passes through p has a cost of at least 10.

Inconsistent heuristics h increases from parent to child Inconsistent only if undirected heuristic increased from 5 to 8 f is still monotonic increasing from p to c2 edge from c2 to p Then, f decreases Since the graph is undirected there is also an edge from c2 to p. Hence, logically p is also one of the children of c2. In this second occurrence of p, the f-value will decrease from 14 to 12 and is non-monotonic

Inconsistent heuristics in A* If a consistent heuristic is used then, the first time a node n is expanded by A*, it always has the optimal g-value When a node is expanded and moved to CLOSED it will never be chosen for expansion again With inconsistent heuristics, A* may re-expand nodes Risk of more node expansions Whenever a node is generated by A*, it is first matched against OPEN and CLOSED and if a duplicate is found, the copy with the larger g-value is ignored when they are reached via a lower cost path

Inconsistent heuristics in IDA* IDA* does not perform duplicate detection Problem of re-expanding nodes already exists

Worst case behavior of A*with inconsistent heuristics heuristic - admissible and consistent, A* is optimal in terms of node expansions. heuristic – admissible and not consistent A* does O(2^N) node expansions N is number of distinct expanded states. Proved by Martelli We will look at the worst-case time complexity of A* when inconsistent heuristics are used

The Gi family of state spaces Gi – family of state spaces, i>=3 and contains i+1 states. Requires A* to do O(2^i) node expansions for the solution. Numbers inside the nodes – heuristic value Numbers beside the edges – cost of the edge

Inconsistencies in the graph Optimal path from the start (n5) to the goal (n0) has the states in decreasing order of their index. n4 has a large enough heuristic value (f(n4) = 14). n5 (23), n1(11), n2(12), n1(10), n3(13), n1(9), n2(10), n1(8), n4(14), n1 (7), n2(8), n1(6), n3(9), n1(5), n2(6), n1(4). Edge weights and heuristic values grow exponentially with the number of states existence of n4 in G5 essentially doubles the search effort required for G4. This property holds for each ni so the total amount of work is O(2i).

Variants of A* New algorithm B – improves A*’s worst case complexity while being admissible. Global variable F – track of max(f-value) of nodes expanded. Choice for next node: If fm, min f-value in OPEN >= F, then it is chosen. Else among all f< F, node with least g-value chosen. Value of F changes only once (when node is expanded), worst case complexity O(N^2) node expansions. This is poor. Bagchi and Mahanti’s alg C has the same worst case complexity after changing to fm <=F and altering the condition. Since value of F changes only once and a node can be expanded only once for a given F value. C is a variant of B.

Edge weights – non-negative. Δ – gcd of edge weights. New analysis Martelli’s proof of increase in the number of node expansions has never been proved. New Result: Exponential growth in solution costs and heuristic values are necessary conditions for A*’s worst-case behavior to occur. Edge weights – non-negative. Δ – gcd of edge weights. Cost of a path from start to node n or diff in costs between two nodes is a multiple of Δ. Reopening of n causes g(n) to reduce by a factor of Δ. His family of worst case state spaces have solution costs and heuristic values that grow exponentially with the number of states.

Theorem Theorem 1: If A* performs M >N node expansions then there must be a node with heuristic value of at least LB = Δ∗ T(M − N)/NT. Explain the figure

Contradictions Nodes distinct from S and K must exist along upper half because if there were a direct edge from S to K, then K would be opened as soon as S was expanded with a g-value < gL(K). Hence K would not be expanded via L, leading to a contradiction. Node B must be one of these intermediate nodes — it cannot be S and it cannot be K because if flast(K) was the largest flast value, the entire upper path would be expanded before K would be expanded via L, again a contradiction.

Pathmax f-values can be forced to be monotonic by propagating the f-value of a parent to a child if it is larger Heuristic values can be dynamically updated by adding two rules that propagate heuristic values during the search between a parent node p and its child node ci : Pathmax Rule 1: h(ci) ← max(h(ci), h(p) − c(p, ci)) Pathmax Rule 2: h(p) ← max(h(p), minci∈Successors[p](h(ci) + c(p, ci)))

Pathmax Rule 1 f(c1) := max(6, 9-1) f(c2) := max(5, 9-2) Causes the f-value to be monotonic non-decreasing Heuristic can still be inconsistent if the graph is undirected

Pathmax Rule 2 Rule 2 corrects h(p) so that h*(p) is at least as large as minci∈Successors[p](h(ci) + c(p, ci)) c1 has the minimal f-value and its value is propagated to the parent There is an edge from state p to its parent a and shortest path from p to goal might pass through a, Rule 2 is relevant only if a is listed as a child of p Possible only if the parent pruning optimization is not used

Monotonicity after applying Pathmax After applying pathmax the f-values never decrease along the path that was just traversed However, the f-values can still be non-monotonic for paths that were not traversed yet Closed nodes are never re-opened by A* Key advantage of a consistent heuristic over an inconsistent heuristic Pathmax does not correct this deficiency of inconsistent heuristics With a consistent heuristic where the cost function is monotonic, closed nodes are never re-opened by A*,

Bidirectional Pathmax – BPMX Mero’s Rule 1 for value propagation is beneficial in application domains where the search graph is undirected. Assume an admissible heuristic h where h(x) > h(y) + c(x, y). Now, h*(x) ≤ c(x, y) + h*(y). From above, h∗(y) ≥ h∗(x)−c(x, y) ≥ h(x) −c(x, y) Generalized as, h(y) ← max (h(y), h(x) − c(x, y)) This rule is applied to a parent and child in a search tree. Propagation of f-values from parent to child to make them monotonic non-decreasing is called pathmax. because a possible path from x to the goal passes through y.

Pathmax Rule 3: h(p) ← max(h(p), h(c) − c(c, p)) – New pathmax rule if there is an edge from child(c) to its parent(p). updating a node’s value can have a cascading effect, as the propagation that started from child c1 continues from the parent to the other children

BPMX FOR IDA* Observation: What is important for IDA* is not the exact f-value of a node but whether or not the f-value causes a cutoff. Explanation: IDA* expands a node if its f-value is less than or equal to the current threshold T and backtracks if it is larger than T. Thus, only a cutoff reduces the work performed.

Using Rule 3 with IDA* using Rule 1 with IDA* does not have any benefit. This is because propagating the heuristic of the parent p (with Rule 1) to the child c will cause f(c) = f(p). It will not increase its f-value above the threshold T (as the f-value of p was already less than or equal to T) and therefore will not result in additional pruning.

Alternative exhaustive implementation: The drawback of this implementation is that parent p is fully expanded.

Pathmax Rule 2 when IDA* is used No benefit for using Rule 2 on top of IDA* in undirected state spaces as no pruning will be caused by it

Pathmax Rule 2 when IDA* is used p cannot benefit from Rule 2: if minimum child (cm) causes a cutoff, all the children are generated in order to find the one with minimum cost Either way, all children are generated cm produced the minimal f-value among all the children

Pathmax Rule 2 when IDA* is used a cannot benefit from Rule 2: Assume Rule 2 is activated, fnew(p)=f(cm) fnew(p) ≥ f(p) as f is monotonic a must be listed as a child of p If (cm = a) and Rule 3 is activated, hnew(a) = h(p)−c(a, p)=h(cm) + c(p, a) − c(a, p) = h(a) If (cm != a) and Rule 3 is activated, hnew(a) = h(p)−c(a, p) < h(cm) + c(p, a) − c(a, p) = h(a) applying Rule 3 can only decrease the h-value of a and it is again unchanged.

Pathmax Rule 2 when A* is used Assume that p is expanded, its children are added to OPEN while p goes to CLOSED If f-value increases after applying Rule 2, it will go to CLOSED with a higher f-value This might affect duplicate pruning if node p is reached via a different path later

Creating Inconsistent heuristics Introducing inconsistency results in a strictly less informed heuristic Random selection of heuristics: When a single heuristic is used the search may enter a region with low estimation values One solution is to consult a number of heuristics and select the maximum If a heuristic is selected randomly from a number of heuristics, only one heuristic will be consulted at each node Random selection produces inconsistent values There is a perception that inconsistent admissible heuristics are hard to create This has an over head of computing h-value

Creating Inconsistent heuristics Compressed pattern databases Trade-off between heuristic table-size and search performance Large PDBs can be compressed by replacing multiple entries by a single entry If the values in PDBs are locally correlated, then most of the heuristic accuracy will be preserved The compression process may introduce inconsistency into the heuristic

Conclusion Effective inconsistent heuristics are: easy to create, can be integrated into IDA* and A*, substantially reduces the search effort. IDA* re-expands nodes whether the heuristic is consistent or not. Generalized the known pathmax propagation rules to bidirectional pathmax (BPMX). Large reduction in the number of generated nodes when a single inconsistent heuristic is used. Increase in the diversity of values and improved performance.

References Inconsistent Heuristics and IDA*. Uzi Zahavi, Ariel Felner, Jonathan Schaeffer, and Nathan Sturtevant. "Inconsistent Heuristics." In Association for the Advancement of Artificial Intelligence (AAAI) National Conference, pages 1211-1216, 2007.  Ariel Felner, Uzi Zahavi, Robert Holte, Jonathan Schaeffer, and Nathan Sturtevant. "Inconsistent Heuristics in Theory and Practice," Artificial Intelligence, 2011. To appear.