I am a little confused with Hill Climbing algorithm. I want to \"run\" the algorithm until i found the first solution in that tree ( \"a\" is initial and h and k are final state
You could try to use a technique called simulated annealing to prevent your search to get stuck on to local minimums. Essentially, in simulated annealing, there is a parameter T
that controls your likelihood to make a move to sub-optimal neighborhood states. If T
is high, you are more likely to make a sub-optimal move to a neighboring state and thereby might escape a local minimum when stuck there, which you wouldn't if you used normal hill climbing.