When will Hill-Climbing algorithm terminate? 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.