I am reading about local search: Hill climbing and its types and Simulated Annealing
one of Hill climbing versions is "Stochastic Hill climbing" which has the following definition:
Stochastic hill climbing does not examine for all its neighbor before moving. Rather, this search algorithm selects one neighbor node at random and decides whether to choose it as a current state or examine another state
some sources mentioned that it can be used to avoid local optima
Then I was reading about Simulated Annealing and its definition:
At every iteration, a random move is chosen. If it improves the situation then the move is accepted, otherwise it is accepted with some probability less than 1
So what is the main difference between the tow approaches? does the stochastic choose only random (uphill) successor? if it chooses only (uphill-successors) then how does it avoid local optima?