Imagine you are dropped onto a hilly landscape in thick fog. You can feel the slope under your feet but you cannot see the terrain ahead. Your goal: reach the highest point. The simplest strategy — always step in the direction that goes most steeply upward — is called hill climbing.
As an algorithm, hill climbing is just as literal. You start at some solution, look at all its neighbors (small changes you could make), and move to whichever neighbor improves your score the most. Repeat until no neighbor is better than where you are. At that point the algorithm stops — it has found a local maximum.
The strategy is fast, needs almost no memory, and works surprisingly well in practice. It underpins everything from early AI game-playing to modern neural-network training. But it carries a fundamental weakness: a local maximum is not necessarily the global maximum. The hill you climb might be a molehill next to a mountain you never even see.
That gap between "good enough nearby" and "best overall" is not a bug you can fix with more code. It reflects something deep about the structure of optimization itself.
Comments
Loading comments...