Hi! Thanks for pointing this out. I haven't looked at the code for a few years, but it was working when I uploaded it. Here are some potential causes for failure:
Are you using pendulum-v0 from OpenAI gym? Unfortunately I don't remember what version of gym I was using but it's possible that could also be a factor.
I was not able to get this to work at all without removing the control clipping that gym automatically adds to the environment. In your own gym files, you may have to remove their clipping to get it to work.
Have you tried running it for longer or using different initial conditions? ilqr generally does not globally optimize so it may just be a local minimum issue.
Hope this helps!
hello! Did you successfully complete the control of the inverted pendulum?
the costs of 40 iterations are listed above. it seems that the code did not converge.