public class ECSuite extends Problem implements SimpleProblemForm
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) |
| Constructor and Description |
|---|
ECSuite() |
| Modifier and Type | Method and Description |
|---|---|
static double[][] |
buildRotationMatrix(EvolutionState state,
long rotationSeed,
int N)
Build an NxN rotation matrix[row][column] with a given seed.
|
void |
checkRange(EvolutionState state,
int problem,
double[] genome) |
static double |
dot(double[] x,
double[] y)
Dot product between two column vectors.
|
void |
evaluate(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum)
Evaluates the individual in ind, if necessary (perhaps
not evaluating them if their evaluated flags are true),
and sets their fitness appropriately.
|
double |
function(EvolutionState state,
int function,
double[] genome,
int threadnum) |
boolean |
isOptimal(int function,
double fitness) |
private double |
langerman(double[] genome) |
static double[] |
mul(double[][] matrix,
double[] x)
Multiply a column vector against a matrix[row][column].
|
static double[] |
normalize(double[] x)
Normalize a column vector.
|
static double[] |
scalarMul(double scalar,
double[] x)
Scalar multiply against a column vector.
|
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
static double[] |
sub(double[] x,
double[] y)
Subtract two column vectors.
|
canEvaluate, clone, closeContacts, defaultBase, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContactsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescribepublic static final String P_SEED
public static final String P_WHICH_PROBLEM
public static final String V_ROSENBROCK
public static final String V_RASTRIGIN
public static final String V_SPHERE
public static final String V_STEP
public static final String V_NOISY_QUARTIC
public static final String V_F1
public static final String V_F2
public static final String V_F3
public static final String V_F4
public static final String V_BOOTH
public static final String V_GRIEWANGK
public static final String V_GRIEWANK
public static final String V_MEDIAN
public static final String V_SUM
public static final String V_PRODUCT
public static final String V_SCHWEFEL
public static final String V_MIN
public static final String V_ROTATED_RASTRIGIN
public static final String V_ROTATED_SCHWEFEL
public static final String V_ROTATED_GRIEWANK
public static final String V_LANGERMAN
public static final String V_LENNARDJONES
public static final String V_LUNACEK
public static final int PROB_ROSENBROCK
public static final int PROB_RASTRIGIN
public static final int PROB_SPHERE
public static final int PROB_STEP
public static final int PROB_NOISY_QUARTIC
public static final int PROB_BOOTH
public static final int PROB_GRIEWANK
public static final int PROB_MEDIAN
public static final int PROB_SUM
public static final int PROB_PRODUCT
public static final int PROB_SCHWEFEL
public static final int PROB_MIN
public static final int PROB_ROTATED_RASTRIGIN
public static final int PROB_ROTATED_SCHWEFEL
public static final int PROB_ROTATED_GRIEWANK
public static final int PROB_LANGERMAN
public static final int PROB_LENNARDJONES
public static final int PROB_LUNACEK
public int problemType
public static final String[] problemName
public static final double[] minRange
public static final double[] maxRange
public long seed
boolean alreadyChecked
private double[][] afox10
private double[] cfox10
public static double[][][] rotationMatrix
public static final long ROTATION_SEED
public void checkRange(EvolutionState state, int problem, double[] genome)
public void setup(EvolutionState state, Parameter base)
PrototypeFor 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.
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemFormevaluate in interface SimpleProblemFormpublic boolean isOptimal(int function,
double fitness)
public double function(EvolutionState state, int function, double[] genome, int threadnum)
private double langerman(double[] genome)
public static double dot(double[] x,
double[] y)
public static double[] mul(double[][] matrix,
double[] x)
public static double[] scalarMul(double scalar,
double[] x)
public static double[] sub(double[] x,
double[] y)
public static double[] normalize(double[] x)
public static double[][] buildRotationMatrix(EvolutionState state, long rotationSeed, int N)
Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.