Global Search#
Global search optimizers explore the entire search space more thoroughly. They aim to find good solutions without getting trapped in local optima.
Random Search#
Samples random points from the search space. Simple but surprisingly effective baseline.
from hyperactive.opt.gfo import RandomSearch
optimizer = RandomSearch(
search_space=search_space,
n_iter=5,
experiment=objective,
)
Grid Search#
Evaluates all combinations systematically. Only practical for small search spaces.
from hyperactive.opt.gfo import GridSearch
optimizer = GridSearch(
search_space=search_space,
experiment=objective,
)
Random Restart Hill Climbing#
Runs hill climbing from multiple random starting points.
from hyperactive.opt.gfo import RandomRestartHillClimbing
optimizer = RandomRestartHillClimbing(
search_space=search_space,
n_iter=5,
experiment=objective,
)
Powell’s Method and Pattern Search#
Classical derivative-free optimization methods.
When to Use Global Search#
Global search optimizers are best suited for:
Establishing baselines: Random search is a strong baseline for any problem
Small search spaces: Grid search provides exhaustive coverage
Unknown landscapes: When you don’t know the structure of your objective
Simple problems: When more sophisticated methods aren’t necessary
Consider using population-based or model-based methods if:
Random search isn’t finding good solutions
You have expensive evaluations and need smarter exploration
Your search space is too large for grid search