Class HillClimbing
Defined in File HillClimbing.h
Class Documentation
-
class HillClimbing
Hill Climbing search.
HillClimbing searches for a state using hill climbing, starting from a given seed state.
- Short description
- External documentation
Public Functions
-
inline HillClimbing(base::SpaceInformationPtr si)
Constructor.
-
~HillClimbing() = default
-
bool tryToImprove(const base::GoalRegion &goal, base::State *state, double nearDistance, double *betterGoalDistance = nullptr) const
Try to improve a state (reduce distance to goal). The updates are performed by sampling near the state, within the specified distance. If improvements were found, the function returns true and the better goal distance is optionally returned.
-
inline void setMaxImproveSteps(unsigned int steps)
Set the number of steps to perform.
-
inline unsigned int getMaxImproveSteps() const
Get the number of steps to perform.
-
inline void setValidityCheck(bool valid)
Set the state validity flag; if this is false, states are not checked for validity.
-
inline bool getValidityCheck() const
Get the state validity flag; if this is false, states are not checked for validity.