If someone asked you to determine the minima of a function without any software library, hill climbing is probably the approach that you would try first.
Pseudo: RHC
Hill Climbing:
1. start with some initial point
2. access the best point in your neighbourhood
i. If the best point is better than your current candidate point, move there, go to 2.
iii. If neighbourhood is sufficiently small then terminate with candidate point
Randomised Hill Climbing:
1. Perform Hill Climbing algorithm
2. Repeat (1)
One of the downsides of this simple approach is that it requires many function evaluations compared with some of the other approaches.
However, due to the lack of knowledge or assumptions that it makes, we know that “eventually” we can land on the global optimal location!
Let’s consider the equation \(x^4 - 5x^3 + 5x^2 + 5x - 6\)