# 猫群优化

猫群优化（Cat swarm optimization, CSO）是一种群体智能元启发式算法，模仿[猫的行为](https://www.edgepedia.org/zh/cat-behavior)来搜索连续目标函数的最优值，返回找到的最佳猫的位置。与蚁群优化和粒子群优化一样，它演化一个候选解种群，但在每次迭代中将该种群分裂为两个独立的子模型：一个执行局部、类似休息的搜索的搜寻模式，和一个跟随迄今找到的最佳解的追踪模式。<sup>[1](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.3698)</sup><sup> • </sup><sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup> 每只猫携带一个M维位置、每维一个速度、一个适应度值和一个模式标志。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup>

| 关键事实 | 详情 |
|---|---|
| 提出时间 | 2006年，由Shu-Chuan Chu、Pei-Wei Tsai和Jeng-Shyang Pan在《Lecture Notes in Computer Science》中提出<sup>[1](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.3698)</sup> |
| 两种模式 | 搜寻（局部搜索，休息行为）和追踪（全局搜索，狩猎）<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup><sup> • </sup><sup>[3](https://internationaljournalssrg.org/uploads/specialissuepdf/ICT-2020/2020/OTHERS/P103.pdf)</sup> |
| 模式分配 | 混合比例MR在[0, 1]区间内；当N = 10、MR = 0.2时，8只猫被分配至搜寻模式，2只猫被分配至追踪模式<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup><sup> • </sup><sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC7204373/)</sup> |
| 搜寻参数 | SMP、SRD、CDC、SPC，均由用户通过试错法调节<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup> |
| 典型设置 | SMP = 5，SRD = 20%，CDC = 80%，MR = 2%，\( C_{1} \) = 2.05<sup>[4](https://www.mecs-press.org/ijitcs/ijitcs-v5-n11/IJITCS-V5-N11-4.pdf)</sup> |
| 主要缺陷 | 过早收敛于局部最优<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup> |
| 基准表现 | 在21种算法比较中，93%的基准函数上取得了精确的最优结果（RMSE低于0.05）<sup>[5](https://link.springer.com/article/10.1007/s12065-024-00997-6)</sup> |

## 工作原理

CSO模拟了猫在狩猎前大部分时间都在观察周围环境这一观察结果。<sup>[6](https://onlinelibrary.wiley.com/doi/10.1155/2020/1291526)</sup> 搜寻模式模仿休息行为，充当局部搜索过程。它由四个用户调节的参数控制：搜寻记忆池（SMP）、所选维度的搜寻范围（SRD）、改变维度的计数（CDC）和自我位置考虑（SPC）。如果SMP设为5，每只猫获得5个新的候选位置，其中一个成为其下一个位置；CDC是[0, 1]区间内的值，选择修改多少个维度，SRD是应用于所选维度的变异比率。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup>

追踪模式模仿狩猎，充当全局搜索过程。其速度更新类似PSO，但仅使用全局最优位置，没有个体最优项：

\[ v_{i,g}^{j} = v_{i,g-1}^{j} + r \cdot C \cdot \left( x_{\mathrm{best},g}^{j} - x_{i,g-1}^{j} \right) \]

其中\( r \)是随机因子，\( C \)是加速系数；然后通过加上速度来更新位置。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup> 作为对比，PSO基线结合了惯性、个体最优项和全局最优项，\( V_i(t) = w \cdot V_i(t) + c_1 \cdot r_1 \cdot (\mathrm{pbest}_{i} - X_i(t)) + c_2 \cdot r_2 \cdot (\mathrm{gbest} - X_i(t)) \)。<sup>[5](https://link.springer.com/article/10.1007/s12065-024-00997-6)</sup>

混合比例（MR）决定每次迭代的分配。MR在[0, 1]区间内选取；当种群规模为50、MR = 0.7时，35只猫进入追踪模式，剩余15只进入搜寻模式。<sup>[4](https://www.mecs-press.org/ijitcs/ijitcs-v5-n11/IJITCS-V5-N11-4.pdf)</sup> 由于两种模式相互分离且独立，探索-利用平衡可以仅通过改变MR来调节。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup>

## 实现方法

已发表的伪代码包含七个步骤。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup>

1. 初始化N只猫，每只猫在M维中具有随机位置和随机速度。
2. 根据MR将猫随机分类为搜寻模式和追踪模式。
3. 评估每只猫的适应度。
4. 保留最佳猫（其位置即当前解）。
5. 根据各自的模式移动每只猫：搜寻猫通过SRD和CDC变化生成SMP个候选位置；追踪猫应用速度更新。
6. 根据MR为下一次迭代重新分配猫的模式。
7. 检查终止条件，从步骤3开始重复执行，直至满足条件。

纯CSO的典型参数值为SMP = 5，SRD = 20%，CDC = 80%，MR = 2%，\( C_{1} \) = 2.05，\( R_{1} \)从[0, 1]中抽取。<sup>[4](https://www.mecs-press.org/ijitcs/ijitcs-v5-n11/IJITCS-V5-N11-4.pdf)</sup> 一项在Ackley函数上的敏感性研究测试了SMP从5到20、CDC和SRD从0.1到1.0、C从0.1到1.5，发现CSO在SMP、CSC和SRD方面调参良好，但指出C还有改进空间。<sup>[5](https://link.springer.com/article/10.1007/s12065-024-00997-6)</sup>

## 起源

CSO发表于《Lecture Notes in Computer Science》。<sup>[1](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.3698)</sup><sup> • </sup><sup>[3](https://internationaljournalssrg.org/uploads/specialissuepdf/ICT-2020/2020/OTHERS/P103.pdf)</sup> 原始验证在六个测试函数上将CSO与PSO和加权PSO进行比较，报告了更好的性能，使用的参数为MP 5、SRD 20%、CDC 80%、MR 2%、\( c_{1} \) 2.0、种群规模16、维度30、最少500次迭代。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup><sup> • </sup><sup>[3](https://internationaljournalssrg.org/uploads/specialissuepdf/ICT-2020/2020/OTHERS/P103.pdf)</sup> 该算法的谱系明确属于粒子群优化：追踪模式复用了PSO风格的速度规则，同时去掉了个体最优项。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup>

## 变体

已发表的变体修改了模式结构、参数或解的编码方式。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup>

- **并行CSO（PCSO）** 将群体划分为子群，消除每个子群中最差的解，并使用参数ECH控制子群之间的信息交换。
- **聚类CSO**：将CSO应用于聚类时去掉MR，使每个个体在每代都由两种模式更新，并将CDC提高到1。
- **平均惯性加权CSO（AICSO）** 增加一个权重参数\( \omega \)，用于衡量现有速度在更新中的重要性。
- **多目标CSO（MOCSO）** 使用外部档案和Pareto支配关系处理非支配解。
- **增强并行CSO（EPCSO）** 在PCSO的追踪模式中采用田口正交阵列。
- **离散二进制CSO（BCSO）**，用于非单一成本集合覆盖问题等问题，在搜寻模式中用变异操作概率（PMO）参数替代SRD。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup><sup> • </sup><sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2015/578541)</sup>
- **自适应动态CSO（ADCSO）** 在追踪模式速度更新中引入可调惯性。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup>
- 2024年的一种模因混合算法CSO-MA，在函数\( f_{9} \)、\( f_{11} \)和\( f_{12} \)上（但不包括\( f_{10} \)）与CSO和PSO相比找到了最小的平均最优值，Wilcoxon检验表明CSO-MA在测试维度上显著优于PSO。<sup>[9](https://www.nature.com/articles/s41598-024-56670-6)</sup>

## 应用

已报告的应用涵盖调度、图像处理、电力系统和无线网络：IIR系统辨识、LSB替换优化、用于电压稳定的UPFC配置、正反向对象建模、彩色图像的位图块截断编码、线性天线阵列综合，以及径向配电网中的电容器和分布式发电分配。<sup>[10](https://link.springer.com/article/10.1007/s40092-018-0297-z)</sup> 在开放车间调度问题这一NP难问题上，CSO在基准实例上以合理的执行时间取得了良好结果，并在所比较的算法中在各问题规模上具有最低的相对百分比偏差。<sup>[10](https://link.springer.com/article/10.1007/s40092-018-0297-z)</sup> 更广泛的综述列出了文本摘要、云负载均衡、无线传感器节点部署、特征选择、认知无线电中的协作[频谱感知](https://www.edgepedia.org/zh/spectrum-sensing)和旅行商问题。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup><sup> • </sup><sup>[3](https://internationaljournalssrg.org/uploads/specialissuepdf/ICT-2020/2020/OTHERS/P103.pdf)</sup>

## 局限与替代方案

CSO的主要缺陷是过早收敛，即陷入局部最优的概率较高，尽管快速收敛是其优势；一种建议的补救措施是将静态MR参数变为动态参数。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup> CSO还具有较好的探索能力但利用能力较弱，且由于追踪模式仅依赖最佳猫的位置来指导更新，缺少PSO使用的个体最优项，它不能总是探索整个搜索空间，这减慢了收敛速度。<sup>[11](https://www.irma-international.org/viewtitle/284579/?isxn=9781799885405)</sup><sup> • </sup><sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC6393876/)</sup> 已识别的失败模式包括探索与利用不平衡、追踪模式缺乏多样化机制，以及不适当的信息交换机制导致的慢收敛；增强型CSO（ECSO）通过添加个体最优猫信息、邻域搜索策略和混沌映射来解决这些问题。<sup>[11](https://www.irma-international.org/viewtitle/284579/?isxn=9781799885405)</sup>

与替代方案相比，原始CSO在六个测试函数上击败了PSO和加权PSO，BCSO在包括Sphere和Rastrigin在内的四个测试函数上击败了GA、BPSO和NBPSO。<sup>[2](https://www.hindawi.com/journals/cin/2020/4854895/)</sup> 具有可变模式比例的改进CSO变体在80%的测试函数上在精度方面优于原始CSO，在CEC风格基准上平均排名为1.83（CSO-M）和1.5（CSO-M/τ/λ），而PSO为2.33，DE/rand/1/bin为2.17。<sup>[7](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)</sup> 2024年对21种群体智能算法的比较发现，只有六种——ABC、ALSO、CHOA-B、CSO、PSO和SSA——在超过90%的基准函数上产生了精确的最优结果（RMSE低于0.05），其中CSO为93%。<sup>[5](https://link.springer.com/article/10.1007/s12065-024-00997-6)</sup>

## References

1. [Computational Intelligence Based on the Behavior of Cats](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.3698)
2. [Cat Swarm Optimization Algorithm: A Survey and Performance Evaluation (Computational Intelligence and Neuroscience, 2020)](https://www.hindawi.com/journals/cin/2020/4854895/)
3. [A Survey on Cat Swarm Optimization (SSRG International Journal, ICT-2020 special issue)](https://internationaljournalssrg.org/uploads/specialissuepdf/ICT-2020/2020/OTHERS/P103.pdf)
4. [A Novel Cat Swarm Optimization Algorithm (Adaptive Dynamic CSO, IJITCS vol. 5 no. 11)](https://www.mecs-press.org/ijitcs/ijitcs-v5-n11/IJITCS-V5-N11-4.pdf)
5. [Comparative analysis of accuracy and computational complexity across 21 swarm intelligence algorithms (Evolutionary Intelligence, 2024)](https://link.springer.com/article/10.1007/s12065-024-00997-6)
6. [Adaptive Cat Swarm Optimization Algorithm and Its Applications in Vehicle Routing Problems](https://onlinelibrary.wiley.com/doi/10.1155/2020/1291526)
7. [Adjustable mode ratio and focus boost search strategy for cat swarm optimization](https://www.aimspress.com/aimspress-data/aci/2021/1/PDF/aci-01-01-005.pdf)
8. [A Binary Cat Swarm Optimization Algorithm for the Non-Unicost Set Covering Problem](https://onlinelibrary.wiley.com/doi/10.1155/2015/578541)
9. [Applications of nature-inspired metaheuristic algorithms for tackling optimization problems across disciplines (Scientific Reports, 2024)](https://www.nature.com/articles/s41598-024-56670-6)
10. [Cat swarm optimization for solving the open shop scheduling problem (Journal of Industrial Engineering International, 2018)](https://link.springer.com/article/10.1007/s40092-018-0297-z)
11. [Enhanced CSO (ECSO) for clustering (International Journal of Applied Metaheuristic Computing)](https://www.irma-international.org/viewtitle/284579/?isxn=9781799885405)
12. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC7204373/)
13. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC6393876/)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Sep 30, 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/cat-swarm-optimization

English original: https://www.edgepedia.org/cat-swarm-optimization
