GClasses
GClasses::GActionPathState Class Referenceabstract

#include <GOptimizer.h>

Public Member Functions

 GActionPathState ()
 
virtual ~GActionPathState ()
 

Protected Member Functions

virtual GActionPathStatecopy ()=0
 Creates a deep copy of this state object. More...
 
virtual double critiquePath (size_t nPathLen, GAction *pLastAction)=0
 Evaluate the error of the given path. Many search algorithms (like GAStarSearch) rely heavily on the heuristic to make the search effective. For example, if you don't penalize redundant paths to the same state, the search space becomes exponential and therefore impossible to search. So a good critic must keep track of which states have already been visited, severely penalize longer paths to a state that has already been visited by a shorter path, and will carefully balance between path length and distance from the goal in producing the error value. More...
 
virtual void performAction (size_t nAction)=0
 Performs the specified action on the state. (so pState holds both input and output data.) This method is protected because you should call GActionPath::doAction, and it will call this method. More...
 

Friends

class GActionPath
 

Constructor & Destructor Documentation

GClasses::GActionPathState::GActionPathState ( )
inline
virtual GClasses::GActionPathState::~GActionPathState ( )
inlinevirtual

Member Function Documentation

virtual GActionPathState* GClasses::GActionPathState::copy ( )
protectedpure virtual

Creates a deep copy of this state object.

virtual double GClasses::GActionPathState::critiquePath ( size_t  nPathLen,
GAction *  pLastAction 
)
protectedpure virtual

Evaluate the error of the given path. Many search algorithms (like GAStarSearch) rely heavily on the heuristic to make the search effective. For example, if you don't penalize redundant paths to the same state, the search space becomes exponential and therefore impossible to search. So a good critic must keep track of which states have already been visited, severely penalize longer paths to a state that has already been visited by a shorter path, and will carefully balance between path length and distance from the goal in producing the error value.

virtual void GClasses::GActionPathState::performAction ( size_t  nAction)
protectedpure virtual

Performs the specified action on the state. (so pState holds both input and output data.) This method is protected because you should call GActionPath::doAction, and it will call this method.

Friends And Related Function Documentation

friend class GActionPath
friend