How It Works
Hill climbing is a mathematical optimization technique that belongs to the local search family of algorithms:
- It starts at a random position in the search space (landscape)
- Evaluates all neighboring positions and moves to the one with the highest value
- Continues this process until no neighbor has a higher value, indicating a local maximum
- The algorithm is greedy and simple, but can get trapped in local optima
- Multiple random restarts are often used to find better solutions
Interactive Features
- Generate different landscapes: unimodal (one peak) or multimodal (multiple peaks)
- Place multiple hill climbers to see how they converge to different local maxima
- Step through the optimization process or watch it animate automatically
- Toggle visualization options to better understand the search space
- Compare how different starting points lead to different solutions