I've been thinking for some time about how to better find the optimal weights for neural networks and it struck me that when solving Lagrangian mechanics problem you are optimizing the action function.
Thus my question became: Is it possible to set up a physical system (Circuit or otherwise) such that the action function for the system represents/"is the same as" the mathematical function you want to minimize. Thus you could physically measure the system and get the optimal solution for your mathematical function, regardless if it's non-linear or convex etc.
I'm sure this must have been done somewhere, I've been searching around forever trying to find people doing this but I can't find anything. Does anyone know what this field or research is called or if it's even possible?
EDIT: I'm not looking for maths of how to optimize problems, I'm looking to build a Physical real world system which when run can be measured and those measurements would correspond to the optimal point in the mathematical system. Sort of like "Hardware accelerating" optimization problems.