In GitLab by @nmansard on Dec 20, 2018, 10:47
The DDP solver is an SQP solver which optimize with the decision variables xs,us, so that F(xs,us) = 0, with F a stack of dynamic constraints f(x,u) - xnext = 0. The main difference between a DDP solver and a classical SQP solver (for example KKT based) is that in DDP there is a explicit way to project a candidate xs,us on the constraint (by making a rollout). Indeed, we tend to produce the initial guess by using this explicit projection. I believe that this is a mistake, because finding a us that does not make the xs very bad is difficult and expensive.
On the other hand, the DDP solver, like any SQP solver, should be able to find a good feasible candidate pair x1s,u1s from a bad unfeasible pair xs,us. But does that make a sense to run a backward pass from an unfeasible pair xs,us ?
In term of implementation: yes it is acceptable: all derivatives are computable, hence the backward pass can be run. But then the Value derivatives Vx' are computed at xguess', and xguess' is not f(xguess,uguess). So we need to "relinearize" to move Vx' computed at xguess' to Vx' computed at f(xguess,ugess).
The trick (well mathematically it is exact, so not exactly a trick) is easy. But I was not able to find this trick in the literature. I also double check that we have the exact same behavior than a KKT in case of LQR problem and infeasible initial guess.