Heuristic Computing

Mar 26, 2025

Human’s ignorance makes one not able to present an algorithm for the exact nature of a certain task. For instance, write a realistic fiction or paint a expressionist canvases. The enough information is unknown for an algorithm to be invented to capture the nature of them. Those tasks may involve multiple variables and parameters that interacts in a nontrivial way. Indeed, comprehending the full nature of these interactions may well exceed human’s cognitive capacity.

Even if one understands the problem well enough, and possesses knowledge to solve the problem domain, the amount of resources needed to execute the algorithm may be simply infeasible. Playing the game of chess is a case in point. Apart from professional practice, even ordinary activities: making decision about job offer, planning a holiday trip is not conductive to a efficient algorithmic solution.

And yet people go about these tasks and solving it. They do not wait for algorithms, efficient or otherwise. Algorithms are not always there for our ways of thinking. What other computational means there for us?

Heuristics are rules, precepts, principles, hypotheses based on common sense, experience, judgement, analogies, etc.

How to deploy heuristics in automatic computation?

There’s element of uncertainty in heuristics search. Heuristic do not guarantees success.

Consider the following scenario. You are searching a empty spots in a large parking area. You have no idea of distribution of empty spots. All you can do is just search. But rather search aimlessly, you may have a strategy:

  1. “first fit”: pull into the first empty spot you encountered
  2. “best fit”: find a empty spot that is nearest to your destination. There is a tradeoff. The “first fit” may reduce the time for searching but you have to walk a long way to the destination. The “best fit” may demand longer searching time but you could get a shortest walk time if it success. Neither way is guaranteed to success.

Satisfaction

Many strategies that deploys heuristic only give a nearly right answer. Instead of pursuing the goal of optimality, the agent may aspire to achieve more reasonable goals that are less than optimal but are acceptably good. The problem is solved if the solver is satisfied.

So, in short, heuristics is to choose a reasonable good over the infeasible best.

For a example of chess, it is heuristic to limit the recursion level to an acceptably degree to compute a good move.

General model of a heuristic search

A problem is to solved by first represent the problem in a symbolic system. This representation is typically denote the initial state and goal state. Elements from knowledge space are selected an applied to a “current state” in the problem space. The successive application of knowledge result in a search for a solution through the problem space, beginning at the initial state to reach the goal state.

The heuristic paradigm manifest when evaluating these two space. In general, when the problem space is poorly understood, weak methods are more promising; when the problem space is known in more detail strong methods are more appropriate.