I am trying to put a water jug problem into a heuristic function but I am finding some problems.
There are 2 jugs, one that can hold 5(x) and others that can hold 3(y) gallons of water. The goal is (y,x)=(0,4).
I can't figure out how to put it into a heuristic function and also I have a doubt about the number of states. If I admit the actions (fill one from the faucet, empty one to the drain, and pour from one to the other until either the receiving jug is full or the pouring jug is empty), there are 15 possible states, but if I consider all the possibilities regarding the number of gallons, there are 24 possibilities. Is that correct?
I think that the Heuristic function for this problem can be defined as:
h(x,y) = (x * 5) + (y * 3)
Can anyone explain it to me, please?
max(estimate_from_parent - action_cost, estimate_from_this_node)