Finding paths of least action with gradient descent (2023)

59 E-Reverance 12 4/26/2025, 6:24:32 AM greydanus.github.io ↗

Comments (12)

gwern · 11h ago
Some of the older posts are very cute. I enjoyed https://greydanus.github.io/2020/12/01/scaling-down/ on showing how many high-powered tricks you can do with a tiny NN of the sort that will train in seconds.
jpfr · 6h ago
This is corresponds to Chapter 1.4 of SICM (Structure and Interpretation of Classical Mechanics).

Although SICM doesn't expose the underlying optimization method in the library interfaces. The path is represented as polynomial. I'd have to check if they also do gradient descent.

https://groups.csail.mit.edu/mac/users/gjs/6946/sicm-html/bo...

coderenegade · 8h ago
I don't know if I ever put the code online, but I did something similar a few years back for a bow deflection solver using Hooke's law and finite elements. I was planning to solve for arrow speed as well but never got around to it. I've kept the technique in my box of tools, though, because it's conceptually simpler for me to set up an optimization problem than it is an ode solver. Very cool write up.
imtringued · 2d ago
While the idea is obviously correct, the paper itself suffers from extremely sloppy writing.

They discretize the integral with a discrete sum, but then forget to discretize the variables by substituting x with x(t_i) or at least x_i, same for dot x. They put the objective function x hat = argmin S(X) last, when it is the most important aspect.

In the equation where x hat must fulfill the Euler lagrange equation for all t, they butchered the application of the derivative with respect to a constant point.

It should look more like this:

https://wikimedia.org/api/rest_v1/media/math/render/svg/6efe...

You need to explicitly pass in the x(t), dot x (t) and t as arguments into the derivative. Their notation implies that you have to take the derivative with respect to a constant (not at a point) which always returns zero (a blatantly banal property) or that the function (=the laws of physics) behind x(t) varies over time (shudder).

Overall this was extremely unpleasant to read even though the approach is neat.

danbmil99 · 13h ago
> Nevertheless in a deterministic system you can know a future state without calculating intermediary states.

Exactly wrong. See the halting problem

coderenegade · 8h ago
You know the initial conditions, the position function x(t), the velocity function v(t), and acceleration is constant. Why can't we evaluate the state at any point in time without having to calculate previous states?

No comments yet

frutiger · 10h ago
Isn't the halting problem about knowing all future states and not a future state?
revskill · 6h ago
Not everyone understands that problem.
froh · 8h ago
...unless the input tape also is deterministic.

"deterministic system" is not "deterministic program"

constantcrying · 4d ago
>Some, like the double pendulum or the three-body problem, are deterministic but chaotic. In other words, their dynamics are predictable but we can’t know their state at some time in the future without simulating all the intervening states.

Literal nonsense. Everything in the second sentence is false.

Deterministic means that the state at some point in time fixes the state at all future points in time. Nevertheless in a deterministic system you can know a future state without calculating intermediary states.

Chaotic means that future states are discontinuous in regards to the initial state. Nevertheless a chaotic system can be known at future states without calculating intermediary states, you can even have an analytic solution to a chaotic system. Furthermore chaotic can mean that you can't calculate future states from initial states. Numerical ODE solvers in particularly have errors which grow exponential in time. So simulating intermediate states does not give you the solution to the problem.

godelski · 3h ago
In the two example problems there may be long sequences of identical motion that will then significantly diverge. That is, if you observe the object from t_i till t_j (with i,j > 0 and j > i) then this observation is not sufficient to distinguish better trajectories T_1 and T_2.

Chaotic systems are deterministic but highly sensitive to initial conditions. IIRC Lorenz said something like The present determines the future but the approximate present doesn't approximate the future

I don't find an issue with the line. To me it reads that to determine a systems parameters at t_i, you need to run the simulation from t_0. Which while not always true is more than accurate enough and is a common statement made when chaos is being taught. The accuracy just depends on how chaotic the system is and how long you measure for

MathMonkeyMan · 5h ago
The way I think of it is "we can't know their state at all at some time in the future because we don't know their state exactly in the present."