Javatpoint Logo
Javatpoint Logo

What is a TABU Search?

Tabu search is a metaheuristic algorithm employed to solve optimization issues. Its name is derived from the Arabic word "tabu," which denotes anything banned. By keeping a short-term memory of the search process and utilizing this knowledge to direct the search toward promising regions, the Tabu search is made to explore the solution space efficiently.

Starting with one answer, the algorithm iteratively examines the surrounding solutions by making certain adjustments or modifications. It assesses each neighbour's quality based on an objective function or assessment criteria particular to the current issue. The goal is to select the optimal solution or to maximize a particular objective function.

Using a tabu list is one of the tabu search's distinguishing characteristics. The search is prevented from returning to the exact solutions or being bogged down in loops by this list, which maintains track of the movements or transformations that have recently been used. The tabu list ensures the diverse search process, enabling the exploration of a larger solution space.

In addition to the tabu list, tabu search employs several other methods to direct the search process successfully. These include intensification methods that take advantage of potential locations, diversification strategies that stimulate investigation of other sections of the solution space, and ambition criteria that permit specific tabu actions to be performed in certain situations.

It is possible to use the tabu search method to solve various optimization issues, including combinatorial optimization, scheduling issues, and routing issues. Its efficacy comes from its ability to balance exploration and exploitation, enabling it to provide high-Caliber results even in challenging and complex search environments.

The usage of explicit memory serves two purposes in Tabu Search, which are as follows:

  • To prevent the search from going over already-visited solutions again.
  • To explore the unvisited areas of the solution space.

In many different fields, optimization issues are solved via tabu search. It is a flexible method that may be used to solve various issues when determining the best answer or optimizing a specific objective function is necessary. The following are some popular uses for tabu search:

Optimal Combinatorial Design:

  • The Travelling Salesman Problem (TSP) involves determining the quickest path for a salesperson visiting several places.
  • Choosing the best routes for a fleet of vehicles to provide products or services is known as the vehicle routing problem (VRP).
  • Choosing a subset of objects having the most outstanding value out of a limited number is known as the "knapsack problem."

Timetabling and Scheduling:

  • Choosing the sequence of activities on machines to maximize production effectiveness is known as job shop scheduling.
  • Assigning responsibilities and resources to projects to achieve deadlines and cut expenses.
  • Exam scheduling: Planning tests for students while considering limitations like room availability and student preferences.

Routing and network issues:

  • Network Design: Choosing the best configuration or architecture for a network infrastructure to save costs or increase performance.
  • Facility Location: To save transportation costs, establish the best locations for facilities, such as distribution centers or warehouses.
  • Network Routing: Network routing is known as finding the optimum paths or routes for data, products, or services to flow across a network while considering a variety of limitations.

Graph Theory and Graph Coloring:

  • Graph Coloring: Colouring a graph involves giving each vertex a different color such that no two neighboring vertex have the same color.
  • Maximum Clique Problem: Finding the biggest group of vertices in a graph where each pair of vertices is linked is the maximum clique problem.

Problems with constraint satisfaction:

  • Eight Queens: Finding a way to arrange eight queens on a chessboard without endangering one another.
  • Sudoku: Filling a 9x9 grid with numbers according to set rules and restrictions.

Benefits of using Tabu Search:

  • Exploring the solution space effectively enables the algorithm to avoid local optima.
  • Flexible and capable of being adapted to varied optimization issues.
  • Can deal with limited, discrete, and combinatorial issues.
  • Utilizing search history effectively is ensured by memory-based techniques.
  • Generally delivers high-quality answers promptly.

Limitations and Things to Think About:

  • The issue characteristics and parameter choices significantly impact Tabu search performance.
  • The size of the solution space and the complexity of the evaluation function can impact how well a search is conducted.
  • For some issues, choosing suitable neighborhood structures might be difficult.
  • While tabu search doesn't always yield the best results, it frequently does.

Numerous real-world optimization issues in various disciplines, such as logistics, manufacturing, telecommunications, and scheduling, have been solved using tabu search. It is a well-liked option among academics and practitioners in the optimization sector due to its effectiveness in exploring and using the solution space.

How to Use Tabu Search to Improve an Algorithm?

Using a limited number of iterations and a tabu list, optimize a solution using the Tabu Search method to discover the optimal solution that reduces the fitness value of the objective function for a given starting solution.

By evaluating their fitness with an objective function and creating close solutions using a neighborhood function, the code uses Tabu Search to study solutions repeatedly. It avoids going back to previously studied alternatives and instead uses a tabu list to find the best solution with the lowest fitness after a set number of iterations.



Best Solution: ['A', 'B', 'C', 'D', 'E']
Total Distance: 19


The Travelling Salesman Problem (TSP) is solved using the Tabu Search algorithm implemented in the code above. The objective of the TSP, a well-known optimization problem, is to determine the quickest path for a salesperson to visit several cities and return to the beginning location.

The TSP issue data, which includes a list of cities and their respective distances, is defined in the code's first line. The tabu tenure (the number of iterations a move remains tabu) and the maximum number of iterations are configured as tabu search parameters.

The method begins by setting the initial best solution as the current solution and initializing the current solution at random. The entire distance a particular solution covers is determined by the evaluate() function.

The primary Tabu Search loop repeatedly creates neighboring solutions by swapping two cities in the present solution. It assesses each neighbor solution's fitness (total distance). It chooses the best neighbor solution not on the tabu list and has a higher fitness rating than the current best solution.

The current solution is updated with the best neighbor solution, and the best solution is updated if the best neighbor solution is fitter than the current best solution. The move (neighbor solution) is added to the tabu list, and the oldest move is eliminated if the tabu list is longer than the tabu tenure.

Until the maximum number of iterations is achieved, the loop keeps running. The best solution is then generated together with the distance it covers.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA