Skip to content

Commit e852d68

Browse files
committed
add reference and improve comments
1 parent 9a487bc commit e852d68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mjpc/planners/sample_gradient/planner.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ void SampleGradientPlanner::GradientRollouts(int num_parameters,
436436
noise_compute_time = 0.0;
437437

438438
// -- compute gradient and diagonal Hessian -- //
439+
// https://personal.math.ubc.ca/~jfeng/CHBE553/Example7/Formulae.pdf
440+
// r0 = r_i
441+
// r1 = r_{i-1} or r_{i+1}
442+
// r2 = r_{i-2} or r_{i+2}
439443
double scale2 = scale * scale;
440444
double r0 = trajectory[2 * num_parameters].total_return; // nominal return
441445

0 commit comments

Comments
 (0)