Hill Climbing
Hill climbing looks only at neighbours and steps to a better one. Like climbing in fog: you go up, then you stop at a peak that may not be the highest mountain. Local maxima, plateaus, ridges trap it. Variants: random restart, simulated annealing.
8-queens or a tiny landscape sketch is enough. Don’t claim hill climbing always finds global best. It is greedy local search, not A*.
Hill Climbing — output — stopped at index 1 height 5. Global peak is 9. Local maximum trap.
Local max trap + one fix.