FST-PSO

Fuzzy Self-Tuning Particle Swarm Optimization - A settings-free global optimization method.

FST-PSO (Fuzzy Self-Tuning Particle Swarm Optimization) is a swarm intelligence global optimization method based on Particle Swarm Optimization, designed for the optimization of real- or discrete-valued multi-dimensional minimization problems.

FST-PSO is a settings-free version of PSO which exploits fuzzy logic to dynamically assign functioning parameters to each particle in the swarm. Specifically, during each generation, FST-PSO determines the optimal choice for the cognitive factor, the social factor, the inertia value, and velocity boundaries.

GitHub stars PyPI version License

Optimization Fuzzy Logic

Key Features

  • Settings-Free: Uses fuzzy logic to determine optimal functioning parameters and heuristics to choose swarm size, removing the need for user-defined settings.
  • Dynamic Tuning: Adjusts particle behavior in real-time based on the evolution of the swarm.
  • Hybrid Support: Optimized for both continuous and discrete optimization landscapes, returning probability distributions for discrete problems.
  • FFT-PSO Variant: Includes Fuzzy Time Travel PSO for backtracking and escaping local minima.

Quick Start

1. Basic FST-PSO Minimization

To use FST-PSO, the programmer must implement a custom fitness function and specify the boundaries of the search space for each dimension.

pip install fst-pso
from fstpso import FuzzyPSO 

# Define the custom fitness function
def example_fitness(particle):
    return sum(map(lambda x: x**2, particle))
    
if __name__ == '__main__':
    dims = 10
    FP = FuzzyPSO()
    # Set search space for each dimension
    FP.set_search_space([[-10, 10]]*dims)   
    FP.set_fitness(example_fitness)
    # Solve
    result = FP.solve_with_fstpso()
    print("Best solution:", result[0])
    print("Fitness:", result[1])

2. Fuzzy Time Travel PSO (FFT-PSO)

Fuzzy Time Travel PSO (FFT-PSO) is a variant that prevents premature convergence by backtracking to the beginning of an optimization and removing the particle responsible for a stalling condition.

from fstpso import FFTPSO   

def example_fitness(particle):
    return sum(map(lambda x: x**2, particle))
    
if __name__ == '__main__':
    dims = 10
    FP = FFTPSO()
    FP.set_search_space([[-10, 10]]*dims)   
    FP.set_fitness(example_fitness)
    # Solve with 'alpha' parameter (int for iterations, float for percentage)
    # to specify when to rewind the swarm and re-initialize the stalling particle.
    result = FP.solve_with_fstpso(max_iter=200)
    print("Best solution:", result[0])
    print("Fitness:", result[1])

Technical Highlights

Fuzzy Self-Tuning

Uses fuzzy logic to dynamically adjust cognitive/social factors and inertia for each particle.

Settings-Free

Automates swarm size selection and parameter tuning based on problem dimensionality.

Time Travel (FFT)

Backtracks to initial states to prevent premature convergence and escape local minima.

Key Publications

2025

  1. A survey of modern hybrid particle swarm optimization algorithms
    Matteo Grazioso, Chiara Gallese, Leonardo Vanneschi, and 1 more author
    In International Conference on the Applications of Evolutionary Computation (Part of EvoStar), 2025
  2. We are sending you back... to the optimum! Fuzzy Time Travel Particle Swarm Optimization
    Daniele M Papetti, Andrea Tangherloni, Vasco Coelho, and 3 more authors
    In International Conference on the Applications of Evolutionary Computation (Part of EvoStar), 2025

2020

  1. Fuzzy modeling and global optimization to predict novel therapeutic targets in cancer cells
    Marco S Nobile, Giuseppina Votta, Roberta Palorini, and 8 more authors
    Bioinformatics, 2020

2018

  1. Fuzzy Self-Tuning PSO: A settings-free algorithm for global optimization
    Marco S Nobile, Paolo Cazzaniga, Daniela Besozzi, and 3 more authors
    Swarm and Evolutionary Computation, 2018

2015

  1. The impact of particles initialization in PSO: parameter estimation as a case in point
    Paolo Cazzaniga, Marco S Nobile, and Daniela Besozzi
    In 2015 IEEE Conference on Computational Intelligence in Bioinformatics and Computational Biology (CIBCB), 2015