Class GeneticSearch
Defined in File GeneticSearch.h
Nested Relationships
Nested Types
Class Documentation
-
class GeneticSearch
Genetic Algorithm for searching valid states.
GeneticSearch does search for valid states using a genetic algorithm
- Short description
- External documentation
Public Functions
-
GeneticSearch(const base::SpaceInformationPtr &si)
Construct an instance of a genetic algorithm for inverse kinematics given the space information to search within.
-
~GeneticSearch()
-
bool solve(double solveTime, const base::GoalRegion &goal, base::State *result, const std::vector<base::State*> &hint = std::vector<base::State*>())
Find a state that fits the request.
-
inline void setMaxImproveSteps(unsigned int maxSteps)
Set the number of steps to perform when using hill climbing to improve an individual in the population.
-
inline unsigned int getMaxImproveSteps() const
Get the number of steps to perform when using hill climbing to improve an individual in the population.
-
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.
-
inline void setTryImprove(bool flag)
Set the flag that determines whether improvements using hill climbing should be attempted for solutions generated by the genetic algorithm.
-
inline bool getTryImprove() const
Returns true if improvements using hill climbing should be attempted for solutions generated by the genetic algorithm. Returns false otherwise.
-
inline void setPoolSize(unsigned int size)
Set the number of individuals in the population.
-
inline unsigned int getPoolSize() const
Get the number number of individuals in the population.
-
inline void setPoolMutationSize(unsigned int size)
Set the number of individuals to mutate at each generation.
-
inline unsigned int getPoolMutationSize() const
Get the number of individuals that are mutated at each generation.
-
inline void setPoolRandomSize(unsigned int size)
Set the number of individuals to randomly sample at each generation.
-
inline unsigned int getPoolRandomSize() const
Get the number of individuals to randomly sample at each generation.
-
inline void setRange(double distance)
Set the range (distance) to be used when sampling around a state.
-
inline double getRange() const
Get the range GeneticSearch is using.
-
void clear()
Clear the pool of samples.