Designing bridge trusses with Pytorch autograd
github.com
github.com
I'm of the opinion that it was ahead of its time: Swift hadn't (and still hasn't) made enough progress on Linux support for it to be taken seriously as a language for writing anything that isn't associated with Apple. However, as a result, Swift now has language-level differentiability in its compiler. I'd love to see Swift get used for projects like this, but I suppose the reality of the matter is that there are so many performant runtimes for 2D/3D physics that there just isn't much of a need for automatic differentiation (and its overhead) to solve these problems. The tooling nerd in me thinks this stuff is fascinating.
But my daily driver is a system76 Linux box running PopOS… that’s not a swift friendly environment. I guess the best compromise I’ve found for stuff I want to run in both places is Pythonista? Which is fantastic to be clear, but iOS is really constrained…
I want the ML infrastructure of Python, the speed of C and the ability to write fast cross platform apps in a syntax that isn’t confusing violence… Save me programming language nerds.
Facts. Pytorch is such a fun too for applied calculus. Just write down a program, compute its derivative, and do any of the fun things you can do with derivatives, like optimization or linear approximation.
I suspect lots of things in everyday life could be made substantially better/cheaper/more efficient if entire system optimization like this could be done to their design.
Optimizing the bridge only works because my method for solving the forces in each beam (least squares) happens to be differentiable.
Then the network is differentiable.
There are neural networks which learn to produce an approximation, but much faster. Useful for games, maybe exploratory analysis before deploying using slow classic CFD.
That way, the neural net gets more accurate specifically in the area of your design.
You could imagine a developers workstation where a GUI tool is letting them design stuff, and the neural net is giving them instant answers (and/or showing gradients to show how to improve stuff), and slow CFD runs are running in the background so whenever they go to lunch and another cfd run completes the results all get more accurate and detailled.
Kinda similar to the way many graphics packages have 'draft' quality 3d rendering, but then when idle for a bit will improve the render quality.
It solves hyperbolic PDEs like the Euler equations, is differentiable with forward-mode AD, and MPI parallelized.