HOG2
|
#include <RubiksCubeCorners.h>
Public Member Functions | |
RubikCornerPDB (RubiksCorner *e, const RubiksCornerState &s, std::vector< int > &distinctCorners) | |
uint64_t | GetPDBSize () const |
uint64_t | GetPDBHash (const RubiksCornerState &s, int threadID=0) const |
virtual uint64_t | GetAbstractHash (const RubiksCornerState &s, int threadID=0) const |
void | GetStateFromPDBHash (uint64_t hash, RubiksCornerState &s, int threadID=0) const |
RubiksCornerState | GetStateFromAbstractState (RubiksCornerState &s) const |
virtual bool | Load (const char *prefix) |
virtual void | Save (const char *prefix) |
virtual bool | Load (FILE *f) |
virtual void | Save (FILE *f) |
virtual std::string | GetFileName (const char *prefix) |
Public Member Functions inherited from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 > | |
PDBHeuristic (RubiksCorner *e) | |
virtual | ~PDBHeuristic () |
void | SetGoal (const RubiksCornerState &goal) |
void | SetGoal (const std::vector< RubiksCornerState > &goals) |
virtual double | HCost (const RubiksCornerState &a, const RubiksCornerState &b) const |
virtual uint64_t | GetPDBSize () const=0 |
void | ShuffleValues () |
This methods randomizes the entries in the PDB. More... | |
void | BuildPDB (const RubiksCornerState &goal) |
void | BuildPDB (const RubiksCornerState &goal, int numThreads) |
void | BuildPDBForward (const RubiksCornerState &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBForward (const std::vector< RubiksCornerState > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBBackward (const RubiksCornerState &goal, int numThreads) |
void | BuildPDBForwardBackward (const RubiksCornerState &goal, int numThreads) |
void | BuildAdditivePDB (const RubiksCornerState &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< RubiksCornerState > *h, RubiksCornerState 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< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 5 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 3 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 2 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 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< RubiksCornerState > | |
Heuristic () | |
virtual | ~Heuristic () |
Static Public Member Functions | |
static uint64_t | GetStateSpaceSize () |
static uint64_t | GetStateHash (const RubiksCornerState &s) |
static void | GetStateFromHash (RubiksCornerState &s, uint64_t hash) |
Private Member Functions | |
uint64_t | Factorial (int val) const |
uint64_t | FactorialUpperK (int n, int k) const |
Private Attributes | |
std::vector< int > | corners |
size_t | puzzleSize |
uint64_t | pdbSize |
MR1KPermutation | mr1 |
Additional Inherited Members | |
Public Attributes inherited from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 > | |
NBitArray< pdbBits > | PDB |
int | vrcValues [1<< pdbBits] |
PDBLookupType | type |
uint64_t | compressionValue |
RubiksCorner * | env |
std::vector< RubiksCornerState > | goalState |
Public Attributes inherited from Heuristic< RubiksCornerState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Definition at line 194 of file RubiksCubeCorners.h.
RubikCornerPDB::RubikCornerPDB | ( | RubiksCorner * | e, |
const RubiksCornerState & | s, | ||
std::vector< int > & | distinctCorners | ||
) |
Definition at line 1183 of file RubiksCubeCorners.cpp.
References PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >::SetGoal().
|
private |
Definition at line 1450 of file RubiksCubeCorners.cpp.
|
private |
Definition at line 1461 of file RubiksCubeCorners.cpp.
Referenced by GetPDBHash(), and GetStateFromPDBHash().
|
inlinevirtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 202 of file RubiksCubeCorners.h.
References GetPDBHash().
|
virtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1417 of file RubiksCubeCorners.cpp.
References corners, and PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >::goalState.
Referenced by RubikPDB::GetFileName(), Load(), and Save().
|
virtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1218 of file RubiksCubeCorners.cpp.
References corners, FactorialUpperK(), RubiksCornerStateArray::GetCubeInLoc(), RubiksCornerStateArray::GetCubeOrientation(), min(), mr1, and MR1KPermutation::Rank().
Referenced by GetAbstractHash(), and RubikPDB::GetPDBHash().
uint64_t RubikCornerPDB::GetPDBSize | ( | ) | const |
Definition at line 1207 of file RubiksCubeCorners.cpp.
References corners.
Referenced by RubikPDB::GetPDBHash(), RubikPDB::GetPDBSize(), and RubikPDB::GetStateFromPDBHash().
|
inlinevirtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 204 of file RubiksCubeCorners.h.
|
static |
Definition at line 1201 of file RubiksCubeCorners.cpp.
References RubiksCorner::GetStateFromHash().
Referenced by RubikPDB::GetStateFromHash().
|
virtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1283 of file RubiksCubeCorners.cpp.
References corners, FactorialUpperK(), min(), mr1, RubiksCornerStateArray::SetCubeInLoc(), RubiksCornerStateArray::SetCubeOrientation(), and MR1KPermutation::Unrank().
Referenced by RubikPDB::GetStateFromPDBHash().
|
static |
Definition at line 1195 of file RubiksCubeCorners.cpp.
References RubiksCorner::GetStateHash().
|
static |
Definition at line 1189 of file RubiksCubeCorners.cpp.
|
virtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1365 of file RubiksCubeCorners.cpp.
References GetFileName(), and Save().
Referenced by RubikPDB::Load().
|
virtual |
Reimplemented from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1390 of file RubiksCubeCorners.cpp.
References corners, pdbSize, and puzzleSize.
|
virtual |
Implements PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1378 of file RubiksCubeCorners.cpp.
References GetFileName().
Referenced by Load(), and RubikPDB::Save().
|
virtual |
Reimplemented from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >.
Definition at line 1407 of file RubiksCubeCorners.cpp.
References corners, pdbSize, puzzleSize, and PDBHeuristic< abstractState, abstractAction, abstractEnvironment, state, pdbBits >::Save().
|
private |
Definition at line 214 of file RubiksCubeCorners.h.
Referenced by GetFileName(), GetPDBHash(), GetPDBSize(), GetStateFromPDBHash(), Load(), and Save().
|
private |
Definition at line 217 of file RubiksCubeCorners.h.
Referenced by GetPDBHash(), and GetStateFromPDBHash().
|
private |
Definition at line 216 of file RubiksCubeCorners.h.
|
private |
Definition at line 215 of file RubiksCubeCorners.h.