20 "Evaluates a scaled absolute difference reward function for a process " 21 "which is controlled by a Deep Reinforcement Learning based surrogate.");
23 params.
addRequiredParam<FunctionName>(
"design_function",
"The desired value to reach.");
25 "observed_value",
"The name of the Postprocessor that contains the observed value.");
27 params.
addParam<
Real>(
"c1", 10,
"1st coefficient in the reward function.");
28 params.
addParam<
Real>(
"c2", 1,
"2nd coefficient in the reward function.");
37 _design_function(getFunction(
"design_function")),
38 _observed_value(getPostprocessorValueByName(getParam<PostprocessorName>(
"observed_value"))),
39 _c1(getParam<
Real>(
"c1")),
40 _c2(getParam<
Real>(
"c2"))
ScaledAbsDifferenceDRLRewardFunction(const InputParameters ¶meters)
DualNumber< Real, DNDerivativeType, true > ADReal
const PostprocessorValue & _observed_value
Postprocessor containing the observed value.
A simple reward function which uses c1*|x-x_target|+c2.
const Real & _c1
Coefficients for the reward function.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
registerMooseObject("StochasticToolsApp", ScaledAbsDifferenceDRLRewardFunction)
virtual Real value(Real t, const Point &p) const override
virtual Real value(Real t, const Point &p) const
const Function & _design_function
Value we would like to reach (can be time and space dependent)
static InputParameters validParams()