Deep Learning Optimizer Visualization
vis.ensmallen.org
vis.ensmallen.org
This is expensive, so is typically used only when the objective function is itself very expensive to compute, such as for tuning hyperparameters.
If you're suggesting training a single neural network to then use as a general optimizer for any problem, you should consider the No Free Lunch Theorem: https://en.wikipedia.org/wiki/No_free_lunch_theorem