20 ms·
https://github.com/bijection/g9/blob/master/src/minimize.js https://github.com/bijection/g9/blob/master/src/minimize.js
by HammadB 3y ago
https://github.com/bijection/g9/blob/master/src/minimize.js https://github.com/bijection/g9/blob/master/src/minimize.js
- deleted 3y ago[deleted]
- throwaway4good 3y agoRequires the relationship from the screen coordinates to the variables in the program to be differentiable. It is a very nice idea though.
- jaen 3y agoIt requires the final function to have a numerically reasonable finite difference gradient, which is somewhat different from what is commonly referred to as "differentiable" - eg. the insides of that function could still use non-differentiable/non-analytic functions. It seems to be based on numeric.js, which is based on the classic Fortran UNCMIN [1] optimizer. [1]: https://perception.lab.uiowa.edu/UNCMIN https://perception.lab.uiowa.edu/UNCMIN
- Chabsff 3y agoThey do quite a bit more sampling in order to dynamically determine a good delta value. But apart from that, I dare say that I got it broadly right. It feels to me like there's also quite a bit of temporal coherence that could be leveraged in order to accelerate the process.