# 入侵杂草优化算法

入侵杂草优化算法（Invasive weed optimization，IWO）是一种基于种群的元启发式算法（一种通用的、不针对特定问题的求解搜索策略），用于数值优化。它模仿了入侵杂草在定殖过程中展现出的鲁棒性、适应性和随机性，通过扩散、繁殖和竞争性排除候选解来搜索问题的解空间。<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup>

| 关键事实 | 详情 |
|---|---|
| 提出者 | A.R. 梅赫拉比安与 C. 卢卡斯，《生态信息学》，2006年12月<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup> |
| 核心算子 | 种群初始化、适应度依赖的繁殖、空间散布、竞争性排除<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup> |
| 散布分布 | 种子位置以均值为零、方差逐代递减的正态分布随机数确定<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> |
| 原始默认参数 | 最大种群数 15，最大种子数 5，最小种子数 0，初始种群 10，调制指数 3，\( \sigma \) 从 3.0 降至 0.001<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> |
| 原始应用 | 鲁棒控制器的优化与整定<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup> |
| 已知弱点 | 在高维空间中，性能相比 BIPOP-CMA-ES 和 a-CMA-ES 有所下降<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> |

## 工作原理

IWO 将每个候选解视为一株杂草，即 d 维搜索空间中的一个点。算法运行四个算子：种群的随机初始化、依赖于个体适应度的繁殖、子代的空间随机散布，以及个体间的竞争性排除（选择）。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup>

繁殖与适应度成比例：适应度越高的植株产生越多的种子。一株植物产生的种子数量取决于其目标函数值——该值在种群最小值和最大值之间归一化，产生的种子数量则受最大和最小种子数的约束。<sup>[4](https://iwaponline.com/aqua/article/72/8/1607/96776/Reservoir-operation-management-using-a-new-hybrid)</sup>

散布是随机的。新生成的种子通过在父代位置基础上叠加零中心扰动产生，所用随机数服从均值为零、方差可变的正态分布，记作 \( x \sim N(0, \sigma) \)。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> 标准差从初始值 \( \sigma_{\mathrm{initial}} \) 逐代递减至最终值 \( \sigma_{\mathrm{final}} \)，遵循如下非线性调度：

\[ \sigma_{\mathrm{iter}} = \left( \frac{\mathrm{iter}_{\max} - \mathrm{iter}}{\mathrm{iter}_{\max}} \right)^{m} \left( \sigma_{\mathrm{init}} - \sigma_{\mathrm{fin}} \right) + \sigma_{\mathrm{fin}} \]

其中 \( m \) 为非线性调制指数。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup> 该调度使种子落在远处位置的可能性逐代非线性递减，从而令搜索从全局探索转向局部精细搜索，适应度高的植株聚集在一起，而不太适应的植株被淘汰。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup>

竞争性排除将种群规模限制在最大植株数 \( P_{m} \) 以内：生成的种子与其父代一起按适应度排序，适应度较高的个体被保留，适应度较低的植株被淘汰。<sup>[5](http://www.savap.org.pk/journals/ARInt./Vol.2%283%29/2012%282.3-16%29.pdf)</sup><sup> • </sup><sup>[4](https://iwaponline.com/aqua/article/72/8/1607/96776/Reservoir-operation-management-using-a-new-hybrid)</sup>

## 实施步骤

实践者运行以下循环：

1. 在搜索空间上随机初始化一个杂草种群（通常为 10 株）。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup>
2. 繁殖：每株植物产生与其适应度成比例的种子数，介于最小值（通常为 0）和最大值（通常为 3 至 5）之间。<sup>[6](https://research.ijcaonline.org/volume41/number16/pxc3877943.pdf)</sup>
3. 散布：为每个父代叠加正态分布的随机偏移量，标准差取自上述调度公式。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup>
4. 用目标函数评估种子。
5. 执行竞争性排除：将父代和种子一起排序，保留最优植株直至种群上限。<sup>[5](http://www.savap.org.pk/journals/ARInt./Vol.2%283%29/2012%282.3-16%29.pdf)</sup>
6. 重复上述过程直至满足终止条件，返回找到的最优解。

原始默认参数为：最大种群规模 \( M_{\max} = 15 \)，最大种子数 \( S_{\max} = 5 \)，最小种子数 \( S_{\min} = 0 \)，初始种群 \( M_{0} = 10 \)，非线性调制指数 \( n = 3 \)，\( \sigma_{\mathrm{initial}} = 3.0 \)，\( \sigma_{\mathrm{final}} = 0.001 \)。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> 基准测试实验建议最大种群规模取 10 至 30，因为较大的种群会在固定的评估预算内压缩迭代代数。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> 当 \( \sigma_{\mathrm{initial}} \) 取 1 至 5、\( \sigma_{\mathrm{final}} \) 取 \( 10^{-5} \) 至 0.01 时性能最佳，调制指数建议取 2 至 8。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup> 软件默认值各不相同：mealpy 库使用种群 100、种子数界限 2 和 10、指数 2、\( \sigma \) 从 1.0 到 0.01，因此不同实现存在差异，参数整定是预期之中的。<sup>[7](https://mealpy.readthedocs.io/en/latest/_modules/mealpy/bio_based/IWO.html)</sup>

## 起源

IWO 是一种随机优化算法，模仿入侵杂草的鲁棒性、适应性和随机性。<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup> 作者来自德黑兰大学（University of Tehran），其灵感源于对杂草动态扩散及其对环境条件快速适应能力的观察。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup> 原始论文将 IWO 应用于鲁棒控制器的优化与整定，并报告称在具有已知全局和局部极小值的多维函数上，其结果优于所对比的其他方法，包括遗传算法、模因算法、粒子群优化、混合蛙跳算法和模拟退火变体。<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup> 早期后续应用很快出现：梅赫拉比安与优素菲-科马（2007）优化了智能鳍片上的压电致动器位置；马拉赫扎德等人（2008）优化了线性阵列天线，并与 PSO 进行了比较；萨赫拉伊-阿尔达卡尼等人（2008）优化了发电；罗沙纳伊等人（2009）为无线网络优化了均匀线性阵列。<sup>[8](https://www.oreilly.com/library/view/meta-heuristic-and-evolutionary/9781119386995/c13.xhtml)</sup> 该算法还被用于一个项目调度问题——资源可用性成本问题。<sup>[9](https://ideas.repec.org/p/rug/rugwps/11-697.html)</sup>

## 变体

若干有名称的变体对四个算子之一进行了修改：

- **exIWO**（扩展型 IWO）针对连续和离散问题，采用混合的“种子传播”策略，在原始散布基础上增加了“扩散”和“滚落”机制。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup>
- **EIWO**（增强型 IWO）借鉴了禁忌搜索的核心思想：当在某株杂草的邻域内一定迭代次数内未找到更优解时，判定该杂草停滞并将其禁忌。<sup>[10](https://dl.acm.org/doi/10.1145/2464576.2466815)</sup>
- **两阶段聚类 IWO** 利用聚类识别有希望的区域，报告的结果优于标准 IWO。<sup>[11](https://dl.acm.org/doi/10.1145/2908961.2931661)</sup>
- **CMIWO** 增加了混沌变异算子以及对精英个体的混沌优化。<sup>[12](https://dc-china-simulation.researchcommons.org/cgi/viewcontent.cgi?article=3414&context=journal)</sup>
- **DEMIWO** 将多级子种群方案与差分进化模型相结合，采用混沌初始化、四个基于适应度的子群以及自适应交叉和变异概率。<sup>[13](http://cea.ceaj.org/EN/Y2018/V54/I21/107)</sup>
- 一种用于天线综合的**改进型 IWO** 引入了随迭代改变变异步长的更具探索性的流程。<sup>[14](https://www.inderscience.com/info/inarticle.php?artid=41147)</sup>
- **ADIWO**（自适应离散 IWO）改变了搜索过程中种子散布标准差的设定方式。<sup>[15](https://www.jpier.org/ac_api/download.php?id=11120202)</sup>
- **ET-DSIWO**（事件触发动态种子 IWO）面向非平稳优化设计，借鉴了种子寿命、休眠以及瞬时种子库与持久种子库之间的平衡，相较于标准 IWO，其关键创新在于动态种子机制。<sup>[16](https://re.public.polimi.it/handle/11311/1310560)</sup>

## 应用

IWO 已在多个工程领域得到应用：多峰函数最小化、二阶补偿器整定、天线配置设计、电力市场动态、推荐系统以及数据库查询的连接排序。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)</sup> 天线与电磁设计是一个反复出现的用途，从带旁瓣和零陷控制的线性阵列综合<sup>[14](https://www.inderscience.com/info/inarticle.php?artid=41147)</sup>到面向无线网络的均匀线性阵列。<sup>[8](https://www.oreilly.com/library/view/meta-heuristic-and-evolutionary/9781119386995/c13.xhtml)</sup> 在控制领域，IWO 已被用于整定电力系统稳定器：在一项四机系统研究中，以特征值为目标，在三种负荷条件下，IWO 比 PSO 收敛更快，并将关键模态在 s 平面上进一步左移。<sup>[6](https://research.ijcaonline.org/volume41/number16/pxc3877943.pdf)</sup> 项目调度<sup>[9](https://ideas.repec.org/p/rug/rugwps/11-697.html)</sup>和水库运行管理——后者通过 2023 年与布谷鸟搜索的混合算法（HIWCSA）实现<sup>[4](https://iwaponline.com/aqua/article/72/8/1607/96776/Reservoir-operation-management-using-a-new-hybrid)</sup>——将该算法的应用记录延伸至运筹学和水资源管理领域。近年来的混合算法将 IWO 与机器学习相结合：一种 2022 年的 IWO-机器学习故障检测方法将该算法描述为结构简单、结果可靠<sup>[17](https://www.mdpi.com/1996-1073/15/4/1488)</sup>；一种 2024 年的 Neuro-IWO 混合算法用于移动机器人路径规划，实现了低于 5% 的路径偏差，而单独使用神经网络时偏差低于 6%；混合算法生成的路径也更短。<sup>[18](https://link.springer.com/article/10.1007/s41870-024-02231-z)</sup>

## 局限性与替代方案

所报告的主要失效模式是早熟收敛和繁重的参数整定负担。关键参数值难以设定，且由于竞争性排除仅依据适应度值选择较优解，可能导致早熟收敛。<sup>[11](https://dl.acm.org/doi/10.1145/2908961.2931661)</sup> 标准 IWO 也被描述为存在早熟收敛、收敛速度慢和易陷入局部最优的问题，这正是 DEMIWO 的动因。<sup>[13](http://cea.ceaj.org/EN/Y2018/V54/I21/107)</sup> 在高维空间中，IWO 的性能相比 BIPOP-CMA-ES 和 a-CMA-ES 有所下降，但通过精细调整非线性调制指数、种群规模和标准差取值可以显著改善。<sup>[3](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)</sup>

比较大多是定性的且针对具体问题。原始论文在具有已知极小值的函数上将 IWO 与遗传算法、模因算法、PSO、混合蛙跳算法和模拟退火变体进行了基准对比。<sup>[1](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)</sup> 一种改进型 IWO 在天线阵列综合上以统计显著的方式达到或超越了经典 IWO、GA、PSO、模因算法和禁忌搜索。<sup>[14](https://www.inderscience.com/info/inarticle.php?artid=41147)</sup> CMIWO 在种群规模为 10、20、50 和 100 时，在优化精度、成功率和收敛速度上均优于 IWO 和 PSO。<sup>[12](https://dc-china-simulation.researchcommons.org/cgi/viewcontent.cgi?article=3414&context=journal)</sup> 已发表文献中确实存在与差分进化的正面比较及混合算法，包括一种将 DE 变异嵌入 IWO 的差分入侵杂草优化算法；此外，尚未有关于 IWO 的正式收敛性分析发表，因此该算法在已发表的论述中本质上仍属启发式方法。

## References

1. [A novel numerical optimization algorithm inspired from weed colonization](https://www.sciencedirect.com/science/article/abs/pii/S1574954106000665)
2. [The Expanded Invasive Weed Optimization Metaheuristic for Solving Continuous and Discrete Optimization Problems](https://pmc.ncbi.nlm.nih.gov/articles/PMC3977471/)
3. [Illuminating the EC-Bestiary: Conceptual Analysis and Benchmarking of the Invasive Weed Optimization Algorithm](https://theses.liacs.nl/pdf/2023-2024-ShreefBBarmad.pdf)
4. [Reservoir operation management using a new hybrid algorithm of Invasive Weed Optimization and Cuckoo Search Algorithm (AQUA, IWA Publishing, 2023)](https://iwaponline.com/aqua/article/72/8/1607/96776/Reservoir-operation-management-using-a-new-hybrid)
5. [2012(2.3 16) (savap.org.pk)](http://www.savap.org.pk/journals/ARInt./Vol.2%283%29/2012%282.3-16%29.pdf)
6. [Performance Comparison of Invasive Weed Optimization and Particle Swarm Optimization Algorithm for the tuning of Power System Stabilizer in Multi-machine Power System](https://research.ijcaonline.org/volume41/number16/pxc3877943.pdf)
7. [Source code for mealpy.bio_based.IWO](https://mealpy.readthedocs.io/en/latest/_modules/mealpy/bio_based/IWO.html)
8. [Invasive Weed Optimization - Meta-heuristic and Evolutionary Algorithms for Engineering Optimization (book chapter)](https://www.oreilly.com/library/view/meta-heuristic-and-evolutionary/9781119386995/c13.xhtml)
9. [An Invasive Weed Optimization Algorithm for the Resource Availability Cost Problem](https://ideas.repec.org/p/rug/rugwps/11-697.html)
10. [Enhancing invasive weed optimization with taboo strategy (GECCO)](https://dl.acm.org/doi/10.1145/2464576.2466815)
11. [A Two Stages Invasive Weed Optimization via a New Clustering Strategy (GECCO 2016 Companion)](https://dl.acm.org/doi/10.1145/2908961.2931661)
12. [Chaotic Mutation Invasive Weed Optimization (CMIWO) paper (Chinese journal)](https://dc-china-simulation.researchcommons.org/cgi/viewcontent.cgi?article=3414&context=journal)
13. [Multi-level sub-population invasive weed optimization algorithm with new differential evolution model](http://cea.ceaj.org/EN/Y2018/V54/I21/107)
14. [Linear antenna array synthesis with modified invasive weed optimisation algorithm (IJBIC 2011)](https://www.inderscience.com/info/inarticle.php?artid=41147)
15. [The ADIWO (adaptive discrete IWO), Journal of Electromagnetic Waves and Applications (PIER)](https://www.jpier.org/ac_api/download.php?id=11120202)
16. [Event-triggered dynamic seed invasive weed optimization (ET-DSIWO): a nature-inspired approach for non-stationary optimization](https://re.public.polimi.it/handle/11311/1310560)
17. [New Hybrid Invasive Weed Optimization and Machine Learning Approach for Fault Detection (Energies, MDPI, 2023)](https://www.mdpi.com/1996-1073/15/4/1488)
18. [Optimization of route planning for the mobile robot using a hybrid Neuro-IWO technique (International Journal of Information Technology, Springer, 2024)](https://link.springer.com/article/10.1007/s41870-024-02231-z)

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

Topic: 物质世界与数学 › 数学与统计学

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/invasive-weed-optimization

English original: https://www.edgepedia.org/invasive-weed-optimization
