com.epochx.model.multiplexer
Class Multiplexer6Bit

java.lang.Object
  extended by com.epochx.core.GPAbstractModel<java.lang.Boolean>
      extended by com.epochx.model.multiplexer.Multiplexer6Bit
All Implemented Interfaces:
GPModel<java.lang.Boolean>, CrossoverListener<java.lang.Boolean>, ElitismListener<java.lang.Boolean>, GenerationListener, InitialisationListener<java.lang.Boolean>, LifeCycleListener<java.lang.Boolean>, MutationListener<java.lang.Boolean>, PoolSelectionListener<java.lang.Boolean>, ReproductionListener<java.lang.Boolean>, TerminationListener, CrossoverStatListener, GenerationStatListener, MutationStatListener, RunStatListener

public class Multiplexer6Bit
extends GPAbstractModel<java.lang.Boolean>


Constructor Summary
Multiplexer6Bit()
           
 
Method Summary
 void configure()
           
 double getFitness(CandidateProgram<java.lang.Boolean> program)
          Calculates and returns the fitness score of the given program.
 java.util.List<FunctionNode<java.lang.Boolean>> getFunctions()
          Retrieves the set of function nodes.
 java.util.List<TerminalNode<java.lang.Boolean>> getTerminals()
          Retrieves the set of terminal nodes.
 
Methods inherited from class com.epochx.core.GPAbstractModel
acceptCrossover, acceptMutation, crossoverStats, generationStats, getCrossover, getCrossoverProbability, getCrossoverStatFields, getCrossoverStatListener, getGenerationStatListener, getGenStatFields, getInitialiser, getInitialMaxDepth, getLifeCycleListener, getMaxProgramDepth, getMutationProbability, getMutationStatFields, getMutationStatListener, getMutator, getNoElites, getNoGenerations, getNoRuns, getPoolSelector, getPoolSize, getPopulationSize, getProgramSelector, getReproductionProbability, getRNG, getRunStatFields, getRunStatListener, getSyntax, getTerminationFitness, mutationStats, onCrossover, onElitism, onFitnessTermination, onGenerationStart, onGenerationTermination, onInitialisation, onMutation, onPoolSelection, onReproduction, runStats, setCrossover, setCrossoverProbability, setCrossoverStatFields, setCrossoverStatListener, setGenerationStatListener, setGenStatFields, setInitialiser, setInitialMaxDepth, setLifeCycleListener, setMaxProgramDepth, setMutationProbability, setMutationStatFields, setMutationStatListener, setMutator, setNoElites, setNoGenerations, setNoRuns, setPoolSelector, setPoolSize, setPopulationSize, setProgramSelector, setRNG, setRunStatFields, setRunStatListener, setTerminationFitness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Multiplexer6Bit

public Multiplexer6Bit()
Method Detail

configure

public void configure()

getFunctions

public java.util.List<FunctionNode<java.lang.Boolean>> getFunctions()
Description copied from interface: GPModel
Retrieves the set of function nodes.

Returns:
the function nodes to be used during evolution.

getTerminals

public java.util.List<TerminalNode<java.lang.Boolean>> getTerminals()
Description copied from interface: GPModel
Retrieves the set of terminal nodes.

Returns:
the terminal nodes to be used during evolution.

getFitness

public double getFitness(CandidateProgram<java.lang.Boolean> program)
Description copied from interface: GPModel
Calculates and returns the fitness score of the given program. The score returned by this method provides the underlying way in which Candidate Programs are selected. The GP system will attempt to improve the value returned by this method over the generations. A fitness value of 0.0 is better than a fitness value of 1.0.

There are many ways in which a fitness score can be calculated, for example mean squared error, standard deviation or a simple count of how many known inputs the given program provides incorrect (known) outputs. For more information, the new user should read some of the genetic programming literature.

Parameters:
program - the CandidateProgram to evaluate and calculate a score for.
Returns:
a double representing the quality of the program where a small value is considered better than a larger value.