Hacker News new | ask | show | jobs
by HammadB 1039 days ago
https://github.com/bijection/g9/blob/master/src/minimize.js
2 comments

They 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.

Requires the relationship from the screen coordinates to the variables in the program to be differentiable.

It is a very nice idea though.

It 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