Reputation: 23322
When using Steepest Hill Climbing Search, what happens when you reach an infinite loop - that is, you find yourself going back and forth between the same two states because they are both the best successors to eachother?
For example, in the graph below, (J)
will go to (K)
and vice versa repeatedly.
If I was programming it, I guess I would put some sort of flag on the visited states so I know if I'm revisiting the same one. However, there is no mention of this in the documentation (i.e here, here) about the Steepest Hill Climbing algorithm.
Upvotes: 0
Views: 4428
Reputation: 21
In this question, we can see the starting node as A and ending node as M, that's one thing.
We have the total heuristic sum as: (7+3+3+0) = 13.
Route Followed here: A->C->G->M
Upvotes: 2
Reputation: 65447
If it's pure hill climbing, then you ignore non-improving moves, and there are no cycles. If it's supposed to be finding the global optimum, then there should be some other mechanism for escaping local maxima (random moves, restarts, etc.).
Upvotes: 3