# 禁忌搜索

禁忌搜索（Tabu search）是一种元启发式优化方法：它通过反复从当前解移动到一个邻域解来探索解空间，同时借助记忆结构避免重访近期走过的移动，目标是在某个待最小化的目标函数度量下取得好解。<sup>[1](https://leeds-faculty.colorado.edu/glover/fred%20pubs/228%20-%20TS%20-%20Users%20Guide%201993.pdf)</sup> 它的设计初衷是让局部搜索越过局部最优——那正是朴素爬山法止步的地方。其显著特征是自适应记忆：短期记忆禁止近期被反向的移动，而较长期的记忆则或在有吸引力的区域周围强化搜索，或把搜索引向尚未探索的区域。<sup>[2](https://dl.acm.org/doi/10.1287/inte.20.4.74)</sup>

| 关键事实 | 细节 |
|---|---|
| 核心机制 | 禁忌表在若干次迭代的期限内禁止近期移动；渴望准则对能改进解的移动撤销禁忌<sup>[3](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)</sup> |
| 记忆维度 | 近期性、频率、质量、影响<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup> |
| 提出 | 弗雷德·格洛弗（Fred Glover），1986年，同一篇论文中还创造了“元启发式”一词<sup>[5](https://doi.org/10.1016/0305-0548%2886%2990048-1)</sup> |
| 典型期限 | 经验上取决于实例规模；例如作业车间混合方法中 \( L = 10 + n/m \)，线性排序中 \( 2\sqrt{m} \)<sup>[6](https://link.springer.com/article/10.1007/s40747-025-02026-0)</sup><sup> • </sup><sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> |
| 与模拟退火相比 | 孰优取决于目标质量与实例规模；在QAP上存在一个阈值 \( Q^{*} \) 把两种情形分开<sup>[8](https://ar5iv.labs.arxiv.org/html/1010.0157)</sup> |

## 工作原理

基本原理是：允许非改进的移动，从而让局部搜索越过局部最优继续下去，同时防止搜索绕回此前访问过的解。<sup>[9](https://sci2s.ugr.es/sites/default/files/files/Teaching/OtherPostGraduateCourses/Metaheuristicas/TabuSearch.pdf)</sup> 禁忌表记录近期的移动，并在指定次数的迭代内禁止它们，这一迭代次数即禁忌期限；正是这种基于近期性的短期记忆打破了循环。<sup>[3](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)</sup> 渴望准则在执行被禁忌的移动显然会有帮助时撤销禁忌：最简单也最常见的规则是，若某个禁忌移动能产生优于已知最优解的解，就接纳它；而统摄性的规则是，只要循环不可能发生，禁忌就可以不予理会。<sup>[9](https://sci2s.ugr.es/sites/default/files/files/Teaching/OtherPostGraduateCourses/Metaheuristicas/TabuSearch.pdf)</sup>

除短期表之外，记忆还沿四个主要维度运作：近期性、频率、质量与影响。<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup> 长期频率记忆支撑强化（加强有吸引力的解的构件）与多样化（把搜索引向访问较少的区域）。<sup>[2](https://dl.acm.org/doi/10.1287/inte.20.4.74)</sup> 期限长度本身就编码了强化与多样化之间的权衡：短期限允许在局部最优附近探索，长期限则有助于挣脱其邻近区域；而在不同迭代上从一个合适的取值区间内抽取不同的期限值，其表现与选定单一最佳值相当。<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup>

## 具体做法

格洛弗第一部分表述中的标准循环如下。<sup>[10](https://leeds-faculty.colorado.edu/glover/fred%20pubs/196%20-%20TS%20-%20Part%20I-ORSA-aw.pdf)</sup>

1. 选取初始解 x，置最优解 \( x^{*} = x \)，初始化迭代计数器，并令禁忌表 T 从空表开始。
2. 若可行移动集 \( S(x) - T \) 为空，转至终止或松弛步骤；否则计数器加一，并在 \( S(x) - T \) 中选择使目标函数在该集合上最优的移动 \( s \)。
3. 执行该移动，更新 \( x \)，若有所改进则更新 \( x^{*} \)；更新 \( T \)（加入新移动，删去期限已过的移动）。
4. 在达到选定迭代次数后停止，或在 \( S(x) - T \) 为空时停止。

最大迭代次数与无改进迭代次数是最常用的停止准则。<sup>[3](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)</sup> 在实践中，邻域的定义主导着计算代价：例如作业车间研究使用了一系列关键路径邻域，从交换两个相邻工序，一直到包含关键路径之外的移动的结构。<sup>[6](https://link.springer.com/article/10.1007/s40747-025-02026-0)</sup> 期限靠经验设定。已发表的设置包括：二次分配问题中禁忌表长度取 0.9N 至 1.1N、渴望参数取 \( 2N^{2} \)，<sup>[8](https://ar5iv.labs.arxiv.org/html/1010.0157)</sup> 2025年一项作业车间混合方法中动态表长度 \( L = 10 + n/m \) 在 \( [L, 1.5L] \) 内选取，<sup>[6](https://link.springer.com/article/10.1007/s40747-025-02026-0)</sup> 以及线性排序问题中 \( \mathrm{TabuTenure} = 2\sqrt{m} \)。<sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> 没有任何单一规则能为所有问题类别给出有效的期限；期限过小会引起循环（表现为目标值周期性地重复），期限过大则导致解的质量下降。<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup>

## 起源

弗雷德·格洛弗于1986年提出禁忌搜索，文章题为《整数规划的未来路径及其与人工智能的联系》，发表在《计算机与运筹学》上，也正是在这篇论文中他创造了“元启发式”一词。<sup>[5](https://doi.org/10.1016/0305-0548%2886%2990048-1)</sup><sup> • </sup><sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> 最初提案中的许多要素，包括用以阻止近期移动被反向的短期记忆、用以强化有吸引力构件的长期频率记忆，都已在此前关于非线性覆盖问题的工作中出现过。<sup>[9](https://sci2s.ugr.es/sites/default/files/files/Teaching/OtherPostGraduateCourses/Metaheuristicas/TabuSearch.pdf)</sup> 一种类似的方法曾被命名为最陡上升／最缓下降。<sup>[9](https://sci2s.ugr.es/sites/default/files/files/Teaching/OtherPostGraduateCourses/Metaheuristicas/TabuSearch.pdf)</sup> 随后格洛弗在《美国运筹学会计算杂志》上分两部分发表的《禁忌搜索》论文中给出了该方法的完整表述（第一部分，1989年；第二部分，1990年，引入了管理禁忌表的动态策略），<sup>[11](https://psycnet.apa.org/doi/10.1287/ijoc.2.1.4)</sup> 并在1990年发表了一篇教程。<sup>[2](https://dl.acm.org/doi/10.1287/inte.20.4.74)</sup> 一份用户指南则汇总了实践指导。<sup>[1](https://leeds-faculty.colorado.edu/glover/fred%20pubs/228%20-%20TS%20-%20Users%20Guide%201993.pdf)</sup>

## 变体

**稳健禁忌搜索**（robust tabu search）把禁忌期限随机化而非固定，从而提升了性能，被认为是表现最好的变体之一。<sup>[12](https://link.springer.com/article/10.1007/s10732-025-09576-z)</sup> **反应式禁忌搜索**（reactive tabu search，巴蒂蒂（Battiti）与泰基奥利（Tecchiolli），1994年）对禁忌参数作反应式调整：追踪此前访问过的解，一旦检测到重复就增大期限，并借助哈希或数字树技术，在近似常数时间内发现重复。<sup>[13](https://psycnet.apa.org/doi/10.1287/ijoc.6.2.126)</sup><sup> • </sup><sup>[14](https://www.mdpi.com/2079-9292/14/13/2642)</sup> **并行禁忌搜索**（parallel tabu search）由塔亚尔（Taillard）提出，把搜索并行分布于多个处理器上，在作业车间调度中大幅提升了解的质量与稳健性。<sup>[3](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)</sup> 动态期限方案自成一族：从区间 \( [t_{\min}, t_{\max}] \) 中均匀抽取的随机期限、系统性变体，以及基于解、基于移动、混合式与集成式等形式。<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup><sup> • </sup><sup>[14](https://www.mdpi.com/2079-9292/14/13/2642)</sup>

禁忌搜索也很适合杂交。它常被用作模因算法内部的改进过程，<sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> 也可以与分支定界、割平面流程相结合，<sup>[2](https://dl.acm.org/doi/10.1287/inte.20.4.74)</sup> 而2025年一种混合遗传禁忌搜索则在面向作业车间调度的多工序联合移动邻域下，把遗传算法的全局搜索与禁忌局部搜索结合起来。<sup>[6](https://link.springer.com/article/10.1007/s40747-025-02026-0)</sup>

## 应用

早期的基准证据在若干问题上都偏向禁忌搜索而非模拟退火。赫茨（Hertz）与德韦拉（de Werra）在100至1000个节点的实例上所作的图着色比较发现，禁忌搜索得到的解质量显著更高，而耗费的[计算](https://www.edgepedia.org/zh/computing)量更少。<sup>[10](https://leeds-faculty.colorado.edu/glover/fred%20pubs/196%20-%20TS%20-%20Part%20I-ORSA-aw.pdf)</sup> 马莱克（Malek）的旅行商研究采用长期记忆多样化，取得最优解的次数远多于模拟退火，而计算量仅为后者的1/3至1/25。<sup>[10](https://leeds-faculty.colorado.edu/glover/fred%20pubs/196%20-%20TS%20-%20Part%20I-ORSA-aw.pdf)</sup> 一种取 \( \mathrm{TabuTenure} = 2\sqrt{m} \) 的线性排序方法在3 GHz奔腾IV上1秒内于全部49个LOLIB实例上取得最优解，<sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> 另一种单机调度方法在20个问题上找到17个新的最好解，对于规模至60个作业的问题，与下界的最大差距为3.56%。<sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup>

在二次分配问题上，情况是有条件的。对每个实例都存在一个质量阈值 \( Q^{*} \)：高于它时禁忌搜索所需时间少于模拟退火，低于它时模拟退火表现更好；实测的 \( Q^{*} \) 值从0.0014（nug30）到0.058（dre110）不等。<sup>[8](https://ar5iv.labs.arxiv.org/html/1010.0157)</sup> 哪种算法更好还强烈依赖于实例规模，相关研究覆盖了从20到500个单元的规模。<sup>[15](https://www.sciencedirect.com/science/article/abs/pii/S030505481300302X)</sup> 此前的比较大多偏向禁忌搜索（辛克莱（Sinclair）发现它在37个案例中的28个更好），但保利（Paulli）报告在同等计算时间下模拟退火优于禁忌搜索，因此这一比较尚无定论。<sup>[15](https://www.sciencedirect.com/science/article/abs/pii/S030505481300302X)</sup>

## 局限与替代方法

文献记载的主要失效模式在于记忆设计。仅基于静态禁忌表的禁忌搜索并不稳健，因为它在搜索过程中无法维持可接受的多样性；动态短期记忆之所以是更有吸引力的替代方案，是因为它易于实现，并且平衡了多样化与强化。<sup>[7](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)</sup> 期限设置不当有可辨识的症状（期限过小时目标值反复出现，过大时质量下降），但不存在普适规则。<sup>[4](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)</sup> 相对于模拟退火，禁忌搜索在所有阶段都保留了移动之间相对吸引力的区分，而模拟退火把所有改进性移动同等看待，并随阶段降低对非改进移动的接受度。<sup>[10](https://leeds-faculty.colorado.edu/glover/fred%20pubs/196%20-%20TS%20-%20Part%20I-ORSA-aw.pdf)</sup> 已发表的研究在基准或测试实例上对禁忌搜索与遗传算法作了定量比较。<sup>[16](https://www.ijcaonline.org/archives/volume31/number5/3823-5302/)</sup>

近期的工作用学习来针对期限与邻域。2025年的一项研究把期限策略分为静态、动态与反应式三类，并应用机器学习来学习它们，同时指出没有任何单一策略能在所有问题类型或实例上始终优于其他策略。<sup>[14](https://www.mdpi.com/2079-9292/14/13/2642)</sup> 2025年《启发式方法杂志》上的一种方法根据轨迹指标为QUBO问题调节期限，在75%的试验中，探测出的期限与真实值的差距不超过N的10%，并在50%至80%的试验中优于固定期限基线；同一篇论文还指出，期限大于 \( N - 1 \) 不会带来定性变化，只会拖慢求解器，而期限取0则使该方法退化为贪心算法。<sup>[12](https://link.springer.com/article/10.1007/s10732-025-09576-z)</sup> 一篇梳理主线的综述指出了两重转变：从静态邻域结构转向有理论保证、可消除可行性检查开销的可行设计；从静态禁忌表转向基于学习的机制。其中第四阶段（2020—2024年）强调人工智能融合、智能制造、绿色生产与动态调度。<sup>[3](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)</sup>

## References

1. [A user's guide to tabu search (Glover, Taillard & de Werra, Annals of Operations Research 41, 1993)](https://leeds-faculty.colorado.edu/glover/fred%20pubs/228%20-%20TS%20-%20Users%20Guide%201993.pdf)
2. [Tabu Search: A Tutorial (Glover, Interfaces Vol 20, No 4, 1990)](https://dl.acm.org/doi/10.1287/inte.20.4.74)
3. [Evolutionary Trajectories of Tabu Search in Scheduling: A Main Path Analysis–Based Retrospective over Four Decades](https://www.sciencedirect.com/science/article/pii/S2214716026000047?dgcid=rss_sd_all)
4. [Tabu Search (Handbook of Combinatorial Optimization chapter, Glover)](https://opttek.com/sites/default/files/TS_for_Handbook_of_Combinatorial_Optimization_2nd_Edition_SFE_Updated5-23-12.pdf)
5. [Future paths for integer programming and links to artificial intelligence (Computers & Operations Research, 1986)](https://doi.org/10.1016/0305-0548%2886%2990048-1)
6. [A hybrid genetic tabu search algorithm based on a multi-operation joint movement neighborhood structure for job shop scheduling problems (Complex & Intelligent Systems, 2025)](https://link.springer.com/article/10.1007/s40747-025-02026-0)
7. [Principles of Tabu Search (Glover, Laguna & Martí)](https://www.uv.es/~rmarti/paper/docs/ts3.pdf)
8. [Comparative Performance of Tabu Search and Simulated Annealing Heuristics for the Quadratic Assignment Problem (Paul; Operations Research Letters, arXiv:1010.0157)](https://ar5iv.labs.arxiv.org/html/1010.0157)
9. [An Introduction to Tabu Search (Glover & Laguna / Gendreau chapter)](https://sci2s.ugr.es/sites/default/files/files/Teaching/OtherPostGraduateCourses/Metaheuristicas/TabuSearch.pdf)
10. [Tabu Search, Part I (Glover, ORSA Journal on Computing, 1989)](https://leeds-faculty.colorado.edu/glover/fred%20pubs/196%20-%20TS%20-%20Part%20I-ORSA-aw.pdf)
11. [Tabu Search, Part II, ORSA Journal on Computing 2(1):4 (DOI record)](https://psycnet.apa.org/doi/10.1287/ijoc.2.1.4)
12. [Automated Tabu Tenure Tuning by Trajectory Metrics for Quadratic Unconstrained Binary Optimization (Journal of Heuristics, 2025)](https://link.springer.com/article/10.1007/s10732-025-09576-z)
13. [The Reactive Tabu Search (Battiti & Tecchiolli, ORSA Journal on Computing, 1994)](https://psycnet.apa.org/doi/10.1287/ijoc.6.2.126)
14. [Exploring Tabu Tenure Policies with Machine Learning (Electronics, MDPI, 2025)](https://www.mdpi.com/2079-9292/14/13/2642)
15. [Tabu search vs. simulated annealing as a function of the size of quadratic assignment problem instances (Computers & Operations Research)](https://www.sciencedirect.com/science/article/abs/pii/S030505481300302X)
16. [Article:Optimization: A Comparative Study of Genetic and Tabu Search Algorithms](https://www.ijcaonline.org/archives/volume31/number5/3823-5302/)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Optimization and dynamic programming › Local search and metaheuristics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/tabu-search

English original: https://www.edgepedia.org/tabu-search
