Package ec.eda.dovs

Class DOVSSpecies

All Implemented Interfaces:
Prototype, Setup, Serializable, Cloneable
Direct Known Subclasses:
HyperboxSpecies

public class DOVSSpecies extends IntegerVectorSpecies
DOVSSpecies is a IntegerVectorSpecies which implements DOVS algorithm. The two most important method for a Species in DOVS problem is updateMostPromisingArea(...) and mostPromisingAreaSamples(...). We call these two methods in sequence to first determine an area around best individual and sample new individual from that area. However, there are several ways to implements these two methods, thus, we let the subclasses to determine the implementation of these two method, e.g. HyperboxSpecies.

DOVSSpecies must be used in combination with DOVSBreeder, which will call it at appropriate times to reproduce new individuals for next generations. It must also be used in combination with DOVSInitializer and DOVSEvaluator. The former will be used to generate the initial population, and the later will determine a suitable number of evaluation for each individual.

Parameters

base.initial-reps
Integer > 1
Base value of number of evaluations for each individual.
base.warmup
Integer > 1
Number of trial we want to randomize one dimension of the individual, used for sampling.
base.constraints-size
Integer
Number of constraints for the initial optimization problem. link
base.constraints-A
String
A string of double number separate by whitespace specified the left hand side coefficients of the constraint Axinvalid input: '<'=b.
base.constraints-B
Double
A double number specified the right hand side of the constraint Ax<=b.
base.stochastic
Boolean (default = false)
Is it the problem a stochastic problem?

Default Base
dovs.species

Parameter bases

See Also:
  • Field Details

    • P_DOVS_SPECIES

      public static final String P_DOVS_SPECIES
      See Also:
    • P_INITIAL_REPETITION

      public static final String P_INITIAL_REPETITION
      See Also:
    • P_STOCHASTIC

      public static final String P_STOCHASTIC
      See Also:
    • P_CONSTRAINTS_SIZE

      public static final String P_CONSTRAINTS_SIZE
      See Also:
    • P_A

      public static final String P_A
      See Also:
    • P_B

      public static final String P_B
      See Also:
    • P_WARM_UP

      public static final String P_WARM_UP
      See Also:
    • optimalIndex

      public int optimalIndex
      This integer indicate the index of optimal individual in the visited array.
    • warmUp

      public int warmUp
      warm up period for RMD sampling.
    • visited

      public ArrayList<Individual> visited
      This list contains all the sample we have visited during current algorithm run.
    • visitedIndexMap

      public HashMap<Individual,Integer> visitedIndexMap
      Given a individual, return the index of this individual in ArrayList visited
    • corners

      public ArrayList<CornerMap> corners
      CornerMaps for the all the visisted individuals. This record the key-value pair for each individuals, where key is the coordinates and value is individual itself.
    • activeSolutions

      public ArrayList<Individual> activeSolutions
      activeSolutions contains all the samples that is on the boundary of the most promising area.
    • Ek

      public ArrayList<Individual> Ek
      This is the Ek in original paper, where is the collection all the individuals evaluated in generation k.
    • stochastic

      public boolean stochastic
      Is the problem a stochastic problem.
    • initialReps

      public int initialReps
      Base value of number evaluation for each individual.
    • repetition

      public int repetition
      This value will be updated at each generation to determine how many evaluation is needed for one individual. It make use of the initialReps.
    • numOfTotalSamples

      public long numOfTotalSamples
      This is for future using.
    • A

      public ArrayList<double[]> A
      Constraint coefficients
    • b

      public double[] b
      Constratin coefficients
  • Constructor Details

    • DOVSSpecies

      public DOVSSpecies()
  • Method Details

    • defaultBase

      public Parameter defaultBase()
      Description copied from interface: Prototype
      Returns the default base for this prototype. This should generally be implemented by building off of the static base() method on the DefaultsForm object for the prototype's package. This should be callable during setup(...).
      Specified by:
      defaultBase in interface Prototype
      Overrides:
      defaultBase in class VectorSpecies
    • setup

      public void setup(EvolutionState state, Parameter base)
      Description copied from class: Species
      The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities. If your individual prototype might need to know special things about the species (like parameters stored in it), then when you override this setup method, you'll need to set those parameters BEFORE you call super.setup(...), because the setup(...) code in Species sets up the prototype.
      Specified by:
      setup in interface Prototype
      Specified by:
      setup in interface Setup
      Overrides:
      setup in class IntegerVectorSpecies
      See Also:
    • updateMostPromisingArea

      public void updateMostPromisingArea(EvolutionState state)
      Define a most promising area for search of next genertion of individuals.
    • mostPromisingAreaSamples

      public ArrayList<Individual> mostPromisingAreaSamples(EvolutionState state, int size)
      Sample from the most promising area to get new generation of individual for evaluation.
    • findBestSample

      public void findBestSample(EvolutionState state, Subpopulation subpop)
      To find the best sample for each generation, we need to go through each individual in the current population, and also best individual and individuals in actionSolutions. These three type of individuals are exactly the individuals evaluated in DOVSEvaluator.
    • uniqueSamples

      public ArrayList<Individual> uniqueSamples(EvolutionState state, ArrayList<Individual> candidates)
      This method will take a candidate list and identify is there is redundant individual in it. If yes, it will get rid of the redundant individuals. After that, it will check if all the samples from this generation have been visited in previous generation. If yes, it will retrieve the samples from previous generations.
base.species species (the subpopulations' species)