Module 2 - AIDS1 - Hill Climbing in AI
Module 2 - AIDS1 - Hill Climbing in AI
Hill Climbing is a form of heuristic search algorithm which is used in solving optimization
related problems in Artificial Intelligence domain. The algorithm starts with a non-optimal
state and iteratively improves its state until some predefined condition is met. The condition
to be met is based on the heuristic function. The aim of the algorithm is to reach an optimal
state which is better than its current state. The starting point which is the non-optimal state is
referred to as the base of the hill and it tries to constantly iterate (climb) untill it reaches the
peak value, that is why it is
● Greedy Approach: The algorithm moves in the direction of optimizing the cost i.e.
finding Local Maxima/Minima
● No Backtracking: It cannot remember the previous state of the system so
backtracking to the previous state is not possible
● Feedback Mechanism: The feedback from the previous computation helps in
deciding the next course of action i.e. whether to move up or down the slope
Solution: Back Propagation can mitigate the problem of Local maximum as it starts
exploring alternate paths when it encounters Local Maximum
2. Ridge
Ridge occurs when there are multiple peaks and all have the same value or in other words,
there are multiple local maxima which are same as global maxima
Solution: Ridge obstacle can be solved by moving in several directions at the same time
3. Plateau
Plateau is the region where all the neighbouring nodes have the same value of objective
function so the algorithm finds it hard to select an appropriate direction.
Solution: Plateau obstacle can be solved by taking making a big jump from the current state
which will land you in non-plateau region
● The algorithm results in sub-optimal solutions and at times the solution is not
guaranteed
Algorithm
1. Examine the current state, Return success if it is a goal state
2. Continue the Loop until a new solution is found or no operators are left to apply
5. Exit
Algorithm
2. Continue the Loop until a new solution is found or no operators are left to apply
Let ‘Temp’ be a state such that any successor of the current state will have a higher value for
the objective function. For all operators that can be applied to the current state
Hill Climbing Algorithm is a very widely used algorithm for Optimization related problems
as it gives decent solutions to computationally challenging problems. It has certain drawbacks
associated with it like its Local Minima, Ridge, and Plateau problem which can be solved by
using some advanced algorithm.
Local maxima