---
title: 'Fish Algorithm: Swarm Optimization'
url: https://www.emergentmind.com/topics/fish-algorithm
type: topic
---

# Fish Algorithm: Swarm Optimization

The Fish Algorithm, most commonly referenced as the Artificial Fish Swarm Algorithm (AFSA) or Fish School Search (FSS), is a population-based stochastic optimization methodology inspired by the collective behaviors of fish schools. Since its introduction in the early 2000s, the Fish Algorithm and its variants have become a foundational component of the swarm intelligence literature, particularly for tackling continuous, combinatorial, multi-objective, and constrained optimization problems. AFSA and FSS model key behaviors such as preying, swarming, and following, translating these into algorithmic motifs that balance global exploration and local exploitation across diverse application domains, including engineering, data mining, and operations research [2011.05700][1405.4138][1308.2307][1707.06169][2310.13375][1708.04745].

## 1. Biological Inspiration and Algorithmic Fundamentals

The Fish Algorithm is based on several ecological behaviors observed in natural fish schools:

- **Preying**: Local search for richer food sources translates to stochastic sampling and movement toward promising fitness regions.
- **Swarming**: Aggregative motion enabling crowd avoidance while maintaining proximity is modeled through movement toward the center of local neighborhoods, subject to a crowding constraint.
- **Following**: Imitative behavior when one entity discovers a high-fitness region is reflected by directed movement toward the locally best peer.
- **Random (Free) Move**: Non-deterministic exploration serves to prevent stagnation.

Each artificial fish is a point in the decision space, characterized by parameters encoding its current position, a “visual” (perceptual) radius, and a step size. These individuals interact through local neighborhood rules. The formalized behaviors are expressed as selection among movement operators: prey, swarm, follow, or random, contingent on fitness improvement and population density constraints [2011.05700][1405.4138].

## 2. Core Algorithmic Structure and Mathematical Formulation

The standard AFSA and FSS share a discrete-time, iterative loop, each step comprising three main operators after initialization:

- **Individual Movement**: Each fish proposes a local random displacement, accepted if it yields fitness improvement:
  $$
  x_i'(t+1) = x_i(t) + \mathbf{r} \cdot \mathrm{step}_{\mathrm{ind}}(t),
  $$
  with move accepted if $f(x_i'(t+1))$ improves upon $f(x_i(t))$.

- **Feeding (Weight Update)**: Fish accumulate “weight” proportional to normalized fitness gain:
  $$
  w_i(t+1) = w_i(t) + \frac{\Delta f_i}{\max_j |\Delta f_j|},
  $$
  with bounds to prevent unbounded acceleration.

- **Collective Movements**:
  - *Instinctive*: The school shifts collectively in the weighted average direction of successful individual moves.
    $$
    I(t) = \frac{\sum_{i=1}^N (x_i(t+1)-x_i(t)) \Delta f_i}{\sum_{i=1}^N \Delta f_i}
    $$
    Each $x_i(t+1) \leftarrow x_i(t) + I(t)$.
  - *Volitive*: The school contracts toward or expands away from the barycenter based on net weight gain:
    $$
    x_i(t+1) \leftarrow x_i(t) \pm \text{step}_{\text{vol}}(t) \frac{x_i(t) - B(t)}{\| x_i(t) - B(t) \|} \cdot \mathrm{rand}
    $$
    Expansion occurs on weight loss, contraction on weight gain [1308.2307][1708.04745][1707.06169].

Parameter scheduling—especially for step sizes and visual radius—is critical and often involves time-dependent decay or adaptive strategies, allowing early-stage global exploration and late-stage local exploitation [2011.05700][1405.4138].

## 3. Variants, Hybridizations, and Multi-Objective Extensions

Numerous enhancements have been developed to address limitations in convergence speed, parameter sensitivity, and scalability:

- **Parameter Adaptation**: Dynamic scaling of visual and step using a “movement weight” ($MW(t)$) can follow constant, linearly decreasing, increasing, or randomized schedules. Adaptive schemes accelerate convergence and balance exploration/exploitation [1405.4138][2310.13375].
- **Constraint Handling**: For constrained problems, extensions such as wrFSS incorporate feasibility phases, niching via sub-swarms, ε-dominance, and penalty or gradient-based local search for robust traversal of feasible regions [1707.06169].
- **Combinatorial and Path Problems**: For route planning or TSP variants, augmentations include 2-opt local search, sub-optimal acceptance, chaos-theoretical escapes, and DE hybridization (DE-CAFSA), enabling stronger global and local search synergy [2310.13375].
- **Many-Objective Optimization**: Weight-based Fish School Search (wmoFSS) utilizes reference lines in objective space, clustering, and PBI decomposition for effective handling of more than three objectives. Subpopulations specialize along different Pareto front directions, with movement and feeding governed by scalarizing functions [1708.04745].
- **Hybrid Models**: AFSA and FSS are often combined with PSO, DE, ABC, BFO, or simulated annealing. These hybrids employ operator exchange or run cooperative metaheuristics to capitalize on orthogonal algorithmic strengths [2011.05700].

## 4. Empirical Evaluation and Benchmark Performance

AFSA and FSS have been systematically benchmarked on a range of standard functions (Sphere, Rosenbrock, Ackley, Griewank, among others). Key findings:

- Adaptive or hybrid variants (constant or linearly decreasing $MW$, DE-CAFSA, wmoFSS) routinely outperform the standard algorithms by several orders of magnitude in mean error and match or exceed the performance of canonical PSO and GA benchmarks on continuous and multimodal landscapes [1405.4138][2310.13375][1708.04745].
- In constrained optimization (CEC 2010 suite), wrFSS and its variants achieve results comparable to state-of-the-art, exhibiting full feasibility on problems with large feasible regions and competitive rates even under severe constraints [1707.06169].
- For high-precision engineering problems, such as finite element model updating, FSS and its bias-corrected variant FSSb provide lower or comparable error to PSO, with superior robustness in high-dimensional, bounded domains [1308.2307].

## 5. Real-World Applications

The Fish Algorithm family is applied across a range of domains, including:

- **Engineering Design**: Finite element model updating, structural optimization, and control tuning [1308.2307][2011.05700].
- **Operations Research**: Multi-traveling salesman and logistics routing, often benefiting from hybrid or chaos-augmented variants [2310.13375].
- **Communications**: Power optimization in MIMO-OFDM relay systems [2011.05700].
- **Data Mining and Machine Learning**: Feature selection, clustering, SVM/SVR parameterization, neural network and ensemble model training [2011.05700].
- **Image Processing & Pattern Recognition**: Segmentation, image quantization, MR brain image analysis, leveraging convex optimization or hybridized AFSA [2011.05700][1612.00125].
- **Sensor Networks & Control**: Routing, coverage optimization, AUV path planning, sleep scheduling [2011.05700].

## 6. Contemporary Challenges and Directions for Advancement

Outstanding problems and research trajectories for Fish Algorithms include:

- **Scalability**: Efficiency degrades in high-dimensional (>100D) settings due to $O(n^2)$ neighborhood queries; sparse graph approximations are a research target [2011.05700].
- **Convergence Theory**: Formal runtime and stability analyses remain largely empirical; rigorous theoretical frameworks are undeveloped.
- **Parameter Automation**: While adaptive and hybrid schedules mitigate manual tuning, fully self-adaptive schemes—robust to landscape geometry and phase transitions—are an open field [1405.4138][2310.13375].
- **Feasibility in Complex Constraints**: For equality-dominated or narrow feasible regions, conventional random-walk local search is insufficient; specialized projection or constraint-handling mechanisms are needed [1707.06169].
- **Multi-Objective Diversity**: Balancing convergence and diversity in many-objective extensions remains a focus, with hybrid clustering and reference-based partitioning approaches yielding promising results [1708.04745].
- **Large-Scale and Dynamic Optimization**: Multi-population strategies, exclusion/migration protocols, and memory-based adaptation are under exploration for nonstationary environments [2011.05700].

## 7. Algorithm Comparison and Empirical Summary

Table: Comparative Performance of FSS, PSO, and GA on FEM Updating (SM-AG19) [1308.2307].

| Method       | Total Error (%) | Early Convergence | Robustness |
|--------------|----------------|-------------------|------------|
| GA           | 21.13          | Fast (15 iters)   | Weak       |
| PSO          | 14.27          | Slower (~75 iters)| Strong     |
| FSS          | 14.28          | Slower (~75 iters)| Strong     |
| FSSb         | 14.27          | Slightly faster   | Strongest  |

On continuous benchmarks, adaptive-AFSA (constant or decreasing $MW$) achieves orders-of-magnitude lower mean errors than fixed-parameter AFSA, with random-$MW$ providing additional diversity and protection against stagnation [1405.4138].

In summary, the Fish Algorithm and its modern descendants constitute a flexible, generalizable optimization paradigm, expressing rich exploration-exploitation dynamics via biologically inspired mechanisms, and achieving state-of-the-art performance across a diverse set of optimization landscapes [2011.05700][2310.13375][1708.04745][1405.4138][1308.2307][1707.06169].

Source: https://www.emergentmind.com/topics/fish-algorithm