Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 42

Implementing Tabu Search: Tabu List and Aspiration Criteria

Recommended resources

Hello! Welcome to our lesson on Tabu Search.

In our last session, we explored Simulated Annealing (SA), a metaheuristic that uses probability to escape local optima, mimicking the cooling of a physical system. We saw how it balances exploration and exploitation by adjusting a "temperature" parameter.

Today, we delve into another powerful single-solution metaheuristic: Tabu Search (TS). Our goal is to implement the core components of a Tabu Search algorithm, including the tabu list and aspiration criteria. Unlike SA's probabilistic nature, TS uses a form of deterministic memory to guide its search. It intelligently forbids, or makes "tabu," certain moves to prevent getting stuck in local optima and to avoid endlessly repeating cycles of moves. This memory-driven approach makes it a highly effective and widely applied method for tackling complex scheduling problems like the Flexible Job Shop.

1. The Philosophy of Tabu Search

At its core, Tabu Search is an enhanced form of local search. A simple local search algorithm (like hill climbing) often gets stuck because it will only accept improving moves. Once it reaches a local optimum, where all neighboring solutions are worse, the search stops.

Tabu Search overcomes this by a simple but profound rule: at each step, it moves to the best available neighbor, even if that neighbor is worse than the current solution. This allows it to "walk away" from local optima.

However, this raises a new problem: if you just moved from solution A to a worse solution B, the best move from B might be to go right back to A, creating a simple 2-move cycle. To prevent this, TS introduces memory.

Let's watch a short video that introduces this core concept.

073 Tabu search introduction | Computer Monk 🔴

The video '073 Tabu search introduction' from the Computer Monk channel provides a concise overview of what Tabu Search is and why its memory mechanism is necessary.

Please watch from the beginning to 02:47. This section explains the basic idea behind TS: accepting non-improving moves and using a 'tabu list' to prevent the search from immediately reversing its steps.

This brings us to the central components of the algorithm: the mechanisms that implement this "memory".


2. The Core Components: Short-Term Memory

The intelligence of Tabu Search resides in its use of memory structures. The most fundamental of these is the short-term memory, which is composed of a tabu list and a tabu tenure.

Components and Basic Procedure of Tabu Search
This image provides a clear summary of the key components needed to design a Tabu Search algorithm, alongside a general pseudo-code for its procedure. The list on the left highlights the design choices, while the code on the right illustrates the iterative process of selecting neighbors, checking their tabu status, and updating the tabu list.

2.1. The Tabu List: Remembering What to Forbid

The tabu list is the mechanism that prevents cycling. However, storing a list of entire solutions that have been recently visited is computationally expensive and memory-intensive. Instead, TS stores attributes of the moves that were made.

For a scheduling problem, a "move" might be swapping the positions of job A and job B on machine M1. The attribute stored in the tabu list could be:

  • The pair of jobs (A, B).
  • The specific operation that was moved.
  • The position that an operation was moved out of.

By making an attribute tabu, TS forbids any move that possesses that attribute for a certain period. For example, if we swap A and B, we might forbid swapping B and A for the next few iterations.

TutORial: Tabu and Scatter Search: Principles and Practice

For your thesis, it's important to understand this distinction between storing solutions and storing attributes. This next video segment, from a tutorial by leading experts in the field, explains this concept of 'recency-based attributed memory'.

Please watch from 12:57 to 18:59. The first part (until 15:05) explains the basic algorithm flow, emphasizing that TS searches a reduced neighborhood. The second part (from 15:56) explains why storing explicit solutions is a bad idea and introduces the more practical approach of storing attributes of moves.

2.2. Tabu Tenure: The Duration of Memory

An attribute doesn't stay tabu forever. The tabu tenure defines how many iterations an attribute remains on the tabu list. It is a critical parameter that balances preventing short-term cycles with allowing the search to revisit promising areas later on.

  • A short tenure might not be enough to prevent cycling.
  • A long tenure can be too restrictive, preventing the search from making good moves and overly constraining its exploration.

The tenure can be a fixed number (e.g., 7 iterations) or it can be dynamic, changing as the search progresses. For your thesis work, experimenting with different tenure strategies is a common part of algorithm design.

TutORial: Tabu and Scatter Search: Principles and Practice

Let's continue with the same tutorial to see a discussion of tabu tenure and the different design choices available.

Watch the segment from 20:51 to 22:44. It explains the concept of tabu tenure and highlights different implementation strategies like fixed, dynamic, and even asymmetric tenures.


3. Aspiration Criteria: When to Break the Rules

Forbidding moves is a powerful strategy, but what if a tabu move leads to an outstanding new solution? It would be unwise to ignore it simply because it's on the forbidden list. This is where aspiration criteria come in.

An aspiration criterion is a rule that allows a tabu status to be overridden. The most common and intuitive aspiration criterion is:

If a tabu move results in a solution with a better objective value than any solution found so far in the entire search (the "best-so-far" solution), its tabu status is ignored, and the move is allowed.

This ensures that the search doesn't miss out on discovering a new global best solution because of its own rules.

Metaheuristics and scheduling - GERAD

The concept of aspiration criteria is a key part of TS. The following chapter provides a clear, formal description of the tabu search method, including its ingredients like the aspiration function.

Please read section 3.4.2.3. Tabu search (up to the 'Neighborhood' subsection). Pay close attention to the descriptions of the tabu list and the aspiration function. The text clearly explains how the aspiration function allows the search to cancel a tabu status.

Test your understanding!

You are using TS to minimize makespan for a job shop problem. Your current best-ever makespan is 150. You are at a solution with a makespan of 165. The neighborhood of your current solution contains three moves:

  1. Move 1: Leads to a makespan of 162. This move is not tabu.
  2. Move 2: Leads to a makespan of 158. This move is tabu.
  3. Move 3: Leads to a makespan of 148. This move is also tabu.

Which move will the TS algorithm select, and why?

Show answer

The TS algorithm will select Move 3. Here's the reasoning:

  1. Evaluate non-tabu moves: The best non-tabu move is Move 1 (makespan 162).
  2. Evaluate tabu moves against aspiration criteria:
    • Move 2 (makespan 158) is tabu. Since 158 is not better than the best-ever makespan of 150, the aspiration criterion is not met. The move remains forbidden.
    • Move 3 (makespan 148) is tabu. However, since 148 is better than the best-ever makespan of 150, the aspiration criterion is met. The tabu status is overridden, and this move becomes a candidate.
  3. Select the best candidate: The algorithm compares the best non-tabu move (Move 1, value 162) with any tabu moves that met the aspiration criterion (Move 3, value 148).
  4. Since 148 is better than 162, the algorithm selects Move 3, updates the current solution, and sets the new best-ever makespan to 148.

4. Applying Tabu Search to Scheduling

Now, let's connect these concepts directly to your thesis topic. How would you apply TS to a Job Shop or Flexible Job Shop problem? The GERAD paper you just looked at provides an excellent, detailed example.

For a job shop problem, the key design choices are:

  • Solution Representation: A feasible ordering of operations on each machine.
  • Neighborhood Move: A common and effective move is to take an operation on a critical path (a sequence of operations that determines the makespan) and move it. For example, swapping two adjacent critical operations on the same machine.
  • Tabu Attribute: When two operations, i and j, are swapped, the pair (i, j) or simply operation i could be added to the tabu list to prevent it from being moved back immediately.
  • Objective Function: The makespan, .

Metaheuristics and scheduling - GERAD

The GERAD chapter 'Metaheuristics and scheduling' presents the TOMATO algorithm, a concrete implementation of Tabu Search for a job shop problem with complex tooling constraints. This serves as an excellent case study for your thesis, showing how to instantiate the TS components in a sophisticated scheduling environment.

Please read sections 3.5. An application example... and 3.5.4. TOMATO algorithm. Focus on how the authors define the problem and the neighborhood structure for the job shop. In the TOMATO algorithm section, note how they define the tabu list, the tenure (randomly chosen from an interval), and the overall iterative process. This is a practical template for a research paper or thesis chapter.

This example demonstrates how the general framework of Tabu Search can be tailored with problem-specific knowledge (like critical paths and specialized neighborhood structures) to create a high-performing algorithm for a difficult, real-world problem.


Conclusion

In this lesson, we have unpacked the core mechanisms of Tabu Search, a metaheuristic that uses memory to navigate complex search spaces with remarkable effectiveness.

Key Takeaways:

  • Tabu Search (TS) is a local search method that always moves to the best neighboring solution, even if it's non-improving.
  • It uses a tabu list, a short-term memory of move attributes, to forbid recent moves and prevent cycling.
  • The tabu tenure determines how long an attribute remains forbidden and is a key parameter for tuning the algorithm's performance.
  • Aspiration criteria provide a mechanism to override a tabu status, ensuring that exceptionally good moves are not missed. The most common criterion is aspirating to a new best-so-far solution.
  • For scheduling problems, TS is applied by defining a neighborhood structure (e.g., swapping critical operations) and corresponding tabu attributes.

Preview of the Next Lesson:

So far in this module, we have covered three powerful metaheuristics: Genetic Algorithms, Simulated Annealing, and now Tabu Search. These are all heuristic methods, designed to find very good, but not necessarily optimal, solutions in a reasonable amount of time.

In the next module, we will shift gears and begin our study of Constraint Programming (CP). CP is an exact optimization paradigm. Instead of searching for solutions via neighborhood moves, it works by systematically reducing the set of possible solutions through logical inference and propagation. This will provide you with a powerful new way to model and solve scheduling problems, which can also be combined with metaheuristics to create even more powerful hybrid methods.