HOG2
|
#include <RubiksCube.h>
Public Member Functions | |
RubikPDB (RubiksCube *e, const RubiksState &s, std::vector< int > distinctEdges, std::vector< int > distinctCorners) | |
uint64_t | GetStateHash (const RubiksState &s) const |
void | GetStateFromHash (RubiksState &s, uint64_t hash) const |
uint64_t | GetPDBSize () const |
uint64_t | GetPDBHash (const RubiksState &s, int threadID=0) const |
virtual uint64_t | GetAbstractHash (const RubiksState &s, int threadID=0) const |
void | GetStateFromPDBHash (uint64_t hash, RubiksState &s, int threadID=0) const |
RubiksState | GetStateFromAbstractState (RubiksState &s) const |
void | OpenGLDraw () const |
bool | Load (const char *prefix) |
void | Save (const char *prefix) |
bool | Load (FILE *f) |
void | Save (FILE *f) |
std::string | GetFileName (const char *prefix) |
Public Member Functions inherited from PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 > | |
PDBHeuristic (RubiksCube *e) | |
virtual | ~PDBHeuristic () |
void | SetGoal (const RubiksState &goal) |
void | SetGoal (const std::vector< RubiksState > &goals) |
virtual double | HCost (const RubiksState &a, const RubiksState &b) const |
virtual uint64_t | GetPDBSize () const=0 |
void | ShuffleValues () |
This methods randomizes the entries in the PDB. More... | |
void | BuildPDB (const RubiksState &goal) |
void | BuildPDB (const RubiksState &goal, int numThreads) |
void | BuildPDBForward (const RubiksState &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBForward (const std::vector< RubiksState > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBBackward (const RubiksState &goal, int numThreads) |
void | BuildPDBForwardBackward (const RubiksState &goal, int numThreads) |
void | BuildAdditivePDB (const RubiksState &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< RubiksState > *h, RubiksState 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< RubiksState, RubiksAction, RubiksCube, RubiksState, 5 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 3 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 2 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 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< RubiksState > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Attributes | |
RubikEdgePDB | ePDB |
RubikCornerPDB | cPDB |
std::vector< int > | edges |
std::vector< int > | corners |
Additional Inherited Members | |
Public Attributes inherited from PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 > | |
NBitArray< pdbBits > | PDB |
int | vrcValues [1<< pdbBits] |
PDBLookupType | type |
uint64_t | compressionValue |
RubiksCube * | env |
std::vector< RubiksState > | goalState |
Public Attributes inherited from Heuristic< RubiksState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Definition at line 219 of file RubiksCube.h.
RubikPDB::RubikPDB | ( | RubiksCube * | e, |
const RubiksState & | s, | ||
std::vector< int > | distinctEdges, | ||
std::vector< int > | distinctCorners | ||
) |
Definition at line 824 of file RubiksCube.cpp.
References PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >::SetGoal().
|
inlinevirtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 228 of file RubiksCube.h.
References GetPDBHash().
|
virtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 932 of file RubiksCube.cpp.
References cPDB, ePDB, RubikCornerPDB::GetFileName(), and RubikEdgePDB::GetFileName().
|
virtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 849 of file RubiksCube.cpp.
References RubiksState::corner, cPDB, RubiksState::edge, ePDB, RubikCornerPDB::GetPDBHash(), RubikEdgePDB::GetPDBHash(), and RubikCornerPDB::GetPDBSize().
Referenced by GetAbstractHash().
uint64_t RubikPDB::GetPDBSize | ( | ) | const |
Definition at line 844 of file RubiksCube.cpp.
References cPDB, ePDB, RubikCornerPDB::GetPDBSize(), and RubikEdgePDB::GetPDBSize().
|
inlinevirtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 230 of file RubiksCube.h.
void RubikPDB::GetStateFromHash | ( | RubiksState & | s, |
uint64_t | hash | ||
) | const |
Definition at line 837 of file RubiksCube.cpp.
References RubiksState::corner, cPDB, RubiksState::edge, ePDB, RubikCornerPDB::GetStateFromHash(), and RubikEdgePDB::GetStateFromHash().
|
virtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 854 of file RubiksCube.cpp.
References RubiksState::corner, cPDB, RubiksState::edge, ePDB, RubikCornerPDB::GetPDBSize(), RubikCornerPDB::GetStateFromPDBHash(), and RubikEdgePDB::GetStateFromPDBHash().
Referenced by OpenGLDraw().
uint64_t RubikPDB::GetStateHash | ( | const RubiksState & | s | ) | const |
Definition at line 831 of file RubiksCube.cpp.
|
virtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 871 of file RubiksCube.cpp.
References GetFileName().
|
virtual |
Reimplemented from PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 896 of file RubiksCube.cpp.
References corners, cPDB, edges, ePDB, RubikCornerPDB::Load(), and RubikEdgePDB::Load().
|
inline |
Definition at line 232 of file RubiksCube.h.
References PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >::env, GetStateFromPDBHash(), and RubiksCube::OpenGLDraw().
|
virtual |
Implements PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 888 of file RubiksCube.cpp.
References GetFileName().
|
virtual |
Reimplemented from PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >.
Definition at line 919 of file RubiksCube.cpp.
References corners, cPDB, edges, ePDB, PDBHeuristic< abstractState, abstractAction, abstractEnvironment, state, pdbBits >::Save(), RubikCornerPDB::Save(), and RubikEdgePDB::Save().
|
private |
Definition at line 249 of file RubiksCube.h.
|
private |
Definition at line 247 of file RubiksCube.h.
Referenced by GetFileName(), GetPDBHash(), GetPDBSize(), GetStateFromHash(), GetStateFromPDBHash(), Load(), and Save().
|
private |
Definition at line 248 of file RubiksCube.h.
|
private |
Definition at line 246 of file RubiksCube.h.
Referenced by GetFileName(), GetPDBHash(), GetPDBSize(), GetStateFromHash(), GetStateFromPDBHash(), Load(), and Save().