WHAT IS AN INCONSISTENT HEURISTIC? HOW DO YOU GET AN
Transcription
WHAT IS AN INCONSISTENT HEURISTIC? HOW DO YOU GET AN
Inconsistent Heuristics What How is an Inconsistent Heuristic? Inconsistent Heuristic? Consider this example: A heuristic is inconsistent if |h(x) - h(y)| > dist(x, y) for states x, y. Consistent Heuristic 4 2 3 2 1 2 0 Goal PDB 3 1 1 2 x 2 2 4 5 3 4 5 x x 5 6 7 8 6 7 8 x x 8 3 1 |3-0| > 1 4 |3-4| ! 1 Goal State 0 Dual of Start 2 3 1 4 5 6 7 8 This research was sponsored by the Israeli Science foundation under grant number 828/06 to Ariel Felner. are the benefits of using inconsistent heuristics? Heuristic Value Distribution Inconsistency Properties Lookup Costs 1 1 Inconsistent Heuristic Heuristic Value 3 0 Regular PDB PDB Symmetry Dual Lookup Dual Symmetry 3 (Incorrect) convential wisdom about inconsistent heuritics: “One has to work quite hard to concoct heuristics that are admissible but not consistent” (Russell Norvig, 2005) We show that it is easy to create inconsistent heuristics, and that they can be quite useful for search. Bidirectional Pathmax For Inconsistent Heuristics Previous research (Mero, ‘84; Felner, et. al. ‘05) proposed using PathMax and Bidirectional PathMax (BPMX) for propagating heuristic information between parents and children during search. BPMX can only be applied when heuristics are inconsistent. Parent must have h-cost of 4 Heuristic difference is 3, but edge cost is 1 5 4 2 1 1 1 1 5 2 6 4 7 3 1 5 8 2 6 4 7 1 5 8 2 1 6 4 7 3 5 8 2 1 6 4 7 5 3 Other child must have h-cost of 3 The implementation of BPMX in IDA* is straightforward. 4 3 3 3 5 3 3 4 3 6 3 6 consistent 8 5 3 4 3 4 Expanded 5 Generated 3 Not Generated inconsistent In this example, the PDB provides 4 different heuristics. •These lookups use the same pattern database. •Unless we do the same lookups in every state, the heuristic may be inconsistent. •No single heuristic is always the best. • Additional heuristic lookups give diminishing returns Distribution of Heuristic Values (Rubik's Cube) 60 In general with K different consistent heuristics: We can get a new consistent heuristic by: • A priori choosing n out of the K heuristics • At each state compute the n values and take the max We get a new inconsistent heuristic by: • Randomly consulting n of the K heuristics -or • Using heuristics taken from the dual states We show that inconsistent heuristics work well in practice, even though previous work showed that there are cases where inconsistency is bad. Drawbacks? Regular Lookup 50 Why would we create an inconsistent heuristic? 1 4 Dual Lookup Random Lookup 40 Static Distribution 30 20 10 0 0 1 2 3 4 5 6 Heuristic Value 7 8 9 10 11 0 1 Each path through the top structure results in a partial expansion of the bottom path. 28 27 The total cost is O(N2) 0 8 0 26 1 8 0 8 O(N) nodes 0 1 1 1 17 9 8 0 25 25 O(N) nodes 1 Start State % Nodes Edge cost What do you get an As used in Single-Agent Search Ariel Felner, Ben-Gurion University Uzi Zahavi, Bar-Ilan University Jonathan Schaeffer, University of Alberta Nathan Sturtevant, University of Alberta