6

In the hill climbing algorithm, the greater value, compared to the current value, is selected, but I cannot understand why it takes the larger value instead of the smaller one. Why is that?

I greatly appreciate the inclusion of figures in your answers.

nbro
  • 39,006
  • 12
  • 98
  • 176
Khan
  • 61
  • 1
  • 3
    Answer can be found [here](https://ai.stackexchange.com/questions/4000/when-to-choose-stochastic-hill-climbing-over-steepest-hill-climbing/4039#4039) – Ugnes Oct 19 '17 at 14:23

2 Answers2

3

When we climb a hill:
enter image description here

We move higher in altitude. The person who is climbing, will always look for rocks/mud on the hill that are higher, so that he can climb higher.
That is what the algorithm does too. We are assuming that there is a hill of numbers. The larger numbers are placed higher than the smaller numbers. So if we want to climb up the hill, we search for the larger numbers.
Comparing this with the real world hill climbing, simply assume that every rock on the hill has a number written on it. The number will be the altitude of the rock, from sea level height. So if you want to climb up, you just have to search for the rock with a higher number than the rock you are standing on now.

enter image description here

Nav
  • 481
  • 1
  • 5
  • 10
1

There is no reason why you can't have a hill descending algorithm, instead of finding maxima you will find minima. If that is what your aim is, it's still called a hill climbing algorithm, I guess...

solarflare
  • 324
  • 2
  • 10