Heuristics are rules intended to help you solve problems. When a problem is large or complex, and the optimal solution is unclear, applying a heuristic allows you to begin making progress towards a solution even though you can’t visualize the entire path from your starting point.
Suppose your goal is to climb to the peak of a mountain, but there’s no trail to follow. An example of a heuristic would be: Head directly towards the peak until you reach an obstacle you can’t cross. Whenever you reach such an obstacle, follow it around to the right until you’re able to head towards the peak once again. This isn’t the most intelligent or comprehensive heuristic, but in many cases it will work just fine, and you’ll eventually reach the peak.
Heuristics don’t guarantee you’ll find the optimal solution, nor do they generally guarantee a solution at all. But they do a good enough job of solving certain types of problems to be useful. Their strength is that …Read More