what is the stopping condition of Hill climbing algorithm code example
Example: When will Hill-Climbing algorithm terminate?
It terminates when it reaches a peak value where no neighbor has a higher value.
It terminates when it reaches a peak value where no neighbor has a higher value.