Ask/Tell Optimizers
The optimizers in the gradient_free_optimizers.ask_tell subpackage
provide the same algorithms as the main package, but with a batch-capable
ask(n=...) / tell(scores) interface in place of the managed
search() loop. They are the right choice when you need to keep
evaluation control on your side: external worker pools, async job queues,
distributed clusters, or integration into a larger framework.
For an introduction and trade-off discussion, see
Ask/Tell Interface. The constructor signatures match the
corresponding main-package optimizers, with two differences:
initialize is replaced by initial_evaluations, and nth_process
is not exposed.
Optimizers
|
Hill Climbing optimizer with ask/tell interface. |
|
Stochastic Hill Climbing optimizer with ask/tell interface. |
|
Repulsing Hill Climbing optimizer with ask/tell interface. |
|
Simulated Annealing optimizer with ask/tell interface. |
|
Downhill Simplex optimizer with ask/tell interface. |
|
Random Search optimizer with ask/tell interface. |
Grid Search optimizer with ask/tell interface. |
|
|
Random Restart Hill Climbing optimizer with ask/tell interface. |
|
Random Annealing optimizer with ask/tell interface. |
Pattern Search optimizer with ask/tell interface. |
|
Powell's Method optimizer with ask/tell interface. |
|
Lipschitz optimizer with ask/tell interface. |
|
DIRECT algorithm optimizer with ask/tell interface. |
|
|
Particle Swarm optimizer with ask/tell interface. |
Spiral Optimization with ask/tell interface. |
|
|
Parallel Tempering optimizer with ask/tell interface. |
|
Genetic Algorithm optimizer with ask/tell interface. |
|
Evolution Strategy optimizer with ask/tell interface. |
|
Differential Evolution optimizer with ask/tell interface. |
CMA-ES optimizer with ask/tell interface. |
|
Bayesian optimizer with ask/tell interface. |
|
|
Tree-structured Parzen Estimator optimizer with ask/tell interface. |
Forest optimizer with ask/tell interface. |
Common Interface
All ask/tell optimizers expose the same methods and attributes:
optimizer = OptimizerClass(
search_space, # dict: parameter name -> numpy array
initial_evaluations=[ # list[tuple[dict, float]]
(params_dict, score),
...,
],
constraints=[], # optional list of constraint callables
random_state=None, # optional int seed
# plus algorithm-specific parameters (epsilon, population, ...)
)
params_list = optimizer.ask(n=4) # list[dict] of length n
optimizer.tell(scores) # list[float] of length n
optimizer.best_score # float, -inf before any tell()
optimizer.best_para # dict