AI::PSO

Module for running the Particle Swarm Optimization algorithm
Download

AI::PSO Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MPL
  • Price:
  • FREE
  • Publisher Name:
  • Kyle Schlansker
  • Publisher web site:
  • http://search.cpan.org/~kylesch/

AI::PSO Tags


AI::PSO Description

Module for running the Particle Swarm Optimization algorithm AI::PSO is a Perl module for running the Particle Swarm Optimization algorithm.SYNOPSIS use AI::PSO; my %params = ( numParticles => 4, # total number of particles involved in search numNeighbors => 3, # number of particles with which each particle will share its progress maxIterations => 1000, # maximum number of iterations before exiting with no solution found dimensions => 4, # number of parameters you want to optimize deltaMin => -4.0, # minimum change in velocity during PSO update deltaMax => 4.0, # maximum change in velocity during PSO update meWeight => 2.0, # 'individuality' weighting constant (higher means more individuality) meMin => 0.0, # 'individuality' minimum random weight meMax => 1.0, # 'individuality' maximum random weight themWeight => 2.0, # 'social' weighting constant (higher means trust group more) themMin => 0.0, # 'social' minimum random weight themMax => 1.0, # 'social' maximum random weight exitFitness => 0.9, # minimum fitness to achieve before exiting verbose => 0, # 0 prints solution # 1 prints (Y|N):particle:fitness at each iteration # 2 dumps each particle (+1) psoRandomRange => 4.0, # setting this enables the original PSO algorithm and # also subsequently ignores the me*/them* parameters ); sub custom_fitness_function(@input) { # this is a callback function. # @input will be passed to this, you do not need to worry about setting it... # ... do something with @input which is an array of floats # return a value in with 0 being the worst and 1 being the best } pso_set_params(\%params); pso_register_fitness_function('custom_fitness_function'); pso_optimize(); my @solutionArray = pso_get_solution_array(); Requirements: · Perl


AI::PSO Related Software