I have a problem in Hill Climbing algorithm with Water Jug Problem :
Given two jugs, one of which can accommodate X liters of water and the other which can accommodate Y liters of water, determine the number of steps required to obtain exactly D liters of water in one of the jugs.
From the start state, (X,Y) = (0,0), it can generate some states :
- (X,Y) = (0,Y)
or - (X,Y) = (X,0)
And from these states, it can generate others until the end state that is either (X,D) or (D,Y).
So, Can I estimate the heuristic function for this problem? How to know which state is better than others?
Thank you everyone.