10#ifdef MOOSE_LIBTORCH_ENABLED
67 std::vector<Real>
evaluate(
const std::vector<std::vector<Real>> & observations,
On-policy trajectory storage for fixed-horizon RL training.
Computes generalized-advantage estimates and value targets for an on-policy trajectory buffer,...
Targets estimate(const LibtorchRLTrajectoryBuffer::Trajectory &trajectory, Moose::LibtorchArtificialNeuralNet &value_network) const
Compute value targets and advantages for one trajectory.
const Real _discount_factor
Reward discount factor used in the temporal-difference recursion.
std::vector< Real > evaluate(const std::vector< std::vector< Real > > &observations, Moose::LibtorchArtificialNeuralNet &value_network) const
Evaluate the critic on a batch of observations.
void computeValueTargets(LibtorchRLTrajectoryBuffer &buffer, Moose::LibtorchArtificialNeuralNet &value_network) const
Fill every trajectory in the buffer with value targets and advantages.
const Real _lambda_factor
GAE lambda factor used in the reverse-time advantage recursion.
Vector data for one on-policy trajectory.
Generalized-advantage estimates and critic targets for one trajectory.
std::vector< Real > value_targets
Critic regression targets.
std::vector< Real > advantages
Generalized-advantage estimates.