HOG2
Public Member Functions | Protected Attributes | List of all members
SearchEnvironment< state, action > Class Template Referenceabstract

#include <SearchEnvironment.h>

Inheritance diagram for SearchEnvironment< state, action >:
Inheritance graph
[legend]
Collaboration diagram for SearchEnvironment< state, action >:
Collaboration graph
[legend]

Public Member Functions

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

Protected Attributes

bool bValidSearchGoal
 
state searchGoal
 
rgbColor color
 
GLfloat transparency
 

Additional Inherited Members

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

Detailed Description

template<class state, class action>
class SearchEnvironment< state, action >

Definition at line 30 of file SearchEnvironment.h.

Constructor & Destructor Documentation

◆ ~SearchEnvironment()

template<class state , class action >
virtual SearchEnvironment< state, action >::~SearchEnvironment ( )
inlinevirtual

Definition at line 32 of file SearchEnvironment.h.

Member Function Documentation

◆ ApplyAction()

template<class state , class action >
virtual void SearchEnvironment< state, action >::ApplyAction ( state &  s,
action  a 
) const
pure virtual

◆ ClearGoal()

template<class state , class action >
virtual void SearchEnvironment< state, action >::ClearGoal ( )
inlinevirtual

◆ Draw() [1/2]

template<class state , class action >
virtual void SearchEnvironment< state, action >::Draw ( Graphics::Display display) const
inlinevirtual

◆ Draw() [2/2]

template<class state , class action >
virtual void SearchEnvironment< state, action >::Draw ( Graphics::Display display,
const state &   
) const
inlinevirtual

◆ DrawLine()

template<class state , class action >
virtual void SearchEnvironment< state, action >::DrawLine ( Graphics::Display display,
const state &  x,
const state &  y,
float  width = 1.0 
) const
inlinevirtual

Reimplemented in Racetrack, NaryTree, and Map2DSectorAbstraction.

Definition at line 109 of file SearchEnvironment.h.

◆ GCost() [1/2]

template<class state , class action >
virtual double SearchEnvironment< state, action >::GCost ( const state &  node,
const action &  act 
) const
pure virtual

◆ GCost() [2/2]

template<class state , class action >
virtual double SearchEnvironment< state, action >::GCost ( const state &  node1,
const state &  node2 
) const
pure virtual

◆ GetAction()

template<class state , class action >
action SearchEnvironment< state, action >::GetAction ( const state &  s1,
const state &  s2 
) const
virtual

◆ GetActionHash()

template<class state , class action >
virtual uint64_t SearchEnvironment< state, action >::GetActionHash ( action  act) const
pure virtual

◆ GetActions()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GetActions ( const state &  nodeID,
std::vector< action > &  actions 
) const
pure virtual

◆ GetColor() [1/2]

template<class state , class action >
virtual rgbColor SearchEnvironment< state, action >::GetColor ( ) const
inlinevirtual

Definition at line 105 of file SearchEnvironment.h.

◆ GetColor() [2/2]

template<class state , class action >
virtual void SearchEnvironment< state, action >::GetColor ( GLfloat &  rr,
GLfloat &  g,
GLfloat &  b,
GLfloat &  t 
) const
inlinevirtual

Reimplemented in RoadMap.

Definition at line 104 of file SearchEnvironment.h.

Referenced by RoadMap::GetColor().

◆ GetMaxHash()

template<class state , class action >
virtual uint64_t SearchEnvironment< state, action >::GetMaxHash ( ) const
inlinevirtual

Reimplemented in TOH< patternDisks >.

Definition at line 80 of file SearchEnvironment.h.

◆ GetNextState()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GetNextState ( const state &  s1,
action  a,
state &  s2 
) const
inlinevirtual

◆ GetNumSuccessors()

template<class state , class action >
virtual int SearchEnvironment< state, action >::GetNumSuccessors ( const state &  stateID) const
inlinevirtual

Reimplemented in Racetrack, and GraphEnvironment.

Definition at line 35 of file SearchEnvironment.h.

Referenced by SFIDAStar< state, action >::ShouldSearchForward1().

◆ GetOccupancyInfo()

template<class state , class action >
virtual OccupancyInterface<state,action>* SearchEnvironment< state, action >::GetOccupancyInfo ( )
inlinevirtual

◆ GetPathLength() [1/2]

template<class state , class action >
double SearchEnvironment< state, action >::GetPathLength ( const state &  start,
std::vector< action > &  neighbors 
)
virtual

Definition at line 155 of file SearchEnvironment.h.

◆ GetPathLength() [2/2]

template<class state , class action >
double SearchEnvironment< state, action >::GetPathLength ( std::vector< state > &  neighbors)
virtual

◆ GetStateFromHash()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GetStateFromHash ( uint64_t  parent,
state &  s 
) const
inlinevirtual

◆ GetStateHash()

template<class state , class action >
virtual uint64_t SearchEnvironment< state, action >::GetStateHash ( const state &  node) const
pure virtual

◆ GetSuccessors()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GetSuccessors ( const state &  nodeID,
std::vector< state > &  neighbors 
) const
pure virtual

◆ GLDrawLine()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GLDrawLine ( const state &  x,
const state &  y 
) const
inlinevirtual

◆ GLDrawPath()

template<class state , class action >
void SearchEnvironment< state, action >::GLDrawPath ( const std::vector< state > &  x) const
virtual

Reimplemented in RoadMap.

Definition at line 170 of file SearchEnvironment.h.

Referenced by RoadMap::GLDrawPath().

◆ GLLabelState()

template<class state , class action >
virtual void SearchEnvironment< state, action >::GLLabelState ( const state &  ,
const char *   
) const
inlinevirtual

◆ GoalTest() [1/2]

template<class state , class action >
virtual bool SearchEnvironment< state, action >::GoalTest ( const state &  node) const
inlinevirtual

◆ GoalTest() [2/2]

template<class state , class action >
virtual bool SearchEnvironment< state, action >::GoalTest ( const state &  node,
const state &  goal 
) const
pure virtual

◆ HCost() [1/3]

template<class state , class action >
virtual double SearchEnvironment< state, action >::HCost ( const state &  node) const
inlinevirtual

◆ HCost() [2/3]

template<class state , class action >
virtual double SearchEnvironment< state, action >::HCost ( const state &  node1,
const state &  node2 
) const
pure virtual

◆ HCost() [3/3]

template<class state , class action >
virtual double SearchEnvironment< state, action >::HCost ( const state &  node1,
const state &  node2,
double  parentHCost 
) const
inlinevirtual

Reimplemented in RubiksCube, and RC.

Definition at line 65 of file SearchEnvironment.h.

◆ InvertAction()

template<class state , class action >
virtual bool SearchEnvironment< state, action >::InvertAction ( action &  a) const
pure virtual

◆ IsGoalStored()

template<class state , class action >
virtual bool SearchEnvironment< state, action >::IsGoalStored ( ) const
inlinevirtual

Returns true if the goal is stored and false otherwise.

Definition at line 60 of file SearchEnvironment.h.

◆ OpenGLDraw() [1/4]

template<class state , class action >
virtual void SearchEnvironment< state, action >::OpenGLDraw ( ) const
inlinevirtual

Reimplemented in TOH< patternDisks >.

Definition at line 94 of file SearchEnvironment.h.

◆ OpenGLDraw() [2/4]

template<class state , class action >
virtual void SearchEnvironment< state, action >::OpenGLDraw ( const state &  ) const
inlinevirtual

◆ OpenGLDraw() [3/4]

template<class state , class action >
virtual void SearchEnvironment< state, action >::OpenGLDraw ( const state &  ,
const action &   
) const
inlinevirtual

◆ OpenGLDraw() [4/4]

template<class state , class action >
virtual void SearchEnvironment< state, action >::OpenGLDraw ( const state &  ,
const state &  ,
float   
) const
inlinevirtual

◆ SetColor() [1/2]

template<class state , class action >
virtual void SearchEnvironment< state, action >::SetColor ( const rgbColor r) const
inlinevirtual

◆ SetColor() [2/2]

template<class state , class action >
virtual void SearchEnvironment< state, action >::SetColor ( GLfloat  rr,
GLfloat  g,
GLfloat  b,
GLfloat  t = 1.0 
) const
inlinevirtual

Reimplemented in RoadMap.

Definition at line 103 of file SearchEnvironment.h.

◆ SetOccupancyInfo()

template<class state , class action >
virtual void SearchEnvironment< state, action >::SetOccupancyInfo ( OccupancyInterface< state, action > *  )
inlinevirtual

Definition at line 91 of file SearchEnvironment.h.

◆ StoreGoal()

template<class state , class action >
virtual void SearchEnvironment< state, action >::StoreGoal ( state &  s)
inlinevirtual

◆ UndoAction()

template<class state , class action >
virtual void SearchEnvironment< state, action >::UndoAction ( state &  s,
action  a 
) const
inlinevirtual

Member Data Documentation

◆ bValidSearchGoal

template<class state , class action >
bool SearchEnvironment< state, action >::bValidSearchGoal
protected

◆ color

template<class state , class action >
rgbColor SearchEnvironment< state, action >::color
mutableprotected

◆ searchGoal

template<class state , class action >
state SearchEnvironment< state, action >::searchGoal
protected

◆ transparency

template<class state , class action >
GLfloat SearchEnvironment< state, action >::transparency
mutableprotected

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