Documentation of 'ec.pso.PSOBreeder' Java class
PSOBreeder
ec.pso

Class PSOBreeder

  • All Implemented Interfaces:
    Setup, Singleton, java.io.Serializable


    public class PSOBreeder
    extends Breeder
    PSOBreeder is a simple single-threaded Breeder which performs Particle Swarm Optimization using the Particle class as individuals. PSOBreeder relies on a number of parameters which define weights for various vectors computed during Particle Swarm Optimization, plus a few flags:
    • Neighborhoods for particles have a size S determined by the parameter neighborhood-size. It's best if S were even.
    • Neighborhoods for particles are constructed in one of three ways:
      • random: pick S informants randomly without replacement within the subpopulation, not including the particle itself, once at the beginning of the run.
      • random-each-time: pick S informants randomly without replacement within the subpopulation, not including the particle itself, every single generation.
      • toroidal: pick the floor(S/2) informants to the left of the particle's location within the subpopulation and the ceiling(S/2) informants to the right of the particle's location in the subpopulation, once at the beginning of the run.
    • To this you can add the particle itself to the neighborhood, with include-self.
    • The basic velocity update equation is VELOCITY <-- (VELOCITY * velocity-coefficent) + (VECTOR-TO-GLOBAL-BEST * global-coefficient) + (VECTOR-TO-NEIGHBORHOOD-BEST * informant-coefficient) + (VECTOR-TO-PERSONAL-BEST * personal-coefficient)
    • The basic particle update equation is PARTICLE <-- PARTICLE + VELOCITY

    Parameters

    base.velocity-coefficient
    float ≥ 0
    (The weight for the velocity)
    base.personal-coefficient
    float ≥ 0
    (The weight for the personal-best vector)
    base.informant-coefficient
    float ≥ 0
    (The weight for the neighborhood/informant-best vector)
    base.global-coefficient
    float ≥ 0
    (The weight for the global-best vector)
    base.neighborhood-size
    int > 0
    (The size of the neighborhood of informants, not including the particle)
    base.neighborhood-style
    String, one of: random toroidal random-each-time
    (The method of generating the neighborhood of informants, not including the particle)
    base.include-self
    true or false (default)
    (Whether to include the particle itself as a member of the neighborhood after building the neighborhood)
    See Also:
    Serialized Form
    • Field Detail

      • C_NEIGHBORHOOD_TOROIDAL

        public static final int C_NEIGHBORHOOD_TOROIDAL
        See Also:
        Constant Field Values
      • C_NEIGHBORHOOD_RANDOM_EACH_TIME

        public static final int C_NEIGHBORHOOD_RANDOM_EACH_TIME
        See Also:
        Constant Field Values
      • P_VELOCITY_COEFFICIENT

        public static final java.lang.String P_VELOCITY_COEFFICIENT
        See Also:
        Constant Field Values
      • P_PERSONAL_COEFFICIENT

        public static final java.lang.String P_PERSONAL_COEFFICIENT
        See Also:
        Constant Field Values
      • P_INFORMANT_COEFFICIENT

        public static final java.lang.String P_INFORMANT_COEFFICIENT
        See Also:
        Constant Field Values
      • P_GLOBAL_COEFFICIENT

        public static final java.lang.String P_GLOBAL_COEFFICIENT
        See Also:
        Constant Field Values
      • P_NEIGHBORHOOD_SIZE

        public static final java.lang.String P_NEIGHBORHOOD_SIZE
        See Also:
        Constant Field Values
      • V_NEIGHBORHOOD_RANDOM

        public static final java.lang.String V_NEIGHBORHOOD_RANDOM
        See Also:
        Constant Field Values
      • V_NEIGHBORHOOD_TOROIDAL

        public static final java.lang.String V_NEIGHBORHOOD_TOROIDAL
        See Also:
        Constant Field Values
      • V_NEIGHBORHOOD_RANDOM_EACH_TIME

        public static final java.lang.String V_NEIGHBORHOOD_RANDOM_EACH_TIME
        See Also:
        Constant Field Values
      • neighborhood

        public int neighborhood
      • velCoeff

        public double velCoeff
      • personalCoeff

        public double personalCoeff
      • informantCoeff

        public double informantCoeff
      • globalCoeff

        public double globalCoeff
      • neighborhoodSize

        public int neighborhoodSize
      • includeSelf

        public boolean includeSelf
      • globalBest

        public double[][] globalBest
      • globalBestFitness

        public Fitness[] globalBestFitness
    • Constructor Detail

      • PSOBreeder

        public PSOBreeder()
    • Method Detail

      • setup

        public void setup(EvolutionState state,
                          Parameter base)
        Description copied from interface: Setup
        Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.
      • breedPopulation

        public Population breedPopulation(EvolutionState state)
        Description copied from class: Breeder
        Breeds state.population, returning a new population. In general, state.population should not be modified.
        Specified by:
        breedPopulation in class Breeder

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.