HILL CLIMBING ALGORITHM


Hill Climbing Algorithm | Artificial Intelligence Tutorial | Minigranth

Hill Climbing Algorithm : Introduction

  • Hill Climbing Algorithm is a technique used to generate most optimal solution for a given problem by using the concept of iteration.
  • It generates solutions for a problem and further it tries to optimize the solution as much as possible.
  • Hill climbing algorithm is similar to greedy local search algorithms and considers only the current states without thinking of next states.
  • Another reason for using hill climbing algorithm is its ability of being less complex in terms of space requirements i.e. it does not suffers space related issues as the path which had been explored previously are not stored.
 

Hill Climbing Algorithm : Stages

This image describes the curve for hill climbing algorithm used in artificial intelligence.
Hill Climbing Algorithm : The Curve
  • Local Maximum, Flat Local Maximum, Shoulder and Global Maximum are four stages in hill climbing algorithm.
  • This algorithm proceeds in upward direction of increasing value i.e. uphill. Whenever the value reaches its highest value i.e. peak, it beaks its moving up loop.

Hill Climbing Algorithm : Working

  • Firstly, Initial state is evaluated. If the initial state is goal state then, quit the process. If not, make the current state as initial state.
  • Using operation, with the help of operators among the states, new states are generated.
  • Further, evaluation of the new state is done. If the new state is somehow closer to goal state, then current state makes the new state as current state. If not, proceed with the current state and ignore this state.
  • If the current state is the goal state and no new operations are available, then quit. Else repeat the whole procedure.