This lesson introduces heuristics: problem-solving techniques that use shortcuts to find useful answers when exact methods are too slow or impractical. Understanding heuristics helps explain how search and optimization systems make decisions under limited time or resources.
A heuristic is a technique designed to solve a problem more quickly when classic methods are too slow, fail to find a solution, or are impractical for the size of the search space. It gains speed by potentially sacrificing optimality, completeness, accuracy, or precision. In that sense, it is a shortcut—not necessarily a guarantee of the best answer.
All flashcards
What is a heuristic in computer science?
A problem-solving technique that uses shortcuts or practical guidance to find a useful answer more quickly, potentially sacrificing guarantees such as optimality or completeness.
What is a heuristic function?
A function that uses available information to rank alternatives during search, helping an algorithm decide which branches or states to explore first.
Why can a good-enough solution be valuable?
It may be produced in a reasonable time when finding the exact or best solution would take prohibitively long.
How does a greedy heuristic work in TSP?
It repeatedly chooses the best-looking immediate next step. This can quickly produce a good route, but it does not guarantee the shortest overall route.
What is one way a heuristic can support an optimization algorithm?
It can provide a promising initial or seed value, giving the optimization algorithm a useful starting point and potentially improving its efficiency.
Quiz questions
How does ant colony optimization guide its search?Answer: It uses artificial pheromone information to guide choices among paths.
What limitation can cause hill climbing to stop before finding the best overall solution?Answer: It can reach a state better than its neighbors but worse than the global best.
How can simulated annealing escape a local optimum?Answer: It sometimes accepts a worse move, while gradually reducing that chance.
Which processes commonly help genetic algorithms evolve candidate solutions?Answer: Selection, crossover, and mutation applied to a population of candidates.
What can behavior-based heuristic antivirus detection do that simple string matching may miss?Answer: It can identify suspicious behavior in polymorphic or self-modifying malware.