1D Search Landscape

Classic Hill Climbing Visualization

Click anywhere on the curve to place the agent and watch hill climbing navigate the landscape!

Interactive 1D Search Landscape

--
State Position
--
Objective Function
0
Steps Taken
--
Local Gradient
Ready
Algorithm Status
Click anywhere on the curve to place the agent!
Watch how hill climbing behaves at different starting positions on the landscape.
Place the agent by clicking on the landscape curve, then start the hill climbing algorithm.

Demonstration Scenarios

Click any scenario to see hill climbing behavior at key landscape features:

🏆 Global Maximum

Start near the highest peak - guaranteed success!

🪜 Shoulder Challenge

Navigate the flat area that leads to the global maximum!

🔺 Local Maximum Trap

Get stuck on the smaller peak - classic failure case!

➖ Flat Local Maximum

Experience plateau behavior with no clear direction!

Key Insights from 1D Landscape

🏆 Global Maximum

The Goal: The highest point on the entire landscape. Hill climbing succeeds when it starts close enough to reach this peak.

🪜 Shoulder

Hidden Path: A flat region that eventually leads upward to the global maximum. Requires patience and multiple steps.

🔺 Local Maximum

The Trap: Higher than immediate neighbors but not globally optimal. Hill climbing stops here, thinking it found the solution.

➖ "Flat" Local Maximum

Plateau Effect: A flat-topped peak where many states have the same value. Algorithm can't determine direction.

Why This Matters

This 1D visualization clearly shows why starting position matters in hill climbing. The algorithm's success depends entirely on the initial state and the local structure of the search landscape. Advanced algorithms like simulated annealing and genetic algorithms were developed to overcome these limitations.