https://github.com/kach/lagrange-climbs-a-hill
Interpolating Lagrangian mechanics by AD and gradient descent
https://github.com/kach/lagrange-climbs-a-hill
Last synced: about 1 month ago
JSON representation
Interpolating Lagrangian mechanics by AD and gradient descent
- Host: GitHub
- URL: https://github.com/kach/lagrange-climbs-a-hill
- Owner: kach
- Created: 2019-10-28T20:22:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-28T20:22:41.000Z (over 6 years ago)
- Last Synced: 2025-03-23T14:36:59.853Z (about 1 year ago)
- Language: Python
- Size: 2.14 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I'm a CS major in a physics class, which means that all optimization problems
just look like opportunities for gradient descent... here I use PyTorch's
automatic differentiation tools to try and optimize the "action" of a physical
system (in the Lagrangian sense) in order to "learn" its true trajectory -- a
visual display of the Principle of Stationary Action!
## Some demos
All of these are seeded with random trajectories and left to tune for a few
thousand steps of gradient descent, just a few minutes of total computation
time.
### Trajectory of a projectile

### Keplerian Orbit

### Spherical Cart-Pole
