HOG2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SFBDPancakeEnvironment Class Reference

#include <SFBDPancakePuzzle.h>

Inheritance diagram for SFBDPancakeEnvironment:
Inheritance graph
[legend]
Collaboration diagram for SFBDPancakeEnvironment:
Collaboration graph
[legend]

Public Member Functions

 SFBDPancakeEnvironment (int theSize)
 
virtual ~SFBDPancakeEnvironment ()
 
virtual void GetSuccessors (const pancakeStatePair &stateID, std::vector< pancakeStatePair > &neighbors) const
 
virtual void GetActions (const pancakeStatePair &stateID, std::vector< pancakeMovePair > &actions) const
 
virtual pancakeMovePair GetAction (const pancakeStatePair &s1, const pancakeStatePair &s2) const
 
virtual void ApplyAction (pancakeStatePair &s, pancakeMovePair a) const
 
virtual bool InvertAction (pancakeMovePair &a) const
 
OccupancyInterface< pancakeStatePair, pancakeMovePair > * GetOccupancyInfo ()
 
virtual double HCost (const pancakeStatePair &state1, const pancakeStatePair &state2) const
 Heuristic value between two arbitrary nodes. More...
 
virtual double GCost (const pancakeStatePair &state1, const pancakeStatePair &state2) const
 
virtual double GCost (const pancakeStatePair &state1, const pancakeMovePair &state2) const
 
virtual bool GoalTest (const pancakeStatePair &state, const pancakeStatePair &goal) const
 
virtual uint64_t GetStateHash (const pancakeStatePair &state) const
 
virtual uint64_t GetActionHash (pancakeMovePair act) const
 
virtual void OpenGLDraw () const
 
virtual void OpenGLDraw (const pancakeStatePair &s) const
 
virtual void OpenGLDraw (const pancakeStatePair &s, const pancakeMovePair &gm) const
 
virtual void OpenGLDraw (const pancakeStatePair &s, const pancakeStatePair &, float) const
 Draw the transition at some percentage 0...1 between two states. More...
 
virtual void StoreGoal (pancakeStatePair &)
 Stores the goal for use by single-state HCost. More...
 
virtual void ClearGoal ()
 Clears the goal from memory. More...
 
virtual bool IsGoalStored () const
 
virtual double HCost (const pancakeStatePair &) const
 Heuristic value between node and the stored goal. More...
 
virtual bool GoalTest (const pancakeStatePair &) const
 Goal Test if the goal is stored. More...
 
- Public Member Functions inherited from SearchEnvironment< pancakeStatePair, pancakeMovePair >
virtual ~SearchEnvironment ()
 
virtual int GetNumSuccessors (const pancakeStatePair &stateID) const
 
virtual void UndoAction (pancakeStatePair &s, pancakeMovePair a) const
 
virtual void GetNextState (const pancakeStatePair &s1, pancakeMovePair a, pancakeStatePair &s2) const
 
virtual bool IsGoalStored () const
 Returns true if the goal is stored and false otherwise. More...
 
virtual double HCost (const pancakeStatePair &node1, const pancakeStatePair &node2, double parentHCost) const
 
virtual uint64_t GetMaxHash () const
 
virtual void GetStateFromHash (uint64_t parent, pancakeStatePair &s) const
 
virtual double GetPathLength (std::vector< pancakeStatePair > &neighbors)
 
virtual double GetPathLength (const pancakeStatePair &start, std::vector< pancakeMovePair > &neighbors)
 
virtual void SetOccupancyInfo (OccupancyInterface< pancakeStatePair, pancakeMovePair > *)
 
virtual void OpenGLDraw () const
 
virtual void GLLabelState (const pancakeStatePair &, const char *) const
 
virtual void GLDrawLine (const pancakeStatePair &x, const pancakeStatePair &y) const
 
virtual void GLDrawPath (const std::vector< pancakeStatePair > &x) const
 
virtual void SetColor (const rgbColor &r) const
 
virtual void SetColor (GLfloat rr, GLfloat g, GLfloat b, GLfloat t=1.0) const
 
virtual void GetColor (GLfloat &rr, GLfloat &g, GLfloat &b, GLfloat &t) const
 
virtual rgbColor GetColor () const
 
virtual void Draw (Graphics::Display &display) const
 
virtual void Draw (Graphics::Display &display, const pancakeStatePair &) const
 
virtual void DrawLine (Graphics::Display &display, const pancakeStatePair &x, const pancakeStatePair &y, float width=1.0) const
 
- Public Member Functions inherited from Heuristic< pancakeStatePair >
 Heuristic ()
 
virtual ~Heuristic ()
 

Protected Member Functions

int MeasureLocalHeuristic (const BurnedPancakePuzzleState &a, const BurnedPancakePuzzleState &b) const
 

Protected Attributes

BurnedPancakePuzzlepan
 
- Protected Attributes inherited from SearchEnvironment< pancakeStatePair, pancakeMovePair >
bool bValidSearchGoal
 
pancakeStatePair searchGoal
 
rgbColor color
 
GLfloat transparency
 

Additional Inherited Members

- Public Attributes inherited from Heuristic< pancakeStatePair >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 

Detailed Description

Definition at line 53 of file SFBDPancakePuzzle.h.

Constructor & Destructor Documentation

◆ SFBDPancakeEnvironment()

SFBDPancakeEnvironment::SFBDPancakeEnvironment ( int  theSize)

Definition at line 12 of file SFBDPancakePuzzle.cpp.

References pan.

◆ ~SFBDPancakeEnvironment()

SFBDPancakeEnvironment::~SFBDPancakeEnvironment ( )
virtual

Definition at line 17 of file SFBDPancakePuzzle.cpp.

References pan.

Member Function Documentation

◆ ApplyAction()

void SFBDPancakeEnvironment::ApplyAction ( pancakeStatePair s,
pancakeMovePair  a 
) const
virtual

◆ ClearGoal()

virtual void SFBDPancakeEnvironment::ClearGoal ( )
inlinevirtual

Clears the goal from memory.

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 77 of file SFBDPancakePuzzle.h.

◆ GCost() [1/2]

double SFBDPancakeEnvironment::GCost ( const pancakeStatePair state1,
const pancakeMovePair state2 
) const
virtual

◆ GCost() [2/2]

double SFBDPancakeEnvironment::GCost ( const pancakeStatePair state1,
const pancakeStatePair state2 
) const
virtual

◆ GetAction()

pancakeMovePair SFBDPancakeEnvironment::GetAction ( const pancakeStatePair s1,
const pancakeStatePair s2 
) const
virtual

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 139 of file SFBDPancakePuzzle.cpp.

◆ GetActionHash()

uint64_t SFBDPancakeEnvironment::GetActionHash ( pancakeMovePair  act) const
virtual

◆ GetActions()

void SFBDPancakeEnvironment::GetActions ( const pancakeStatePair stateID,
std::vector< pancakeMovePair > &  actions 
) const
virtual

◆ GetOccupancyInfo()

OccupancyInterface<pancakeStatePair, pancakeMovePair>* SFBDPancakeEnvironment::GetOccupancyInfo ( )
inlinevirtual

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 64 of file SFBDPancakePuzzle.h.

◆ GetStateHash()

uint64_t SFBDPancakeEnvironment::GetStateHash ( const pancakeStatePair state) const
virtual

◆ GetSuccessors()

void SFBDPancakeEnvironment::GetSuccessors ( const pancakeStatePair stateID,
std::vector< pancakeStatePair > &  neighbors 
) const
virtual

◆ GoalTest() [1/2]

virtual bool SFBDPancakeEnvironment::GoalTest ( const pancakeStatePair node) const
inlinevirtual

Goal Test if the goal is stored.

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 84 of file SFBDPancakePuzzle.h.

◆ GoalTest() [2/2]

bool SFBDPancakeEnvironment::GoalTest ( const pancakeStatePair state,
const pancakeStatePair goal 
) const
virtual

◆ HCost() [1/2]

virtual double SFBDPancakeEnvironment::HCost ( const pancakeStatePair node) const
inlinevirtual

Heuristic value between node and the stored goal.

Asserts that the goal is stored

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 80 of file SFBDPancakePuzzle.h.

◆ HCost() [2/2]

double SFBDPancakeEnvironment::HCost ( const pancakeStatePair node1,
const pancakeStatePair node2 
) const
virtual

◆ InvertAction()

bool SFBDPancakeEnvironment::InvertAction ( pancakeMovePair a) const
virtual

◆ IsGoalStored()

virtual bool SFBDPancakeEnvironment::IsGoalStored ( ) const
inlinevirtual

Definition at line 78 of file SFBDPancakePuzzle.h.

◆ MeasureLocalHeuristic()

int SFBDPancakeEnvironment::MeasureLocalHeuristic ( const BurnedPancakePuzzleState a,
const BurnedPancakePuzzleState b 
) const
protected

◆ OpenGLDraw() [1/4]

void SFBDPancakeEnvironment::OpenGLDraw ( ) const
virtual

Definition at line 188 of file SFBDPancakePuzzle.cpp.

◆ OpenGLDraw() [2/4]

void SFBDPancakeEnvironment::OpenGLDraw ( const pancakeStatePair s) const
virtual

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 192 of file SFBDPancakePuzzle.cpp.

◆ OpenGLDraw() [3/4]

void SFBDPancakeEnvironment::OpenGLDraw ( const pancakeStatePair s,
const pancakeMovePair gm 
) const
virtual

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 196 of file SFBDPancakePuzzle.cpp.

◆ OpenGLDraw() [4/4]

virtual void SFBDPancakeEnvironment::OpenGLDraw ( const pancakeStatePair ,
const pancakeStatePair ,
float   
) const
inlinevirtual

Draw the transition at some percentage 0...1 between two states.

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 74 of file SFBDPancakePuzzle.h.

References OpenGLDraw().

Referenced by OpenGLDraw().

◆ StoreGoal()

virtual void SFBDPancakeEnvironment::StoreGoal ( pancakeStatePair s)
inlinevirtual

Stores the goal for use by single-state HCost.

Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.

Definition at line 76 of file SFBDPancakePuzzle.h.

Member Data Documentation

◆ pan

BurnedPancakePuzzle* SFBDPancakeEnvironment::pan
protected

The documentation for this class was generated from the following files: