GClasses

GClasses::GActionPathState Class Reference

#include <GOptimizer.h>

List of all members.

Public Member Functions

 GActionPathState ()
virtual ~GActionPathState ()

Protected Member Functions

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.
virtual GActionPathStatecopy ()=0
 Creates a deep copy of this state object.
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.

Friends

class GActionPath

Constructor & Destructor Documentation

GClasses::GActionPathState::GActionPathState ( ) [inline]
virtual GClasses::GActionPathState::~GActionPathState ( ) [inline, virtual]

Member Function Documentation

virtual GActionPathState* GClasses::GActionPathState::copy ( ) [protected, pure virtual]

Creates a deep copy of this state object.

virtual double GClasses::GActionPathState::critiquePath ( size_t  nPathLen,
GAction *  pLastAction 
) [protected, pure 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) [protected, pure 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]