Excellent question. Reheating is an advanced, yet powerful, modification to the standard Simulated Annealing (SA) algorithm. It's designed to solve a common problem: the algorithm getting trapped in a deep but suboptimal local minimum.
Let's break down how reheating policies are implemented, from the core concept to the practical code.
1. The Problem: Why Reheating is Necessary
In standard Simulated Annealing, the temperature T only decreases. This is called a monotonic cooling schedule. As T approaches zero, the algorithm becomes a simple hill-climber, only accepting better solutions.
The problem is that if the algorithm descends into a deep local minimum early on, the temperature might become too low to allow the "jump" needed to escape it and find the true global minimum. The algorithm "freezes" in the wrong place.
[image: Diagram showing SA getting stuck] open
2. The Solution: The Concept of Reheating
Reheating breaks the monotonic cooling rule. When the algorithm is detected to be "stuck" or "frozen," the temperature is abruptly increased.
- The Goal: To re-introduce a high degree of randomness into the search.
- The Effect: A higher temperature increases the probability of accepting "worse" moves, allowing the algorithm to jump out of the local minimum and explore entirely different regions of the search space.
Think of it like a blacksmith: if the metal cools too much and becomes hard to shape (stuck in a local minimum), they don't keep hammering with less force. They stick it back in the forge (reheat) to make it malleable again before resuming the shaping process (cooling).
3. The Implementation: Triggers and Actions
Implementing a reheating policy requires two key components:
- A Trigger Condition: How do we detect that the algorithm is stuck?
- A Reheating Action: What do we do with the temperature once the trigger is activated?
Here’s a breakdown of common strategies for each.
A. Trigger Conditions (When to Reheat)
The algorithm needs to monitor its own progress to decide when to reheat. Common triggers include: