mpcrl.optim.base_optimizer.BaseOptimizer#

class mpcrl.optim.base_optimizer.BaseOptimizer(max_percentage_update=inf)[source]#

Bases: object

Base class for optimization algorithms.

This class contains useful methods for, e.g., initializing the optimizer, retrieving bounds on the learnable parameters, etc.

Parameters:
max_percentage_updatefloat, optional

A positive float that specifies the maximum percentage change the learnable parameters can experience in each update. For example, max_percentage_update=0.5 means that the parameters can be updated by up to 50% of their current value. By default, it is set to +inf.

Methods

set_learnable_parameters(pars)

Makes the optimization class aware of the dictionary of the learnable parameters whose values are to be updated.

set_learnable_parameters(pars)[source]#

Makes the optimization class aware of the dictionary of the learnable parameters whose values are to be updated.

Parameters:
pars:class`mpcrl.LearnableParametersDict`

The dictionary of the learnable parameters.

Return type:

None

Examples using mpcrl.optim.base_optimizer.BaseOptimizer#

Off-policy Q-learning

Off-policy Q-learning

On-policy Deterministic Policy Gradient

On-policy Deterministic Policy Gradient

On-policy Q-learning

On-policy Q-learning