This highly configurable class represents an environment in which
the genetic programming takes place.
Methods
|
|
|
|
__init__
|
__init__ ( self )
|
|
_readPutsFromFile
|
_readPutsFromFile ( self, putsfile )
|
|
getCSCrossoverP
|
getCSCrossoverP ( self )
Return the probability of a context sensitive crossover operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
getCrossoverP
|
getCrossoverP ( self )
Return the probability of a standard crossover operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
getFitnessEvaluator
|
getFitnessEvaluator ( self )
Return the fitness evaluator
This is an instance of FitnessEvaluator which is used to evaluate
Program fitness.
|
|
getForceBest
|
getForceBest ( self )
Returns the number of instance of the best program per generation that will be forced to replicate
If its zero, the feature is effectively disabled
|
|
getInitialProgramDepth
|
getInitialProgramDepth ( self )
Return the initial program depth
This is maximum initial program depth a Population will have.
|
|
getInput
|
getInput ( self )
Get the input list
The input list is a list of vectors represented as lists. There is no
limit to the dimensionality of the vectors.
|
|
getMaxProgramDepth
|
getMaxProgramDepth ( self )
Return the maximum program depth allowed
This is maximum program depth a Population can develop.
|
|
getMutateP
|
getMutateP ( self )
Return the probability of a mutation operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
getName
|
getName ( self )
Return the name of this run
This can be used to log, save, load, and resume runs.
|
|
getOneArgs
|
getOneArgs ( self )
|
|
getOutput
|
getOutput ( self )
Get the output list
The output list is a list of single outputs.
|
|
getPopulationSize
|
getPopulationSize ( self )
Return the population size
This is the size the population is initialize to and
will remain throughout a run.
|
|
getPrecision
|
getPrecision ( self )
Returns the numeric value of how close a Program answer must be to be considered a hit
|
|
getProgramSelector
|
getProgramSelector ( self )
Return the program selector
This is an instance of ProgramSelector which is used to select
programs from the Population.
|
|
getReplicateP
|
getReplicateP ( self )
Return the probability of a replication operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
getTerminals
|
getTerminals ( self )
|
|
getTwoArgs
|
getTwoArgs ( self )
|
|
getVocabulary
|
getVocabulary ( self )
Returns the vocabulary
The vocabulary is represented as a list containing three sublists in
the following format:
[ terminals-list, one-argument-function-list, two-argument-function-list ]
|
|
help
|
help ( self )
|
|
initialize
|
initialize ( self, interpreter )
Initialize any remaining properties.
This should be called after command-line parameter application
|
|
inputCount
|
inputCount ( self )
Returns the number of inputs in the input list
...
|
|
setCSCrossoverP
|
setCSCrossoverP ( self, P )
Set the probability of a context sensitive crossover operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
setCrossoverP
|
setCrossoverP ( self, P )
Set the probability of a standard crossover operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
setForceBest
|
setForceBest ( self, forcebest )
Set the number of instance of the best program per generation that will be forced to replicate
If its zero, the feature is effectively disabled
|
|
setInitialProgramDepth
|
setInitialProgramDepth ( self, d )
Set the initial program depth
This is maximum initial program depth a Population will have.
|
|
setInput
|
setInput ( self, input )
Set the input list
The input list is a list of vectors represented as lists. There is no
limit to the dimensionality of the vectors.
|
|
setMaxProgramDepth
|
setMaxProgramDepth ( self, d )
Set the maximum program depth to allow
This is maximum program depth a Population can develop.
|
|
setMutateP
|
setMutateP ( self, P )
Set the probability of a mutation operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
setName
|
setName ( self, name )
Set the name of this run
This can be used to log, save, load, and resume runs.
|
|
setOneArgs
|
setOneArgs ( self, oneargs )
|
|
setOutput
|
setOutput ( self, output )
Set the output list
The output list is a list of single outputs.
|
|
setPopulationSize
|
setPopulationSize ( self, s )
Set the size of the population to use
This is the size the population is initialize to and
will remain throughout a run.
|
|
setPrecision
|
setPrecision ( self, precision )
Sets the numeric value of how close a Program answer must be to be considered a hit
|
|
setReplicateP
|
setReplicateP ( self, P )
Set the probability of a replication operation occuring each turn during breeding
This should be a number from 0 to 1. The sum of all the genetic
operation probability parameters must be exactly 1.
|
|
setTerminals
|
setTerminals ( self, terminals )
|
|
setTwoArgs
|
setTwoArgs ( self, twoargs )
|
|
setVocabulary
|
setVocabulary ( self, vocabulary )
Set the vocabulary
The vocabulary is represented as a list containing three sublists in
the following format:
[ terminals-list, one-argument-function-list, two-argument-function-list ]
|
|
useFitnessProportionateSelection
|
useFitnessProportionateSelection ( self, fitnessDependence )
Use a fitness proportionate selection method
Program selection for genetic operations will be biased
towards more fit individuals.
|
|
useInputsFromFile
|
useInputsFromFile ( self, inputsfile )
Use the input set contained in the specified file
The file must be in ASCII comma delimited (CSV) format. One input vector
per line, with each dimension seperated by commas.
|
|
useLispEnvironmentFile
|
useLispEnvironmentFile ( self, filename )
|
|
useLispExpressionOutputGeneration
|
useLispExpressionOutputGeneration ( self, expr )
Use the specified lisp expression to generate outputs
The specified expression should be a valid lisp expression
accessible to the interpreter. The expression must expect
the input vector values as lisp variables in the form
INPUT1,INPUT2,...INPUTn for an n dimensional input space.
|
|
useLispFunctionDevianceCalculation
|
useLispFunctionDevianceCalculation ( self, name )
Use the specified lisp function for deviance calculation
Sets the deviance calculation method to be based on a lisp function call
with the specified name.
|
|
useOutputDevianceCalculation
|
useOutputDevianceCalculation ( self )
Use the output list for deviance calculation
The output list is compared directly with the actual results of the Program
being tested.
|
|
useOutputsFromFile
|
useOutputsFromFile ( self, outputsfile )
Use the output set contained in the specified file
The file must be an ASCII file with one line per output. The can
only be one output per line.
|
|
usePythonClassDevianceCalculation
|
usePythonClassDevianceCalculation (
self,
module,
classname,
)
Use the specified DevianceCalculator subclass for deviance calculation
The name of a DevianceCalculator subclass must be specified along with the
name of the module that contains it.
|
|
usePythonClassOutputGeneration
|
usePythonClassOutputGeneration (
self,
module,
classname,
)
Use the specied OutputGenerator subclass to generate outputs
The name of a OutputGenerator subclass must be specified along with the
name of the module that contains it. When activated, this class should
generate the output list based on the values in the input list.
|
|
useTournamentSelection
|
useTournamentSelection ( self, size )
Use a tourament selection method
Program selection for genetic operations will be based on
the winner of a tournament of the specified size.
|
|
useVocabularyFile
|
useVocabularyFile ( self, filename )
Set the vocabulary to the contents of the specified file
The file must be an ASCII file with three lines. The first line
should be a comma seperated list of TERMINAL values. The second
line should be a comma seperated list of ONE-ARGUMENT lisp
functions. The third line should be a comma seperated list of
TWO-ARGUMENT functions.
|