jaga.pj.circuits.experiment
Class TestPattern4EvolvingExperiment
java.lang.Object
|
+--jaga.pj.circuits.experiment.TestPattern4EvolvingExperiment
- All Implemented Interfaces:
- Experiment, java.io.Serializable
- public class TestPattern4EvolvingExperiment
- extends java.lang.Object
- implements Experiment
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TestPattern4EvolvingExperiment
public TestPattern4EvolvingExperiment(Experiment exp)
- Creates new TestPatter4EvolvingExperiment
getFitness
public double getFitness(SampleData[] in,
SampleData[] out)
- returns a fitness associated to a given input/output pair for
this experiment. The fitness is a double and is in adjusted
fitness format. From 0 to 1, 1 being perfectly fit.
*WARNING* Assumes inputs were generated in same class.
- Specified by:
getFitness
in interface Experiment
- Parameters:
in
- array of inputsout
- array of outputs
generateInput
public SampleData[] generateInput()
- generates an array of inputs suitable for this experiment
using default input sample separation.
- Specified by:
generateInput
in interface Experiment
generateInput
public SampleData[] generateInput(int inputSampleSeparation)
- generates an array of inputs suitable for this experiment.
- Specified by:
generateInput
in interface Experiment
- Parameters:
inputSampleSeparation
- relative frequency of input to output samples. If this is n, then n outputs will be sampled for every change in inputs.
getNumOfInputs
public int getNumOfInputs()
- Specified by:
getNumOfInputs
in interface Experiment
getNumOfOutputs
public int getNumOfOutputs()
- Specified by:
getNumOfOutputs
in interface Experiment
generateInput
public SampleData[] generateInput(Genotype ind,
int sampleSeparation)
- Generates an input sequence based on the standard input sequence of the
experiment plus an input sequence defined by the test pattern individual.
Here is where the genotype->phenotype mapping for test patterns is:
- Each chunk of [numInputs] bits represents one line of test input pattern.
- Parameters:
ind
- the test pattern individual.
setNextCircuitFitness
public void setNextCircuitFitness(double ncf)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object