Skip to main content
Ctrl+K
Hyperactive - Home Hyperactive - Home
  • Get Started
  • Installation
  • User Guide
  • API Reference
  • Examples
    • Frequently Asked Questions
    • Troubleshooting
    • Get Involved
    • About
  • GitHub
  • Star on GitHub
  • Get Started
  • Installation
  • User Guide
  • API Reference
  • Examples
  • Frequently Asked Questions
  • Troubleshooting
  • Get Involved
  • About
  • GitHub
  • Star on GitHub

Section Navigation

  • Introduction
  • Search Spaces
  • Optimizers
    • Local Search
    • Global Search
    • Population Methods
    • Sequential Model-Based Methods
    • Optuna Backend
    • Optimizer Configuration
  • Experiments
  • Framework Integrations
  • Migration Guide (v4→v5)
  • User Guide
  • Optimizers
  • Local Search

Local Search#

Local search optimizers explore the neighborhood of the current best solution. They are fast but may get stuck in local optima.

These optimizers work by iteratively improving from a starting point, making small adjustments to find better solutions nearby.

Hill Climbing#

The simplest local search: always move to a better neighbor.

from hyperactive.opt.gfo import HillClimbing

optimizer = HillClimbing(
    search_space=search_space,
    n_iter=5,
    experiment=objective,
)

Simulated Annealing#

Like hill climbing, but sometimes accepts worse solutions to escape local optima. The “temperature” controls exploration vs exploitation.

from hyperactive.opt.gfo import SimulatedAnnealing

optimizer = SimulatedAnnealing(
    search_space=search_space,
    n_iter=5,
    experiment=objective,
)

Stochastic Hill Climbing#

Hill climbing with a probability of accepting worse solutions. The p_accept parameter controls exploration: higher values make it more likely to accept non-improving moves, helping escape local optima.

from hyperactive.opt.gfo import StochasticHillClimbing

optimizer = StochasticHillClimbing(
    search_space=search_space,
    n_iter=5,
    experiment=objective,
    p_accept=0.3,  # Probability of accepting worse solutions
)

Repulsing Hill Climbing#

Remembers visited regions and avoids them, encouraging broader exploration.

from hyperactive.opt.gfo import RepulsingHillClimbing

optimizer = RepulsingHillClimbing(
    search_space=search_space,
    n_iter=5,
    experiment=objective,
)

Downhill Simplex (Nelder-Mead)#

Uses a simplex of points to navigate the search space. Good for continuous problems.

from hyperactive.opt.gfo import DownhillSimplexOptimizer

optimizer = DownhillSimplexOptimizer(
    search_space=search_space,
    n_iter=5,
    experiment=objective,
)

When to Use Local Search#

Local search optimizers are best suited for:

  • Quick initial exploration: Get a baseline result fast

  • Smooth, unimodal landscapes: When there’s a single optimum to find

  • Refinement: Fine-tune solutions found by global methods

  • Limited budget: When you can only afford a few evaluations

Consider using global or population-based methods if:

  • Your landscape has many local optima

  • You’re not finding good solutions with local search

  • You need more robust exploration

On this page
  • Hill Climbing
  • Simulated Annealing
  • Stochastic Hill Climbing
  • Repulsing Hill Climbing
  • Downhill Simplex (Nelder-Mead)
  • When to Use Local Search

© Copyright 2019 - 2026 (MIT License).

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.