next up previous contents
Next: Greedy Solutions Up: Heuristic Problem Solving Previous: Heuristic Problem Solving

Random solutions.

The first heuristic is also the simplest: choose any random solution. For the TSP, this would be to visit the cities in random order.

This may look like a ridiculous solution. What good is a random solution? By itself, it is not much good. But consider repeatedly finding a random solution and taking the best solution as our choice. Suddenly the repeated solution doesn't look too silly. First, because it is so simple to find random solutions, we might be able to find hundreds of solutions in the time it takes another heuristic to find one. And perhaps the best of those hundred of random solutions is better than that found by a more complicated heuristic. Secondly, it is possible to run this repeated heuristic in whatever time is available. If only a short time is available, then at least some answer will be returned. If a long time is available, the heuristic keeps working, trying to find better solutions. Finally, we will be examining some heuristics that attempt to improve on a given solution. Random solutions provide an almost limitless source of new solutions to improve.

On the negative side, the answers given by a small number of random solutions will tend to be pretty bad.

This, by the way, leads to a fundamental rule of creating heuristics: Random choices are good. A heuristic with random choices can be run over and over, creating many solutions.

Completely random solutions are one implementation of this idea, though it may ignore the problem too much. Note that it ignores the problem structure completely. All it requires that anything it generates be deemed valid as a solution.



Michael A. Trick
Tue Oct 8 08:16:54 EDT 1996