The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →To escape a local optimum, the search must do something ordinary greedy hill climbing will not: temporarily accept a worse move, explore a different starting point, remember recent moves, or change the neighborhood it searches. Which method works best depends on the problem, its available moves, and the cost of evaluating a candidate solution.
Why hill climbing gets stuck
A local optimum is the best solution among the candidates reachable through the algorithm’s defined neighborhood. It is not necessarily the best solution overall: a better one may exist beyond the neighborhood or across a sequence of moves that first makes the score worse. [Google OR-Tools; OptaPlanner]
Ordinary hill climbing is greedy. It accepts improving moves and rejects moves that worsen the objective. Once every available neighboring move is worse, it stops; it cannot cross a valley to reach another basin, even if that basin contains a better solution. OptaPlanner warns that hill climbing can easily get stuck in a local optimum. [OptaPlanner]
Ways to escape a local optimum
Simulated annealing: accept some downhill moves
Simulated annealing sometimes accepts a worsening move, especially early in the search, then reduces the chance of doing so as the search cools. A downhill move can carry the search out of its current basin; cooling gradually shifts the method toward refinement. It is a natural first choice when you can define candidate moves, score them, and tune a cooling schedule. [Google OR-Tools; Handbook of Metaheuristics]
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
Tabu search: discourage cycling
Tabu search keeps short-term memory of recent moves or attributes and marks some as temporarily forbidden. This discourages immediately undoing a move or cycling through the same solutions, allowing the search to explore beyond its current local optimum. The tabu size affects that balance and needs tuning for the problem. [Google OR-Tools; OptaPlanner]
Guided local search: penalize repeatedly attractive structures
Guided local search adjusts penalties on features of candidate solutions so that structures repeatedly favored by local improvement become less attractive. This redirects the search rather than simply accepting every worsening move. OR-Tools identifies guided local search as generally effective for vehicle-routing local search; that guidance is specific to that problem family, not a guarantee for every optimization task. [Google OR-Tools]
Random restarts and iterated local search: try another starting point
With random restarts, run local search from multiple initial points. This is simple to implement and the independent runs can be parallelized, though each run can still settle in a local optimum.
Iterated local search instead perturbs a local optimum and then applies local improvement again. A useful perturbation changes enough to reach a different basin while preserving some good structure. A Southampton dissertation describes this perturbation as a “kick move.” [University of Southampton dissertation]
Rank #3
Redesign the neighborhood: make larger or more relevant moves
Local optimality is relative to the moves the algorithm is allowed to consider. If the neighborhood is too restrictive, add larger moves or moves tailored to the problem. For example, a move that changes several components at once may reach a solution unavailable through any single-component change. Larger neighborhoods can increase evaluation cost, and proposed moves must still respect feasibility constraints.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to choose an escape method
Start with the structure of the objective and its neighborhood, then account for evaluation cost, tuning effort, reproducibility, and how much diversification the search needs.
| Method | Useful when | Main trade-off |
|---|---|---|
| Simulated annealing | Worsening moves can be scored and accepted under a cooling schedule. | Performance depends on the acceptance rule and cooling schedule. |
| Tabu search | The problem has meaningful moves or attributes to remember, and cycling is a concern. | Tabu memory size and rules need tuning. |
| Guided local search | Repeatedly attractive structures can be identified and penalized; OR-Tools highlights vehicle routing. | Penalty design must fit the problem. |
| Random restarts | New starting points are easy to generate and local runs can be performed independently. | Each run may get stuck again; results depend on starting points. |
| Iterated local search | A perturbation can change the basin while preserving useful solution structure. | The perturbation, or kick, must be strong enough to escape without discarding too much progress. |
| Neighborhood redesign | The current moves are too limited to reach useful alternatives. | Larger or more complex moves can cost more to evaluate and may complicate feasibility. |
These methods are not mutually exclusive. For example, a search can use a richer neighborhood and multiple restarts, or combine local improvement with perturbation. Compare candidates on the actual problem: there is no universal success-rate figure for escaping local optima, and results depend on the problem and parameter settings.
Quick Recap
Best Value
How to tell whether the search is trapped
- Inspect the stopping condition: if the algorithm stops because no allowed neighboring move improves the score, it has found a local optimum under that neighborhood—not proof of a global optimum.
- Check the move set: determine whether a larger or problem-specific move could connect the current solution to alternatives that the present neighborhood cannot reach.
- Compare independent runs: different final scores from different starting points indicate that the outcome can depend on initialization; repeated identical results alone do not establish global optimality.
- Track search behavior: repeated reversals suggest cycling, while a flat score under greedy moves may call for diversification or a neighborhood change.
A practical starting plan
- Define what counts as a neighboring solution and verify that proposed moves preserve feasibility.
- Run a greedy local search and record its starting point, final score, stopping reason, and evaluation cost.
- If the search stops at a local optimum, try a small number of independent restarts to see how strongly the result depends on initialization.
- If moves reverse or cycle, test tabu memory. If the task has identifiable recurring structures, test guided penalties; if a worsening move can be scored, test simulated annealing.
- For iterated local search, adjust the perturbation so it escapes the current basin without needlessly destroying good structure. For any method, compare results and runtime under repeatable settings.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

