ec.app.ecsuite
Class ECSuite

java.lang.Object
  extended by ec.Problem
      extended by ec.app.ecsuite.ECSuite
All Implemented Interfaces:
Prototype, Setup, SimpleProblemForm, java.io.Serializable, java.lang.Cloneable

public class ECSuite
extends Problem
implements SimpleProblemForm

Several standard Evolutionary Computation functions are implemented: Rastrigin, De Jong's test suite F1-F4 problems (Sphere, Rosenbrock, Step, Noisy-Quartic), Booth (from [Schwefel, 1995]), and Griewangk. 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 [or] griewangk/td>
(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)

See Also:
Serialized Form

Field Summary
static float A
           
static java.lang.String P_BOOTH
           
static java.lang.String P_F1
           
static java.lang.String P_F2
           
static java.lang.String P_F3
           
static java.lang.String P_F4
           
static java.lang.String P_GRIEWANGK
           
static java.lang.String P_NOISY_QUARTIC
           
static java.lang.String P_RASTRIGIN
           
static java.lang.String P_ROSENBROCK
           
static java.lang.String P_SPHERE
           
static java.lang.String P_STEP
           
static java.lang.String P_WHICH_PROBLEM
           
static int PROB_BOOTH
           
static int PROB_GRIEWANGK
           
static int PROB_NOISY_QUARTIC
           
static int PROB_RASTRIGIN
           
static int PROB_ROSENBROCK
           
static int PROB_SPHERE
           
static int PROB_STEP
           
 int problemType
           
 
Fields inherited from class ec.Problem
P_PROBLEM
 
Constructor Summary
ECSuite()
           
 
Method Summary
 void describe(Individual ind, EvolutionState state, int threadnum, int log, int verbosity)
           
 void describe(Individual ind, EvolutionState state, int subpopulation, int threadnum, int log, int verbosity)
          "Reevaluates" an individual, for the purpose of printing out interesting facts about the individual in the context of the Problem, and logs the results.
 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.
 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.
 
Methods inherited from class ec.Problem
canEvaluate, clone, closeContacts, defaultBase, evaluate, finishEvaluating, getBase, initializeContacts, prepareToEvaluate, reinitializeContacts, setBase
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ec.simple.SimpleProblemForm
canEvaluate, evaluate
 

Field Detail

P_WHICH_PROBLEM

public static final java.lang.String P_WHICH_PROBLEM
See Also:
Constant Field Values

P_ROSENBROCK

public static final java.lang.String P_ROSENBROCK
See Also:
Constant Field Values

P_RASTRIGIN

public static final java.lang.String P_RASTRIGIN
See Also:
Constant Field Values

P_SPHERE

public static final java.lang.String P_SPHERE
See Also:
Constant Field Values

P_STEP

public static final java.lang.String P_STEP
See Also:
Constant Field Values

P_NOISY_QUARTIC

public static final java.lang.String P_NOISY_QUARTIC
See Also:
Constant Field Values

P_F1

public static final java.lang.String P_F1
See Also:
Constant Field Values

P_F2

public static final java.lang.String P_F2
See Also:
Constant Field Values

P_F3

public static final java.lang.String P_F3
See Also:
Constant Field Values

P_F4

public static final java.lang.String P_F4
See Also:
Constant Field Values

P_BOOTH

public static final java.lang.String P_BOOTH
See Also:
Constant Field Values

P_GRIEWANGK

public static final java.lang.String P_GRIEWANGK
See Also:
Constant Field Values

PROB_ROSENBROCK

public static final int PROB_ROSENBROCK
See Also:
Constant Field Values

PROB_RASTRIGIN

public static final int PROB_RASTRIGIN
See Also:
Constant Field Values

PROB_SPHERE

public static final int PROB_SPHERE
See Also:
Constant Field Values

PROB_STEP

public static final int PROB_STEP
See Also:
Constant Field Values

PROB_NOISY_QUARTIC

public static final int PROB_NOISY_QUARTIC
See Also:
Constant Field Values

PROB_BOOTH

public static final int PROB_BOOTH
See Also:
Constant Field Values

PROB_GRIEWANGK

public static final int PROB_GRIEWANGK
See Also:
Constant Field Values

problemType

public int problemType

A

public static final float A
See Also:
Constant Field Values
Constructor Detail

ECSuite

public ECSuite()
Method Detail

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
Overrides:
evaluate in class Problem

describe

public void describe(Individual ind,
                     EvolutionState state,
                     int threadnum,
                     int log,
                     int verbosity)
Specified by:
describe in interface SimpleProblemForm
Overrides:
describe in class Problem

describe

public void describe(Individual ind,
                     EvolutionState state,
                     int subpopulation,
                     int threadnum,
                     int log,
                     int verbosity)
Description copied from interface: SimpleProblemForm
"Reevaluates" an individual, for the purpose of printing out interesting facts about the individual in the context of the Problem, and logs the results. This might be called to print out facts about the best individual in the population, for example.

Specified by:
describe in interface SimpleProblemForm
Overrides:
describe in class Problem