jaga.experiment
Interface Experiment
- All Superinterfaces:
- java.io.Serializable
- All Known Subinterfaces:
- ConfigurableExperiment, ConfigurableRandomInputExperiment, ConfigurableSequentialCircuitExperiment, SequentialCircuitExperiment
- All Known Implementing Classes:
- MultiOutputExperiment, AddClockExperiment, DLatchExperiment, SimpleOscillatorExperiment, EvenOscillatorExperiment, TestPattern4EvolvingExperiment, ElementParsimonyExperiment, AllOrNothingExperiment
- public interface Experiment
- extends java.io.Serializable
An Experiment is a purpose we wish the individuals to perform, such as
being an AND gate, or surviving in a tank full of piranhas.
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.
- 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.
generateInput
public SampleData[] generateInput(int inputSampleSeparation)
- generates an array of inputs suitable for this 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()
getNumOfOutputs
public int getNumOfOutputs()