Package ec.eda.dovs

# Class DOVSSpecies

java.lang.Object
ec.Species
ec.vector.VectorSpecies
ec.vector.IntegerVectorSpecies
ec.eda.dovs.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

base.`species` | species (the subpopulations' species)

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `ArrayList<double[]>`
  `A`
  Constraint coefficients
  `ArrayList<Individual>`
  `activeSolutions`
  activeSolutions contains all the samples that is on the boundary of the most promising area.
  `double[]`
  `b`
  Constratin coefficients
  `ArrayList<CornerMap>`
  `corners`
  CornerMaps for the all the visisted individuals.
  `ArrayList<Individual>`
  `Ek`
  This is the Ek in original paper, where is the collection all the individuals evaluated in generation k.
  `int`
  `initialReps`
  Base value of number evaluation for each individual.
  `long`
  `numOfTotalSamples`
  This is for future using.
  `int`
  `optimalIndex`
  This integer indicate the index of optimal individual in the visited array.
  `static final String`
  `P_A`
  `static final String`
  `P_B`
  `static final String`
  `P_CONSTRAINTS_SIZE`
  `static final String`
  `P_DOVS_SPECIES`
  `static final String`
  `P_INITIAL_REPETITION`
  `static final String`
  `P_STOCHASTIC`
  `static final String`
  `P_WARM_UP`
  `int`
  `repetition`
  This value will be updated at each generation to determine how many evaluation is needed for one individual.
  `boolean`
  `stochastic`
  Is the problem a stochastic problem.
  `ArrayList<Individual>`
  `visited`
  This list contains all the sample we have visited during current algorithm run.
  `HashMap<Individual,Integer>`
  `visitedIndexMap`
  Given a individual, return the index of this individual in ArrayList visited
  `int`
  `warmUp`
  warm up period for RMD sampling.

  ### Fields inherited from class ec.vector.IntegerVectorSpecies

  `C_RANDOM_WALK_MUTATION, C_RESET_MUTATION, maxGene, minGene, mutationIsBounded, mutationType, P_MAXGENE, P_MINGENE, P_MUTATION_BOUNDED, P_MUTATIONTYPE, P_NUM_SEGMENTS, P_RANDOM_WALK_PROBABILITY, P_SEGMENT, P_SEGMENT_END, P_SEGMENT_START, P_SEGMENT_TYPE, randomWalkProbability, V_RANDOM_WALK_MUTATION, V_RESET_MUTATION`

  ### Fields inherited from class ec.vector.VectorSpecies

  `C_ANY_POINT, C_GEOMETRIC, C_INTERMED_RECOMB, C_LINE_RECOMB, C_NONE, C_ONE_POINT, C_ONE_POINT_NO_NOP, C_SIMULATED_BINARY, C_TWO_POINT, C_TWO_POINT_NO_NOP, C_UNIFORM, chunksize, crossoverDistributionIndex, crossoverProbability, crossoverType, duplicateRetries, dynamicInitialSize, genomeIncreaseProbability, genomeResizeAlgorithm, genomeSize, lineDistance, maxInitialSize, minInitialSize, mutationProbability, P_CHUNKSIZE, P_CROSSOVER_DISTRIBUTION_INDEX, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_DUPLICATE_RETRIES, P_GENOMESIZE, P_GEOMETRIC_PROBABILITY, P_LINEDISTANCE, P_MUTATIONPROB, P_UNIFORM_MAX, P_UNIFORM_MIN, P_VECTORSPECIES, V_ANY_POINT, V_GEOMETRIC, V_INTERMED_RECOMB, V_LINE_RECOMB, V_ONE_POINT, V_ONE_POINT_NO_NOP, V_SIMULATED_BINARY, V_TWO_POINT, V_TWO_POINT_NO_NOP, V_UNIFORM`

  ### Fields inherited from class ec.Species

  `f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DOVSSpecies()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Parameter`
  `defaultBase()`
  Returns the default base for this prototype.
  `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.
  `ArrayList<Individual>`
  `mostPromisingAreaSamples(EvolutionState state, int size)`
  Sample from the most promising area to get new generation of individual for evaluation.
  `void`
  `setup(EvolutionState state, Parameter base)`
  The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.
  `ArrayList<Individual>`
  `uniqueSamples(EvolutionState state, ArrayList<Individual> candidates)`
  This method will take a candidate list and identify is there is redundant individual in it.
  `void`
  `updateMostPromisingArea(EvolutionState state)`
  Define a most promising area for search of next genertion of individuals.

  ### Methods inherited from class ec.vector.IntegerVectorSpecies

  `inNumericalTypeRange, inNumericalTypeRange, loadParametersForGene, maxGene, minGene, mutationIsBounded, mutationType, randomWalkProbability`

  ### Methods inherited from class ec.vector.VectorSpecies

  `contains, contains, contains, contains, duplicateRetries, fill, fill, fill, fill, initializeGenomeSegmentsByEndIndices, initializeGenomeSegmentsByStartIndices, mutationProbability, newIndividual, setupGenome`

  ### Methods inherited from class ec.Species

  `buildMisc, clone, newIndividual, newIndividual, updateIndividual, updateSubpopulation`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### P_DOVS_SPECIES

    public static final String P_DOVS_SPECIES
    See Also:
      - Constant Field Values

  - ### P_INITIAL_REPETITION

    public static final String P_INITIAL_REPETITION
    See Also:
      - Constant Field Values

  - ### P_STOCHASTIC

    public static final String P_STOCHASTIC
    See Also:
      - Constant Field Values

  - ### P_CONSTRAINTS_SIZE

    public static final String P_CONSTRAINTS_SIZE
    See Also:
      - Constant Field Values

  - ### P_A

    public static final String P_A
    See Also:
      - Constant Field Values

  - ### P_B

    public static final String P_B
    See Also:
      - Constant Field Values

  - ### P_WARM_UP

    public static final String P_WARM_UP
    See Also:
      - Constant Field Values

  - ### 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:
      - `Prototype.setup(EvolutionState,Parameter)`

  - ### 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.