This would add another API "level", which enables more control over the optimization run and will be closer to the original mathematical idea of gradient-free-optimization. This API could improve the way how GFO can be used as a dependency in other packages, which might require more control.
It could look somewhat like this:
n_iter = 100
opt = RandomSearch()
for _ in range(n_iter):
new_position = opt.iterate()
new_score = objective_function(new_position)
opt.evaluate(new_score)
This would add another API "level", which enables more control over the optimization run and will be closer to the original mathematical idea of gradient-free-optimization. This API could improve the way how GFO can be used as a dependency in other packages, which might require more control.
It could look somewhat like this: