180 likes | 268 Vues
This algorithm passes through pairs of elements in given PDBs, taking the highest value from each pair and utilizing domain abstractions for hashing. Background information includes IDA* on the 8-puzzle and Propagating h-values using Mero's algorithm.
E N D
Dovetail Killer?Implementing Jonathan’s New Idea Tarek Sherif
The Algorithm • Given two or more PDBs the algorithm simply passes through each pair of elements, in order. • The hybrid takes: • The highest of the two values. • The original PDB from which the chosen value came.
The Algorithm • The search requires: • The hybrid PDB • The domain abstractions from the original PDBs. • To access the hybrid for state N: • N is hashed into the hybrid using all given domain abstractions.
The Algorithm • If the domain abstraction used to hash to a value is that of the PDB the value came from, take that value. Otherwise assume it is 0. • h(N) = max of all taken values.
Background • IDA* on the 8-puzzle used to test the algorithm. • Propagating h-values using Mero’s algorithm. • Used only at the fringe of the search, since that is where pruning might occur.
Background • The Perfect Hash. • Assuming only one token in domain abstraction. • p0 = position of blank. • p1 = position of first constant if it is less than position of blank, position -1 otherwise. • p2 = position of the second constant if it is less than positions of blank of first constant, position -1 if it is higher than just one, position -2 if it is higher than both. • Etc.
Background • Hash = p0 + 9*p1 + 72*p2 … • E.g. Domain Abstraction : 0 1 2 x 4 x x x x State : x 0 x x 1 x 4 2 x p0 = 1 p1 = 4 – 1 = 3 (because position of 1 is higher than 0) p2 = 7 – 2 = 5 (because position of 2 is higher than 1 and 0) p3 = 6 – 2 = 4 (because position of 4 is higher than 1 and 0) Hash = 1 + (9 * 3) + (72 * 5) + (504 * 4) = 2404
Background Hash Value Domain 1 Domain 2 0 1 2 3 x x x x x 0 x x x x x 6 7 8 0 0 1 2 3 x x x x x 0 6 7 8 x x x x x 1 1 0 2 3 x x x x x 6 0 7 8 x x x x x 2 1 2 0 3 x x x x x 6 7 0 8 x x x x x . . 9 0 2 1 3 x x x x x 0 7 6 8 x x x x x
Experiments • Four domain abstractions with four constants each: • Φ1: 0 1 2 3 4 x x x x • Φ2: 0 x x x x 5 6 7 8 • Φ3: 0 x 2 x 4 x 6 x 8 • Φ4: 0 1 x 3 x 5 x 7 x • Generated 100 random start states and saved them to file.
Hybrids • Three hybrids were created: • Φ1 + Φ2 • Φ1 + Φ3 • Φ3 + Φ4
Wow… that sucks. • Why? • Possibilities: • Are the values being lost randomly? • Likely to be closer to the goal since we’re removing the low values. • This may lead to the algorithm working well at first and then getting completely lost in areas nearer to the goal. • The hashing function: • May have some patterns that cause it to work poorly with this algorithm.
Wow… that sucks. • IDA* can’t do much backchecking, so areas with a lot of lost h values could be very problematic.
Possible Solutions • Try with A*. • Rotate the PDBs before combining them to attempt to “line them up.” • e.g. line up the goal states. • A weird one… take the minimum of the two PDB entries into the hybrid. • No failed lookups (min will always be admissible for both).
Possible Solutions • The search will still take the max of these mins.
Things to come… • Try it with A*. • Lining up the PDBs. • Possibly trying some combinations of Min and Max Hybrids. • Combining more than 2 PDBs. • Checking where Max Hybrid is having the most problems. • More PDBs, more hybrids, etc.