up previous next
Up: 3 The Great Deluge Previous: 3.3 Decreasing the tyde Next: 4 Ant Algorithm


3.4 The end of the algorithm

After the tyde has decreased it is checked if the current path is at the surface. If it is, the algorithm is at its' end and the best solution can be used. The current path must not be the best solution, because we can have once visited the deepest valley and are now stuck in a local valley somewhere else.
But if the current path is beneath the surface we go back to ''finding a new path'' and repeat this until there is no water to breath or the user stopped the algorithm.