# 蝙蝠算法（Bat algorithm）

蝙蝠算法（Bat algorithm，BA）是一种基于种群的元启发式（寻找优良解的一般搜索方法），通过模仿蝙蝠回声定位中的频率调节、响度和脉冲发射率，搜索连续目标函数的全局最优解。

它由杨新社（Xin-She Yang）在2010年论文《一种新的受蝙蝠启发的元启发式算法》（A New Metaheuristic Bat-Inspired Algorithm）中提出，发表于施普林格·柏林（Springer Berlin）出版的《计算智能研究》（Studies in Computational Intelligence）丛书第284卷《自然启发的优化协作策略（NISCO 2010）》（Nature Inspired Cooperative Strategies for Optimization (NISCO 2010)），第65–74页。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> 期刊版将其表述为一种基于蝙蝠回声定位行为的工程优化任务方法。<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup> 该算法维护一个虚拟蝙蝠种群，每只蝙蝠具有位置、速度、频率、响度和脉冲发射率，并使它们在搜索空间中移动，同时逐渐从探索转向开发。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>

| 关键事实 | 详情 |
|---|---|
| 提出者 | 杨新社（Xin-She Yang），2010年，《计算智能研究》第284卷，第65–74页<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> |
| 问题类别 | 连续全局优化，尤其是工程设计<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup> |
| 核心更新 | 每只蝙蝠的频率、速度、位置、响度和脉冲率<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> |
| 典型参数 | n = 15 至 50（原始运行使用 n = 40）；alpha = gamma = 0.9 至 0.98<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> |
| 特例 | 退化为标准 PSO（\( A = 0 \)，\( r = 1 \)）以及和声搜索（Harmony Search）（\( A = r = 0.7 \) 至 0.9）<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup> |
| 主要批评 | 在公平比较下通常并不优于 PSO；最佳版本是 PSO 与模拟退火（simulated annealing）的混合算法<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> |

## 工作原理

每只虚拟蝙蝠以速度 \( \mathbf{v}_{i} \) 在位置 \( \mathbf{x}_{i} \) 飞行，频率从区间 \([f_{\min}, f_{\max}]\) 中抽取，响度初始化为 \( A_{0} \) 并随迭代降低，脉冲发射率 \( r \in [0,1] \) 根据与目标的接近程度调整。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> 在算法术语中，频率调节驱动全局探索，而响度和脉冲率控制全局移动与局部移动之间的概率切换：新解以与响度相关的概率被接受，围绕当前最优解的局部搜索以与脉冲率相关的概率执行。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> 一项收敛分析将此描述为由发射率和响度控制的局部移动与全局移动之间的自动切换。<sup>[4](https://ar5iv.labs.arxiv.org/html/1903.11971)</sup>

更新方程为<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>：

\[ f_{i} = f_{\min} + (f_{\max} - f_{\min}) \beta \]

\[ \mathbf{v}_{i}^{t} = \mathbf{v}_{i}^{t-1} + (\mathbf{x}_{i}^{t-1} - \mathbf{x}_{*}) f_{i} \]

\[ \mathbf{x}_{i}^{t} = \mathbf{x}_{i}^{t-1} + \mathbf{v}_{i}^{t} \]

其中 \( \beta \) 是随机数，\( \mathbf{x}_{*} \) 是当前全局最优位置。响度和脉冲率按如下方式演化<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>：

\[ A_{i}^{t+1} = \alpha A_{i}^{t}, \qquad r_{i}^{t+1} = r_{i}^{0} \left[ 1 - \exp(-\gamma t) \right] \]

对任意 \( 0 < \alpha < 1 \) 和 \( \gamma > 0 \)，当 \( t \to \infty \) 时，响度趋于零，脉冲率趋于其初始值 \( r_{i}^{0} \)。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> 参数 \( \alpha \) 的作用类似于模拟退火冷却进度表的冷却因子<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>，且概率接受检验只适用于有改进的候选解，因此原始 BA 与模拟退火不同，不接受非改进移动。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup>

## 具体做法

主循环如下<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>：

1. 用随机位置、速度、脉冲频率 \( f_{i} \)、脉冲率 \( r_{i} \) 和响度 \( A_{i} \) 初始化蝙蝠种群。
2. 对每只蝙蝠抽取一个频率，并用上述方程更新速度和位置。
3. 若 \( rand > r_{i} \)，围绕当前最优解执行局部搜索。
4. 生成一个新解；若 \( rand < A_{i} \) 且该解改进了全局最优 \( \mathbf{x}_{*} \)，则接受它。
5. 增大 \( r_{i} \) 并减小 \( A_{i} \)，使群体转向开发，重复直至满足停止准则。

在原始模拟中，种群规模 \( n = 15 \) 至 50 被发现对大多数问题足够，所有基准运行使用固定 \( n = 40 \)<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>，并取 \( \alpha = \gamma = 0.9 \) 至 0.98，最简单情形下 \( \alpha = \gamma \)。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup> 推荐的响度设置为 \( A_{0} = 100 \)、\( A_{\min} = 1 \)，或简单地 \( A_{0} = 1 \)、\( A_{\min} = 0 \)。<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup> 对 \( \alpha \) 和 \( \gamma \) 的精细调整会影响收敛速度<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup>，但在大多数应用中二者均设为 0.9 或其他固定值，且多数应用的最佳取值仍不清楚。<sup>[5](https://www.iztok-jr-fister.eu/static/publications/31.pdf)</sup> 一项研究提出了混沌增强蝙蝠算法以处理全局优化问题。<sup>[6](https://koreascience.kr/article/JAKO202517657602060.view)</sup>

## 起源

蝙蝠算法由杨新社于2010年在《一种新的受蝙蝠启发的元启发式算法》中提出<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>，期刊版发表于《工程计算》（Engineering Computations），面向工程优化。<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup> 该方法以两个更早的元启发式方法作为形式前身：粒子群优化（particle swarm optimization）是一种群体智能方法，比 BA 早约十五年；模拟退火则提供了响度和脉冲率机制所借用的对非改进移动的概率接受。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> 杨新社表明 PSO 和和声搜索是 BA 的特例：用随机参数替代频率变化并设 \( A_{i} = 0 \)、\( r_{i} = 1 \) 可恢复标准 PSO，而固定 \( A_{i} = r_{i} = 0.7 \) 至 0.9 则使 BA 本质上成为和声搜索。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup><sup> • </sup><sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup>

## 变体

命名变体及其提出论文包括：多目标蝙蝠算法（multiobjective bat algorithm，MOBA），由杨新社于2011年在《国际仿生计算杂志》（International Journal of Bio-Inspired Computation）中扩展，用于多目标设计基准<sup>[7](https://doi.org/10.1504/ijbic.2011.042259)</sup>；二进制蝙蝠算法（binary bat algorithm，BBA），用于分类和特征选择，由罗德里戈·汤吉·米索贝·中村（Rodrigo Yuji Mizobe Nakamura）及其同事于2013年提出<sup>[8](https://doi.org/10.1016/b978-0-12-405163-8.00009-0)</sup>；改进蝙蝠算法（improved bat algorithm，IBA），采用莱维飞行（Lévy flights）并对响度和脉冲率作细微变化，由莫明·贾米尔（Momin Jamil）、汉斯-于尔根·泽佩尼克（Hans-Jürgen Zepernick）和杨新社于2014年提出，并在70多个测试函数上测试<sup>[9](https://doi.org/10.1007/978-3-319-13826-8_10)</sup>；以及 BA 与和声搜索的混合算法，用于全局数值优化，由王改革（Gaige Wang）和郭丽红（Lihong Guo）于2013年提出。<sup>[10](https://doi.org/10.1155/2013/696491)</sup>

其他变体在综述文献中按修改方式而非按提出者介绍：混沌版本用混沌映射替代均匀随机抽样，以提高全局搜索的移动性；离散二进制版本使用 S 形函数（sigmoid function）将连续位置映射为二进制决策；一种混合算法使用差分进化（differential evolution）作为局部搜索；其他变体还包括云模型版本、复值编码以及面向受限硬件的紧凑版本。<sup>[11](https://ar5iv.labs.arxiv.org/html/1308.3900)</sup><sup> • </sup><sup>[5](https://www.iztok-jr-fister.eu/static/publications/31.pdf)</sup> 一篇综述列出最常见的版本为二进制 BA、多目标 BA、混合 BA、离散 BA 和混沌 BA。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC9366842/)</sup>

## 应用

已发表应用涵盖工程设计优化，包括压力容器、汽车侧面、弹簧和梁设计、桁架系统以及塔与高层建筑设计，还包括分类、图像处理、特征选择、调度和数据挖掘。<sup>[11](https://ar5iv.labs.arxiv.org/html/1308.3900)</sup> 一篇综述补充了机器人学、图像与信号处理、电气与电力系统以及无线传感器与网络。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC9366842/)</sup> 2024年《智能制造杂志》（Journal of Intelligent Manufacturing）的一篇综述汇集工业案例研究，并在结尾指出当前挑战和未来研究方向。<sup>[13](https://link.springer.com/article/10.1007/s10845-024-02506-z)</sup>

## 局限与替代方案

**基准证据并不一致。** 原论文报告，在多峰函数上，BA 需要 \( 1152 \pm 245 \) 次评估，成功率为100%，而遗传算法（genetic algorithms）为 \( 52124 \pm 3277 \) 次（98%），PSO 为 \( 3719 \pm 205 \) 次（97%）。<sup>[1](https://doi.org/10.1007/978-3-642-12538-6_6)</sup>

**批判性再评估。** 一篇同行评审的批判性分析发现，“BA 并非元启发式文献中的原创贡献”，并且“在公平比较时通常并不优于粒子群优化算法”。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> 其消融实验表明，BA 的某些组件可被更简单的替代方案取代或完全移除：脉冲率机制的表现并不优于轮盘赌选择（roulette wheel selection），在 BA 本已表现良好的函数上响度机制可以舍弃，而 BA 的最佳版本是 PSO 与模拟退火之间的简单混合。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> BA 还对初始化高度敏感，而当轮盘赌选择替代脉冲率机制后，这种敏感性基本消失。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> 平台区域和带噪目标函数被认定为进一步弱点。<sup>[3](https://doi.org/10.1002/eng2.12212)</sup> 另一项分析认为该算法没有新颖性，将“响度”映射为接受准则，将“脉冲发射率”映射为概率机制。<sup>[14](https://iridia.ulb.ac.be/~ccamacho/publications/ANTS2020-paper.pdf)</sup>

**结构性局限。** 通过过快改变 \( A \) 和 \( r \) 而过快从探索转向开发，可能在初始快速阶段后造成停滞。<sup>[11](https://ar5iv.labs.arxiv.org/html/1308.3900)</sup> 没有严谨的数学分析将参数与收敛速度联系起来<sup>[5](https://www.iztok-jr-fister.eu/static/publications/31.pdf)</sup>；一项马尔可夫收敛分析表明仅在特定参数范围内稳定收敛，而其简化模型忽略了脉冲率和响度的变化，因此仍缺乏收敛速度信息。<sup>[4](https://ar5iv.labs.arxiv.org/html/1903.11971)</sup> 大多数应用是至多几十个设计变量的中小规模问题，大规模或真正 NP 难的问题仍测试不足。<sup>[5](https://www.iztok-jr-fister.eu/static/publications/31.pdf)</sup> 参数调优、[参数](https://www.edgepedia.org/zh/parameter)控制和收敛加速是关键未决问题，尚无已知的自动调优方法。<sup>[11](https://ar5iv.labs.arxiv.org/html/1308.3900)</sup> 与 PSO 相比，BA 在速度—位置方案之上增加了响度和脉冲率控制，而该方案在极限情形下已经退化为 PSO。<sup>[2](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)</sup>

## References

1. [Xin-She Yang (2010). A New Metaheuristic Bat-Inspired Algorithm. Studies in computational intelligence.](https://doi.org/10.1007/978-3-642-12538-6_6)
2. [Bat algorithm: a novel approach for global engineering optimization (Engineering Computations)](https://staff.fmi.uvt.ro/~daniela.zaharie/am2016/proiecte/tehnici/BatAlgorithm/Bat_algorithm_EngineeringComputations.pdf)
3. [A critical analysis of the bat algorithm](https://doi.org/10.1002/eng2.12212)
4. [The Global Convergence Analysis of the Bat Algorithm Using a Markovian Framework and Dynamical System Theory](https://ar5iv.labs.arxiv.org/html/1903.11971)
5. [Bat algorithm: Recent advances](https://www.iztok-jr-fister.eu/static/publications/31.pdf)
6. [Handling Local Optima Trapped Situation by Improving the BAT Algorithm - KSII Transactions on Internet and Information Systems (TIIS)](https://koreascience.kr/article/JAKO202517657602060.view)
7. [Xin She Yang (2011). Bat algorithm for multi-objective optimisation. International Journal of Bio-Inspired Computation.](https://doi.org/10.1504/ijbic.2011.042259)
8. [Rodrigo Yuji Mizobe Nakamura and colleagues (2013). Binary Bat Algorithm for Feature Selection. Elsevier eBooks.](https://doi.org/10.1016/b978-0-12-405163-8.00009-0)
9. [Momin Jamil, Hans-Jürgen Zepernick, Xin-She Yang (2014). Synthesizing Cross-Ambiguity Functions Using the Improved Bat Algorithm. Studies in computational intelligence.](https://doi.org/10.1007/978-3-319-13826-8_10)
10. [Gaige Wang, Lihong Guo (2013). A Novel Hybrid Bat Algorithm with Harmony Search for Global Numerical Optimization. Journal of Applied Mathematics.](https://doi.org/10.1155/2013/696491)
11. [Bat Algorithm: Literature Review and Applications](https://ar5iv.labs.arxiv.org/html/1308.3900)
12. [Recent advances of bat-inspired algorithm, its versions and applications](https://pmc.ncbi.nlm.nih.gov/articles/PMC9366842/)
13. [A review of the bat algorithm and its varieties for industrial applications (Journal of Intelligent Manufacturing, 2024)](https://link.springer.com/article/10.1007/s10845-024-02506-z)
14. [Grey Wolf, Firefly and Bat Algorithms: Three Widespread Algorithms that Do Not Contain Any Novelty](https://iridia.ulb.ac.be/~ccamacho/publications/ANTS2020-paper.pdf)

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

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/bat-algorithm

English original: https://www.edgepedia.org/bat-algorithm
