Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligencealgorithmInteractive simulation

Tabu Search

Local search with a short-term memory that forbids recently visited moves.

The idea

Like hill climbing, but it always moves to the best allowed neighbour even if that is worse, and it keeps a "tabu list" of recent moves it may not undo. The memory stops it cycling back into the same local peak, pushing exploration onward.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

  • current
  • tabu (recent)
  • best ever

Move to the best neighbour that is not on the tabu list (red), even if it is worse than now.

best:
0.543
1/71

Dark spots on the map are poor settings; bright spots are good. One of the peaks is the tallest.

Step by step

  1. 1Start from an initial solution.
  2. 2Look at all neighbours that are not tabu.
  3. 3Move to the best one, even if it is worse than now.
  4. 4Add the move to the tabu list and drop the oldest entry.
  5. 5Remember the best solution ever seen and repeat.

Where it is used

Scheduling, routing and assignment problems.

Watch out for

List length is a tuning knob: too short and it cycles, too long and it wanders.

Related