Skip to content
Marco S. Nobile edited this page Jun 5, 2019 · 29 revisions

Welcome to the FST-PSO wiki!

If you are experiencing problems with FST-PSO, please check the troubleshooting page.

What is FST-PSO?

FST-PSO is a settings-free version of the global optimization algorithm known as Particle Swarm Optimization. FST-PSO does not need any user settings to work, because particles leverage fuzzy logic to adapt their behavior to the fitness landscape.

If you find FST-PSO useful for your research, please cite it as:

Nobile, Cazzaniga, Besozzi, Colombo, Mauri, Pasi, “Fuzzy Self-Tuning PSO: A Settings-Free Algorithm for Global Optimization”, Swarm & Evolutionary Computation, 39:70-85, 2018 (doi:10.1016/j.swevo.2017.09.001)

Why using FST-PSO?

FST-PSO was specifically designed to be 1) more effective than normal PSO and its competitors (please, check out the paper for additional info) and 2) extremely easy to use (no settings!). Thus, the API is extremely simple and straightforward:

  • create a FuzzyPSO class;
  • specify the search space with its set_search_space() method;
  • specify a fitness function with the set_fitness() method. Please note that the argument of this method must be a function which receives the position of a particle as argument and returns its fitness value as a real number;
  • launch the optimization with the solve_with_fstpso() method.

Please note that you must specify the search space before setting the fitness function, because the set_fitness() method is designed to automatically test the proper functioning of the fitness function. You can exclude this check by using the optional argument skip_test=True.

Are there any optional settings?

Yes:

  • you can pass the number of iterations as argument (max_iter) to solve_with_fstpso(). Default is 100 iterations;
  • you can use a non-uniform initialization of the particles using the optional argument creation_method of solve_with_pso(). For example: solve_with_fstpso(creation_method={'name': 'logarithmic'});
  • you can also override the heuristics for the swarm size, by explicitly setting the number of particles with the method set_swarm_size().

You can disable the fuzzy rules for the social factor, cognitive factor, inertia weight, minimum velocity, and maximum velocity by using the following methods before calling solve_with_fstpso():

  • disable_fuzzyrule_social();
  • disable_fuzzyrule_cognitive();
  • disable_fuzzyrule_inertia();
  • disable_fuzzyrule_minvelocity();
  • disable_fuzzyrule_maxvelocity().

You can provide a list/array of guesses to the initial population using the optional argument initial_guess_list of the solve_with_fstpso() method. Please note that the number of guesses must be smaller than the swarm size.

Logging performances and testing

FST-PSO now provides two logging facilities. You can log to file the information about the best individual of the swarm at each iteration (fitness and structure) by adding the following optional arguments to solve_with_fstpso():

  • dump_best_fitness = filename;
  • dump_best_solution = filename.

Can I distribute the fitness evaluations?

Yes. In alternative to the set_fitness() method, you can use the set_parallel_fitness() method. In this case, you must specify as argument a function which receives the whole population (i.e., a list of lists containing the positions of all particles) and must return the vector of the fitness values for all particles. This wrapper function is responsible for the calculations of all fitness functions in a distributed or parallel fashion (e.g., GPU, threads pool).

FST-PSO uses fuzzy logic to dynamically adapt the social factor, cognitive factor, inertia weight, maximum velocity, and minimum velocity of all particles

Clone this wiki locally