Documentation of 'ec.app.ecsuite.ECSuite' Java class
ECSuite
ec.app.ecsuite

Class ECSuite

  • All Implemented Interfaces:
    Prototype, Setup, SimpleProblemForm, java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    CoevolutionaryECSuite


    public class ECSuite
    extends Problem
    implements SimpleProblemForm
    Several standard Evolutionary Computation functions are implemented. As the SimpleFitness is used for maximization problems, the mapping f(x) --> -f(x) is used to transform the problems into maximization ones.

    Parameters

    base.type
    String, one of: rosenbrock rastrigin sphere step noisy-quartic kdj-f1 kdj-f2 kdj-f3 kdj-f4 booth griewank median sum product schwefel min rotated-rastrigin rotated-schwefel rotated-griewank langerman lennard-jones lunacek
    (The vector problem to test against. Some of the types are synonyms: kdj-f1 = sphere, kdj-f2 = rosenbrock, kdj-f3 = step, kdj-f4 = noisy-quartic. "kdj" stands for "Ken DeJong", and the numbers are the problems in his test suite)
    base.seed
    int > 0
    (Random number seed for rotated problems)
    See Also:
    Serialized Form
    • Constructor Detail

      • ECSuite

        public ECSuite()
    • Method Detail

      • checkRange

        public void checkRange(EvolutionState state,
                               int problem,
                               double[] genome)
      • setup

        public void setup(EvolutionState state,
                          Parameter base)
        Description copied from interface: Prototype
        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.

        For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.

        Specified by:
        setup in interface Prototype
        Specified by:
        setup in interface Setup
        Overrides:
        setup in class Problem
      • evaluate

        public void evaluate(EvolutionState state,
                             Individual ind,
                             int subpopulation,
                             int threadnum)
        Description copied from interface: SimpleProblemForm
        Evaluates the individual in ind, if necessary (perhaps not evaluating them if their evaluated flags are true), and sets their fitness appropriately.
        Specified by:
        evaluate in interface SimpleProblemForm
      • isOptimal

        public boolean isOptimal(int function,
                                 double fitness)
      • function

        public double function(EvolutionState state,
                               int function,
                               double[] genome,
                               int threadnum)
      • dot

        public static double dot(double[] x,
                                 double[] y)
        Dot product between two column vectors. Does not modify the original vectors.
      • mul

        public static double[] mul(double[][] matrix,
                                   double[] x)
        Multiply a column vector against a matrix[row][column]. Does not modify the original vector or matrix.
      • scalarMul

        public static double[] scalarMul(double scalar,
                                         double[] x)
        Scalar multiply against a column vector. Does not modify the original vector.
      • sub

        public static double[] sub(double[] x,
                                   double[] y)
        Subtract two column vectors. Does not modify the original vectors.
      • normalize

        public static double[] normalize(double[] x)
        Normalize a column vector. Does not modify the original vector.
      • buildRotationMatrix

        public static double[][] buildRotationMatrix(EvolutionState state,
                                                     long rotationSeed,
                                                     int N)
        Build an NxN rotation matrix[row][column] with a given seed.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.