Methods
|
|
|
|
__init__
|
__init__ (
self,
env,
interpreter,
)
|
|
__setitem__
|
__setitem__ (
self,
index,
item,
)
|
|
_contextSensitiveCrossoverOccured
|
_contextSensitiveCrossoverOccured ( self )
Called when a context sensitive crossover operation has occured
This can be extended in subclasses to provide feedback.
|
|
_crossoverOccured
|
_crossoverOccured ( self )
Called when a standard crossover operation has occured
This can be extended in subclasses to provide feedback.
|
|
_forceBestOccured
|
_forceBestOccured ( self )
Called when a force best operation has occured
This can be extended in subclasses to provide feedback.
|
|
_makeProgram
|
_makeProgram ( self, lisp )
Factory method for instantiating Programs
Override this in subclasses to instantiate Program subclasses.
|
|
_mutateOccured
|
_mutateOccured ( self )
Called when a mutate operation has occured
This can be extended in subclasses to provide feedback.
|
|
_populateOccured
|
_populateOccured ( self )
Called when an individual program is populated
This can be extended in subclasses to provide feedback.
|
|
_replicateOccured
|
_replicateOccured ( self )
Called when a replicate operation has occured
This can be extended in subclasses to provide feedback.
|
|
_resetStats
|
_resetStats ( self )
|
|
_solutionFound
|
_solutionFound ( self )
Called when the solution has been discovered
This can be extended in subclasses to provide feedback.
|
|
_statsUpdateOccured
|
_statsUpdateOccured ( self )
Called when statistics are calculated for an individual program
Extended to provide console-base feedback
|
|
_statsUpdated
|
_statsUpdated ( self )
Called when the statitistics have been updated
This can be extended in subclasses to provide feedback.
|
|
_updateStats
|
_updateStats ( self )
|
|
breed
|
breed ( self )
Breed the programs until a solution is found
|
|
getAdjustedFitnessSum
|
getAdjustedFitnessSum ( self )
The sum of the adjusted fitnesses of all Programs in list
|
|
getAverageAdjustedFitness
|
getAverageAdjustedFitness ( self )
Returns the average adjusted fitness of the population
|
|
getAverageDepth
|
getAverageDepth ( self )
Reports the average depth of the population
|
|
getBestProgram
|
getBestProgram ( self )
The best Program in the list
|
|
getDeepestDepth
|
getDeepestDepth ( self )
Reports the deepest depth in the population
|
|
getEnvironment
|
getEnvironment ( self )
Returns the current Environment
|
|
getGeneration
|
getGeneration ( self )
Returns the generation number of the population
|
|
getWorstProgram
|
getWorstProgram ( self )
The worst Program in the list
|
|
help
|
help ( self )
|
|
load
|
load ( self, path )
Load a population from a file
|
|
next
|
next ( self )
Breed the programs to create the next generation
|
|
populate
|
populate ( self )
Populate the population
|
|
reset
|
reset ( self )
Reset the Population to its initial (empty) state
|
|
save
|
save ( self )
Save the current population to the file provided
|
|
show
|
show ( self )
Abstract method for showing the Population
Implement this in subclasses to provide custom display formats.
|