One way to optimize the luminosity is to use a process called Bayesian Optimization (BO).
A 1-D animation is shown here (provide source of gif as well)