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.
| Component | What it stores or does | Effect on the search |
|---|---|---|
| Neighborhood structure | Defines which moves are possible | Sets the reach of each step |
| Tabu list | Attributes of recent moves | Prevents short cycles |
| Tabu tenure | How long a move stays forbidden | Balances freedom and protection |
| Aspiration criterion | Rule that overrides tabu status | Keeps excellent moves available |
| Long-term memory | Frequency of moves or attributes | Drives diversification |
| Stopping rule | Iteration, time or stagnation limit | Ends the run |
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.
| Parameter | Common range or choice | What it influences |
|---|---|---|
| Tabu tenure | About 5 to 20, or near the square root of n | Risk of cycling versus over-restriction |
| Randomized tenure | Value drawn from an interval each move | Robustness against cycles |
| Candidate list size | Full neighborhood or a sampled subset | Cost per iteration |
| Iteration limit | Thousands to millions of moves | Solution quality and runtime |
| Diversification trigger | No improvement for a set number of moves | Escape from stagnant regions |
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 compared with related metaheuristics
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.
| Method | How it escapes local optima | Typical strength |
|---|---|---|
| Hill climbing | It does not escape without restarts | Very fast, very simple |
| Simulated annealing | Accepts worse moves with a temperature-based probability | Easy to implement, few parameters |
| Tabu search | Accepts the best admissible move and forbids recent reversals | Strong on structured combinatorial problems |
| Genetic algorithm | Recombines a population of solutions | Broad exploration of diverse regions |
| Branch and bound | Exact enumeration with pruning | Proven optimality on small instances |
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.
| Situation | Recommended choice | Reason |
|---|---|---|
| Very large neighborhood | Candidate list strategy | Limits the cost of each iteration |
| Frequent revisits of the same solution | Reactive or randomized tenure | Breaks cycles automatically |
| Search stalls in one region | Frequency-based diversification | Penalizes overused attributes |
| Promising elite solutions found | Intensification with path relinking | Explores between good solutions |
| Hard constraints are difficult to satisfy | Penalty-based infeasible moves | Lets the search cross infeasible areas |
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.