title: What is a Heuristic Function
body: <p>Can someone explain in very simple words what it is. Also provide an example. So for example if u have to find the heuristic function of something how is it supposed to look like? </p>
  
  <p>Take as an example the problem: </p>
  
  <p>For the water jug problem  <a href="http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm" rel="noreferrer">http://www.math.tamu.edu/~dallen/hollywood/diehard/diehard.htm</a></p>
  
  <p>Devise and explain an admissible heuristic function (h) [not the trivial h(n) = 0]. The cost of an action is defined as 1 unit for performing the action, an additional 1 unit for moving each gallon of water (fill,
  empty, pour), and an additional 1 unit for wasting
  each gallon of water (empty). The path cost (g) is
  the sum of the cost of all the actions.</p>