HOG2
|
This class uses the first of two Myrvold-Russkey ranking functions which run in linear time, but does not produce a lexicographical ranking. More...
#include <MR1PermutationPDB.h>
Public Member Functions | |
MR1PermutationPDB (environment *e, const state &s, const std::vector< int > &distincts) | |
virtual uint64_t | GetPDBHash (const state &s, int threadID=0) const |
virtual void | GetStateFromPDBHash (uint64_t hash, state &s, int threadID=0) const |
virtual uint64_t | GetAbstractHash (const state &s, int threadID=0) const |
virtual state | GetStateFromAbstractState (state &s) const |
std::string | GetFileName (const char *prefix) |
Public Member Functions inherited from PermutationPDB< state, action, environment, 8 > | |
PermutationPDB (environment *e, const state &s, const std::vector< int > &distincts) | |
virtual uint64_t | GetPDBSize () const |
bool | Load (FILE *f) |
bool | Load (const char *prefix) |
void | Save (FILE *f) |
void | Save (const char *prefix) |
Public Member Functions inherited from PDBHeuristic< state, action, environment, state, bits > | |
PDBHeuristic (environment *e) | |
virtual | ~PDBHeuristic () |
void | SetGoal (const state &goal) |
void | SetGoal (const std::vector< state > &goals) |
virtual double | HCost (const state &a, const state &b) const |
void | ShuffleValues () |
This methods randomizes the entries in the PDB. More... | |
void | BuildPDB (const state &goal) |
void | BuildPDB (const state &goal, int numThreads) |
void | BuildPDBForward (const state &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBForward (const std::vector< state > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBBackward (const state &goal, int numThreads) |
void | BuildPDBForwardBackward (const state &goal, int numThreads) |
void | BuildAdditivePDB (const state &goal, int numThreads, bool useCourseOpen=true) |
void | DivCompress (int factor, bool print_histogram) |
void | ModCompress (int factor, bool print_histogram) |
void | ModCompress (uint64_t newEntries, bool print_histogram) |
void | ZeroLowValues (int limit) |
void | DeltaCompress (Heuristic< state > *h, state goal, bool print_histogram) |
void | FractionalDivCompress (uint64_t count, bool print_histogram) |
void | FractionalModCompress (uint64_t factor, bool print_histogram) |
void | ValueCompress (int maxValue, bool print_histogram) |
void | ValueCompress (std::vector< int > cutoffs, bool print_histogram) |
void | ValueRangeCompress (int numBits, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 5 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 4 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 3 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 2 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 1 > *, bool print_histogram) |
void | CustomValueRangeCompress (std::vector< uint64_t > dist, int numBits, bool print_histogram) |
double | PrintHistogram () |
double | GetAverageValue () |
void | GetHistogram (std::vector< uint64_t > &histogram) |
Public Member Functions inherited from Heuristic< state > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Attributes | |
std::vector< std::vector< int > > | dualCache |
std::vector< std::vector< int > > | locsCache |
std::vector< std::vector< int > > | valueStack |
Additional Inherited Members | |
Public Attributes inherited from PDBHeuristic< state, action, environment, state, bits > | |
NBitArray< pdbBits > | PDB |
int | vrcValues [1<< pdbBits] |
PDBLookupType | type |
uint64_t | compressionValue |
environment * | env |
std::vector< state > | goalState |
Public Attributes inherited from Heuristic< state > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from PermutationPDB< state, action, environment, 8 > | |
std::vector< int > | distinct |
size_t | puzzleSize |
uint64_t | pdbSize |
state | example |
This class uses the first of two Myrvold-Russkey ranking functions which run in linear time, but does not produce a lexicographical ranking.
Note that it produces the dual of their result, as this is necessary for the partial ranking.
For more details see: http://webhome.cs.uvic.ca/~ruskey/Publications/RankPerm/MyrvoldRuskey.pdf
Definition at line 25 of file MR1PermutationPDB.h.
MR1PermutationPDB< state, action, environment, bits >::MR1PermutationPDB | ( | environment * | e, |
const state & | s, | ||
const std::vector< int > & | distincts | ||
) |
Definition at line 47 of file MR1PermutationPDB.h.
References PDBHeuristic< state, action, environment, state, bits >::SetGoal().
|
inlinevirtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 31 of file MR1PermutationPDB.h.
References MR1PermutationPDB< state, action, environment, bits >::GetPDBHash().
|
virtual |
Reimplemented from PermutationPDB< state, action, environment, 8 >.
Definition at line 141 of file MR1PermutationPDB.h.
References PermutationPDB< state, action, environment, bits >::GetFileName().
|
virtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 61 of file MR1PermutationPDB.h.
References swap().
Referenced by MR1PermutationPDB< state, action, environment, bits >::GetAbstractHash().
|
inlinevirtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 32 of file MR1PermutationPDB.h.
|
virtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 119 of file MR1PermutationPDB.h.
References swap().
|
mutableprivate |
Definition at line 40 of file MR1PermutationPDB.h.
|
mutableprivate |
Definition at line 41 of file MR1PermutationPDB.h.
|
mutableprivate |
Definition at line 42 of file MR1PermutationPDB.h.