($1$) **Begin** |

($2$) **Randomize **$n$ swarms each possesses *m* particles; |

($3$) **While** (the termination conditions are not met) |

($4$) **For** (each swarm $k$) |

($5$) Find in the $k$th swarm neighborhood, the point with the best fitness; |

($6$) Set this point as ${p}_{gd}^{\theta}$; |

($7$) **For** (each particle $i$ of swarm $k$) |

($8$) Find in the particle neighborhood, the point with the best fitness; |

($9$) Set this point as ${p}_{gd}^{k}$; |

($10$) Update particle velocity using equations (3.7); |

($11$) Update particle position using equations (3.8); |

($13$) **End For** |

($14$) **End For** |

($15$) **End While** |

($16$) **End** |