I'm trying to understand the difference between these two algorithms and how they differ in solving a problem. I have looked at the algorithms and the internals of them. It would be good to hear from others who already experienced with them. Specially, I would like to know how they would behave differently on the same problem.
Thank you.
The main difference
between the two is the direction
in which they move to reach the local minima (or maxima).
Hill Climbing
we move only one element
of the vector space
, we then calculate the value of function and replace it if the value improves. we keep on changing one element of the vector till we can't move in a direction such that position improves. In 3D sapce
the move can be visualised as moving in any one of the axial direction
along x,y or z axis
.Gradient Descent
we take steps in the direction of negative gradient
of current point to reach the point of minima
(positive in case of maxima). For eg, in 3D Space
the direction need not
to be an axial direction
.