GT RoboCup SSL
Soccer software, robot firmware
Gradient1DConfig Class Reference

Config data for a Gradient Ascent 1D optimizer Can be intitialized through the constructor or through obj.attribute style initialization. More...

Public Member Functions

 Gradient1DConfig ()
 Creates a Gradient Ascent 1D config Default args: dxError, maxXMovement, temperatureDescent temperatureMin, maxIterations, maxValue maxThresh.
 
 Gradient1DConfig (std::function< std::tuple< float, float >(float)> *f, float startX, float prevX, float dxError=0.1, float maxXMovement=0.02, float temperatureDescent=0.5, float temperatureMin=0.01, int maxIterations=100, float maxValue=0, float maxThresh=0)
 Creates a Gradient Ascent 1D config. More...
 

Public Attributes

std::function< std::tuple< float, float >float)> * f
 
float startX
 
float prevX
 
float dxError
 
float maxXMovement
 
float temperatureDescent
 
float temperatureMin
 
int maxIterations
 
float maxValue
 
float maxThresh
 

Detailed Description

Config data for a Gradient Ascent 1D optimizer Can be intitialized through the constructor or through obj.attribute style initialization.

Constructor & Destructor Documentation

◆ Gradient1DConfig()

Gradient1DConfig::Gradient1DConfig ( std::function< std::tuple< float, float >(float)> *  f,
float  startX,
float  prevX,
float  dxError = 0.1,
float  maxXMovement = 0.02,
float  temperatureDescent = 0.5,
float  temperatureMin = 0.01,
int  maxIterations = 100,
float  maxValue = 0,
float  maxThresh = 0 
)
inline

Creates a Gradient Ascent 1D config.

Parameters
f,stdfunction pointer which returns a tuple with <F(X), F'(X)>
startX,Xvalue in which to start from
prevX,Xvalue near startX which is not startX
dxError,thresholdof F'(X) in reference to zero to exit
maxXMovement,maxdistance to go when stepping to either side in reference to current x
temperatureDescent,factorby which to decrease the temperature each time we pass a discontinuity in the F'(X) space
temperatureMin,minimumtemperature to hit before exiting (Directly related to the X resolution)
maxIterations,Maximumnumber of iterations to reach end
maxValue,usedto leave function early when max value is already know (but corrseponding X is needed)
maxThresh,minimumdistance to max before exit
Note
By default, the max value exit capabilities are not used
Only f, args, startX, and prevX are required

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