
Step 1: Evaluate the initial state, if it is goal state then return success and Stop.Less optimal solution and the solution is not guaranteed.This algorithm has the following features: It only checks it's one successor state, and if it finds better than the current state, then move else be in the same state. It only evaluates the neighbor node state at a time and selects the first one which optimizes current cost and set it as a current state.

Simple hill climbing is the simplest way to implement a hill climbing algorithm. Shoulder: It is a plateau region which has an uphill edge. It has the highest value of objective function.Ĭurrent state: It is a state in a landscape diagram where an agent is currently present.įlat local maximum: It is a flat space in the landscape where all the neighbor states of current states have the same value. Global Maximum: Global maximum is the best possible state of state space landscape. Local Maximum: Local maximum is a state which is better than its neighbor states, but there is also another state which is higher than it. Different regions in the state space landscape: If the function of Y-axis is Objective function, then the goal of the search is to find the global maximum and local maximum. If the function on Y-axis is cost then, the goal of search is to find the global minimum and local minimum. On Y-axis we have taken the function which can be an objective function or cost function, and state-space on the x-axis. The state-space landscape is a graphical representation of the hill-climbing algorithm which is showing a graph between various states of algorithm and Objective function/Cost.

Hill Climbing is mostly used when a good heuristic is available.A node of hill climbing algorithm has two components which are state and value.It is also called greedy local search as it only looks to its good immediate neighbor state and not beyond that.One of the widely discussed examples of Hill climbing algorithm is Traveling-salesman Problem in which we need to minimize the distance traveled by the salesman. Hill climbing algorithm is a technique which is used for optimizing the mathematical problems.It terminates when it reaches a peak value where no neighbor has a higher value. Hill climbing algorithm is a local search algorithm which continuously moves in the direction of increasing elevation/value to find the peak of the mountain or best solution to the problem.Next → ← prev Hill Climbing Algorithm in Artificial Intelligence
