Chapter4 Beyond Classical Search August2024
Chapter4 Beyond Classical Search August2024
Figure 4.4
• Plateaux: a plateau is a flat area of the state-
space landscape. It can be a flat local maximum,
from which no uphill exit exists.
• A shoulder, from which progress is possible. A
hill-climbing search might get lost on the
plateau.
• If we always allow sideways moves when there
are no uphill moves, an infinite loop will occur
whenever the algorithm reaches a flat local
maximum.
• One solution is to put a limit on the number of
consecutive sideways moves allowed.
• For randomly generated 8-queens state, steepest-
ascent hill climbing gets stuck 86% of the time,
solving only 14% of problem instances.
• It works, taking just 4 steps on average when it
succeeds and 3 when it gets stuck—not bad for a
state space with 88 ≈ 17 million states.
• For example, we could allow up to, say, 100
consecutive sideways moves in the 8-queens
problem. This raises the percentage of problem
instances solved by hill climbing from 14% to 94%.
• the algorithm averages roughly 21 steps for each
successful instance and 64 for each failure.
Variants of Hill Climbing