HomeCognitive ScienceProblem Space Search: Hill Climbing vs Simulated Annealing

Problem Space Search: Hill Climbing vs Simulated Annealing

Watch hill climbing and simulated annealing race side by side over the same 2D Gaussian-peak fitness landscape, with a live objective-value chart showing hill climbing get trapped while annealing tolerates worse moves to escape.

Cognitive Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-problem-solving ↗ Open standalone

Newell and Simon modelled problem solving as search through a "problem space" — states connected by operators, moving from a start toward a goal. This simulator renders that idea as a 2D fitness landscape built from overlapping Gaussian peaks, with two agents searching it side by side from the same starting state: one running greedy hill climbing, the other simulated annealing. Watch hill climbing get trapped the instant it reaches a local maximum, and watch simulated annealing's cooling temperature let it tolerate temporarily worse moves — a direct computational parallel to the incubation and functional-fixedness effects the accompanying article covers — before settling onto (or near) the true global optimum, with a live chart tracking both agents' objective value step by step.

⚙ Under the hood

Watch an agent search a randomly generated Gaussian-peak landscape with hill climbing, random-restart hill climbing, or simulated annealing, and see Newell & Simon's local-maximum trap play out live in 3D.

Three.jsCognitive ScienceSearch AlgorithmsProblem SolvingOptimizationNewell & Simon

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)