<s>
In	O
numerical	O
analysis	O
,	O
hill	B-Algorithm
climbing	I-Algorithm
is	O
a	O
mathematical	O
optimization	O
technique	O
which	O
belongs	O
to	O
the	O
family	O
of	O
local	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
It	O
is	O
an	O
iterative	B-Algorithm
algorithm	I-Algorithm
that	O
starts	O
with	O
an	O
arbitrary	O
solution	O
to	O
a	O
problem	O
,	O
then	O
attempts	O
to	O
find	O
a	O
better	O
solution	O
by	O
making	O
an	O
incremental	B-Algorithm
change	O
to	O
the	O
solution	O
.	O
</s>
<s>
If	O
the	O
change	O
produces	O
a	O
better	O
solution	O
,	O
another	O
incremental	B-Algorithm
change	O
is	O
made	O
to	O
the	O
new	O
solution	O
,	O
and	O
so	O
on	O
until	O
no	O
further	O
improvements	O
can	O
be	O
found	O
.	O
</s>
<s>
For	O
example	O
,	O
hill	B-Algorithm
climbing	I-Algorithm
can	O
be	O
applied	O
to	O
the	O
travelling	B-Algorithm
salesman	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
finds	O
optimal	O
solutions	O
for	O
convex	O
problems	O
–	O
for	O
other	O
problems	O
it	O
will	O
find	O
only	O
local	O
optima	O
(	O
solutions	O
that	O
cannot	O
be	O
improved	O
upon	O
by	O
any	O
neighboring	O
configurations	O
)	O
,	O
which	O
are	O
not	O
necessarily	O
the	O
best	O
possible	O
solution	O
(	O
the	O
global	O
optimum	O
)	O
out	O
of	O
all	O
possible	O
solutions	O
(	O
the	O
search	O
space	O
)	O
.	O
</s>
<s>
Examples	O
of	O
algorithms	O
that	O
solve	O
convex	O
problems	O
by	O
hill-climbing	B-Algorithm
include	O
the	O
simplex	B-Algorithm
algorithm	I-Algorithm
for	O
linear	B-Algorithm
programming	I-Algorithm
and	O
binary	O
search	O
.	O
</s>
<s>
repeated	O
local	B-Algorithm
search	I-Algorithm
)	O
,	O
or	O
more	O
complex	O
schemes	O
based	O
on	O
iterations	O
(	O
like	O
iterated	B-Algorithm
local	I-Algorithm
search	I-Algorithm
)	O
,	O
or	O
on	O
memory	O
(	O
like	O
reactive	O
search	O
optimization	O
and	O
tabu	B-Algorithm
search	I-Algorithm
)	O
,	O
or	O
on	O
memory-less	O
stochastic	O
modifications	O
(	O
like	O
simulated	B-Algorithm
annealing	I-Algorithm
)	O
.	O
</s>
<s>
It	O
is	O
used	O
widely	O
in	O
artificial	B-Application
intelligence	I-Application
,	O
for	O
reaching	O
a	O
goal	O
state	O
from	O
a	O
starting	O
node	O
.	O
</s>
<s>
Although	O
more	O
advanced	O
algorithms	O
such	O
as	O
simulated	B-Algorithm
annealing	I-Algorithm
or	O
tabu	B-Algorithm
search	I-Algorithm
may	O
give	O
better	O
results	O
,	O
in	O
some	O
situations	O
hill	B-Algorithm
climbing	I-Algorithm
works	O
just	O
as	O
well	O
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
can	O
often	O
produce	O
a	O
better	O
result	O
than	O
other	O
algorithms	O
when	O
the	O
amount	O
of	O
time	O
available	O
to	O
perform	O
a	O
search	O
is	O
limited	O
,	O
such	O
as	O
with	O
real-time	O
systems	O
,	O
so	O
long	O
as	O
a	O
small	O
number	O
of	O
increments	O
typically	O
converges	O
on	O
a	O
good	O
solution	O
(	O
the	O
optimal	O
solution	O
or	O
a	O
close	O
approximation	O
)	O
.	O
</s>
<s>
At	O
the	O
other	O
extreme	O
,	O
bubble	B-Algorithm
sort	I-Algorithm
can	O
be	O
viewed	O
as	O
a	O
hill	B-Algorithm
climbing	I-Algorithm
algorithm	I-Algorithm
(	O
every	O
adjacent	O
element	O
exchange	O
decreases	O
the	O
number	O
of	O
disordered	O
element	O
pairs	O
)	O
,	O
yet	O
this	O
approach	O
is	O
far	O
from	O
efficient	O
for	O
even	O
modest	O
N	O
,	O
as	O
the	O
number	O
of	O
exchanges	O
required	O
grows	O
quadratically	O
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
is	O
an	O
anytime	B-Algorithm
algorithm	I-Algorithm
:	O
it	O
can	O
return	O
a	O
valid	O
solution	O
even	O
if	O
it	O
's	O
interrupted	O
at	O
any	O
time	O
before	O
it	O
ends	O
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
attempts	O
to	O
maximize	O
(	O
or	O
minimize	O
)	O
a	O
target	O
function	O
,	O
where	O
is	O
a	O
vector	O
of	O
continuous	O
and/or	O
discrete	O
values	O
.	O
</s>
<s>
At	O
each	O
iteration	O
,	O
hill	B-Algorithm
climbing	I-Algorithm
will	O
adjust	O
a	O
single	O
element	O
in	O
and	O
determine	O
whether	O
the	O
change	O
improves	O
the	O
value	O
of	O
.	O
</s>
<s>
(	O
Note	O
that	O
this	O
differs	O
from	O
gradient	B-Algorithm
descent	I-Algorithm
methods	I-Algorithm
,	O
which	O
adjust	O
all	O
of	O
the	O
values	O
in	O
at	O
each	O
iteration	O
according	O
to	O
the	O
gradient	O
of	O
the	O
hill	O
.	O
)	O
</s>
<s>
With	O
hill	B-Algorithm
climbing	I-Algorithm
,	O
any	O
change	O
that	O
improves	O
is	O
accepted	O
,	O
and	O
the	O
process	O
continues	O
until	O
no	O
change	O
can	O
be	O
found	O
to	O
improve	O
the	O
value	O
of	O
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
will	O
follow	O
the	O
graph	O
from	O
vertex	O
to	O
vertex	O
,	O
always	O
locally	O
increasing	O
(	O
or	O
decreasing	O
)	O
the	O
value	O
of	O
,	O
until	O
a	O
local	O
maximum	O
(	O
or	O
local	O
minimum	O
)	O
is	O
reached	O
.	O
</s>
<s>
In	O
simple	O
hill	B-Algorithm
climbing	I-Algorithm
,	O
the	O
first	O
closer	O
node	O
is	O
chosen	O
,	O
whereas	O
in	O
steepest	B-Algorithm
ascent	I-Algorithm
hill	B-Algorithm
climbing	I-Algorithm
all	O
successors	O
are	O
compared	O
and	O
the	O
closest	O
to	O
the	O
solution	O
is	O
chosen	O
.	O
</s>
<s>
Steepest	B-Algorithm
ascent	I-Algorithm
hill	B-Algorithm
climbing	I-Algorithm
is	O
similar	O
to	O
best-first	B-Algorithm
search	I-Algorithm
,	O
which	O
tries	O
all	O
possible	O
extensions	O
of	O
the	O
current	O
path	O
instead	O
of	O
only	O
one	O
.	O
</s>
<s>
Stochastic	B-Algorithm
hill	I-Algorithm
climbing	I-Algorithm
does	O
not	O
examine	O
all	O
neighbors	O
before	O
deciding	O
how	O
to	O
move	O
.	O
</s>
<s>
Coordinate	B-Algorithm
descent	I-Algorithm
does	O
a	O
line	B-Algorithm
search	I-Algorithm
along	O
one	O
coordinate	O
direction	O
at	O
the	O
current	O
point	O
in	O
each	O
iteration	O
.	O
</s>
<s>
Some	O
versions	O
of	O
coordinate	B-Algorithm
descent	I-Algorithm
randomly	O
pick	O
a	O
different	O
coordinate	O
direction	O
each	O
iteration	O
.	O
</s>
<s>
Random-restart	B-Algorithm
hill	I-Algorithm
climbing	I-Algorithm
is	O
a	O
meta-algorithm	B-Algorithm
built	O
on	O
top	O
of	O
the	O
hill	B-Algorithm
climbing	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
It	O
is	O
also	O
known	O
as	O
Shotgun	B-Algorithm
hill	I-Algorithm
climbing	I-Algorithm
.	O
</s>
<s>
It	O
iteratively	O
does	O
hill-climbing	B-Algorithm
,	O
each	O
time	O
with	O
a	O
random	O
initial	O
condition	O
.	O
</s>
<s>
The	O
best	O
is	O
kept	O
:	O
if	O
a	O
new	O
run	O
of	O
hill	B-Algorithm
climbing	I-Algorithm
produces	O
a	O
better	O
than	O
the	O
stored	O
state	O
,	O
it	O
replaces	O
the	O
stored	O
state	O
.	O
</s>
<s>
Random-restart	B-Algorithm
hill	I-Algorithm
climbing	I-Algorithm
is	O
a	O
surprisingly	O
effective	O
algorithm	O
in	O
many	O
cases	O
.	O
</s>
<s>
Hill	B-Algorithm
climbing	I-Algorithm
will	O
not	O
necessarily	O
find	O
the	O
global	O
maximum	O
,	O
but	O
may	O
instead	O
converge	O
on	O
a	O
local	O
maximum	O
.	O
</s>
<s>
However	O
,	O
as	O
many	O
functions	O
are	O
not	O
convex	O
hill	B-Algorithm
climbing	I-Algorithm
may	O
often	O
fail	O
to	O
reach	O
a	O
global	O
maximum	O
.	O
</s>
<s>
Other	O
local	B-Algorithm
search	I-Algorithm
algorithms	I-Algorithm
try	O
to	O
overcome	O
this	O
problem	O
such	O
as	O
stochastic	B-Algorithm
hill	I-Algorithm
climbing	I-Algorithm
,	O
random	O
walks	O
and	O
simulated	B-Algorithm
annealing	I-Algorithm
.	O
</s>
<s>
By	O
contrast	O
,	O
gradient	B-Algorithm
descent	I-Algorithm
methods	I-Algorithm
can	O
move	O
in	O
any	O
direction	O
that	O
the	O
ridge	O
or	O
alley	O
may	O
ascend	O
or	O
descend	O
.	O
</s>
<s>
Hence	O
,	O
gradient	B-Algorithm
descent	I-Algorithm
or	O
the	O
conjugate	B-Algorithm
gradient	I-Algorithm
method	I-Algorithm
is	O
generally	O
preferred	O
over	O
hill	B-Algorithm
climbing	I-Algorithm
when	O
the	O
target	O
function	O
is	O
differentiable	O
.	O
</s>
<s>
Another	O
problem	O
that	O
sometimes	O
occurs	O
with	O
hill	B-Algorithm
climbing	I-Algorithm
is	O
that	O
of	O
a	O
plateau	O
.	O
</s>
<s>
Contrast	O
genetic	B-Algorithm
algorithm	I-Algorithm
;	O
random	B-Algorithm
optimization	I-Algorithm
.	O
</s>
