Tabu search

On this page 7

Tabu search is a metaheuristic for combinatorial optimization that improves a solution through repeated neighborhood moves while keeping a short-term memory of forbidden moves, so the search can climb out of local optima instead of returning to them. In optimization for artificial intelligence, it serves as a practical tool for scheduling, routing, assignment and configuration problems where exact methods such as branch and bound become too slow.

The method was introduced by Fred Glover in 1986 as an extension of local search. Its defining idea is simple: always move to the best admissible neighbor, even if it is worse than the current solution, and temporarily forbid moves that would undo recent progress. This deliberate acceptance of worsening moves separates it from plain hill climbing.

How tabu search explores the solution space

Tabu search works by evaluating a neighborhood of candidate moves around the current solution at every iteration and selecting the best one that is not forbidden. A move might swap two cities in a traveling salesman tour, reassign one job to a different machine, or flip one binary variable. The chosen move is applied even when it worsens the objective function, which allows the search to leave a basin of attraction.

After each move, its attributes are stored in the tabu list. For a fixed number of iterations, called the tabu tenure, any move that would restore those attributes is declared tabu. Without this memory, a search that accepts worsening moves would often cycle back to the same local optimum within two or three steps.

The following table lists the core components of a standard implementation and the role each one plays in the search.

ComponentWhat it stores or doesEffect on the search
Neighborhood structureDefines which moves are possibleSets the reach of each step
Tabu listAttributes of recent movesPrevents short cycles
Tabu tenureHow long a move stays forbiddenBalances freedom and protection
Aspiration criterionRule that overrides tabu statusKeeps excellent moves available
Long-term memoryFrequency of moves or attributesDrives diversification
Stopping ruleIteration, time or stagnation limitEnds the run
Core components of tabu search

Memory structures and key parameters

The strength of tabu search lies in its adaptive memory, which operates on several time scales. Short-term memory blocks recent moves, intermediate-term memory records features of elite solutions for intensification, and long-term memory counts how often attributes appear so the search can be pushed toward unexplored regions during diversification.

The aspiration criterion is the most common safeguard: a tabu move is allowed if it produces a solution better than the best found so far. This rule matters because tabu lists store attributes rather than full solutions, so they occasionally forbid moves that lead to unvisited and excellent solutions.

The table below summarizes typical parameter choices. Exact values depend on problem size and neighborhood design, so they should be tuned on representative instances rather than copied.

ParameterCommon range or choiceWhat it influences
Tabu tenureAbout 5 to 20, or near the square root of nRisk of cycling versus over-restriction
Randomized tenureValue drawn from an interval each moveRobustness against cycles
Candidate list sizeFull neighborhood or a sampled subsetCost per iteration
Iteration limitThousands to millions of movesSolution quality and runtime
Diversification triggerNo improvement for a set number of movesEscape from stagnant regions
Typical tabu search parameters

A tenure that is too short invites cycling, while a tenure that is too long forbids too many moves and can make the search miss good nearby solutions. Reactive tabu search addresses this by increasing the tenure automatically when repeated solutions are detected and shrinking it when the search runs freely.

Tabu search belongs to the family of trajectory-based metaheuristics, which follow a single solution through the search space. Its closest relatives are hill climbing and simulated annealing, but the mechanism for escaping local optima differs in an essential way: tabu search relies on deterministic memory, whereas simulated annealing relies on probabilistic acceptance.

MethodHow it escapes local optimaTypical strength
Hill climbingIt does not escape without restartsVery fast, very simple
Simulated annealingAccepts worse moves with a temperature-based probabilityEasy to implement, few parameters
Tabu searchAccepts the best admissible move and forbids recent reversalsStrong on structured combinatorial problems
Genetic algorithmRecombines a population of solutionsBroad exploration of diverse regions
Branch and boundExact enumeration with pruningProven optimality on small instances
Comparison with neighboring local search methods

Because tabu search evaluates the whole neighborhood or a large candidate list, each iteration is more expensive than a simulated annealing step. In exchange, it usually needs far fewer iterations to reach high-quality solutions, which is why it performs well on problems with cheap move evaluation.

Where tabu search is used and how to configure it

Tabu search is applied wherever a problem has a discrete solution space and a natural notion of small changes. Classic applications include the vehicle routing problem, job-shop scheduling, quadratic assignment, graph coloring and timetabling. In machine learning, it appears in feature subset selection, neural architecture search and discrete hyperparameter tuning.

The decision table below links common situations to configuration choices that practitioners typically adopt.

SituationRecommended choiceReason
Very large neighborhoodCandidate list strategyLimits the cost of each iteration
Frequent revisits of the same solutionReactive or randomized tenureBreaks cycles automatically
Search stalls in one regionFrequency-based diversificationPenalizes overused attributes
Promising elite solutions foundIntensification with path relinkingExplores between good solutions
Hard constraints are difficult to satisfyPenalty-based infeasible movesLets the search cross infeasible areas
Configuration choices by situation

A key design decision is the move evaluation. Efficient implementations compute the change in the objective incrementally, known as delta evaluation, instead of recomputing the full cost. This single choice often decides whether tabu search is practical on a given instance size.

Limitations and common mistakes

Tabu search offers no guarantee of global optimality, and its performance depends heavily on problem-specific design. The following points cover the most frequent weaknesses seen in practice.

  • Poor neighborhood design limits quality more than any parameter setting.
  • Storing full solutions in the tabu list is costly; storing move attributes is the usual approach.
  • Omitting the aspiration criterion can block the very move that leads to a new best solution.
  • Expensive objective evaluation makes full neighborhood scans impractical without candidate lists.
  • Continuous problems are a poor fit, because gradient-based methods or Bayesian optimization usually perform better.

Another misconception is that tabu search is a fixed algorithm. It is better described as a framework of memory-based strategies, and strong results usually come from hybrids that combine it with constructive heuristics, path relinking or exact subproblem solvers.

Put simply

Imagine searching for the lowest point in a hilly landscape while walking in fog. Plain local search stops at the first dip. Tabu search keeps walking, even uphill, to find deeper valleys elsewhere.

To avoid walking in circles, it keeps a short list of recent steps and refuses to undo them for a while. It is like marking paths you just tried with chalk. The marks fade after some time, so old paths open again. The result is a good answer found quickly, though never a guaranteed perfect one.

In practice

A regional delivery company plans routes for 40 vans serving about 1,200 stops each morning, with time windows and vehicle capacity limits. An exact solver cannot finish within the 15-minute planning window, so the operations team uses tabu search on top of a quick initial route plan.

Each move relocates one stop to another route or swaps two stops between routes. Recently moved stops stay tabu for a randomized tenure of 10 to 20 iterations, and a tabu move is accepted only when it beats the best plan so far. Delta evaluation keeps each iteration fast enough to run tens of thousands of moves.

Compared with the initial plan, the final routes typically cut total driving distance by several percent and remove most time window violations. The gain translates into fewer vans on the road and lower fuel costs, without changing the planning schedule.