Package ec.simple
Class SimpleInitializer
java.lang.Object
ec.Initializer
ec.simple.SimpleInitializer
- All Implemented Interfaces:
Setup,Singleton,Serializable
- Direct Known Subclasses:
CMAESInitializer,DOVSInitializer,GPInitializer,NEATInitializer,RuleInitializer
SimpleInitializer is a default Initializer which initializes a Population
by calling the Population's populate(...) method. For most applications,
this should suffice.
- See Also:
-
Field Summary
Fields inherited from class ec.Initializer
P_POP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninitialPopulation(EvolutionState state, int thread) Creates, populates, and returns a new population by making a new population, calling setup(...) on it, and calling populate(...) on it, assuming an unthreaded environment (thread 0).voidsetup(EvolutionState state, Parameter base) Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.setupPopulation(EvolutionState state, int thread) Loads a Population from the parameter file, sets it up, and returns it.
-
Constructor Details
-
SimpleInitializer
public SimpleInitializer()
-
-
Method Details
-
setup
Description copied from interface:SetupSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else. -
initialPopulation
Creates, populates, and returns a new population by making a new population, calling setup(...) on it, and calling populate(...) on it, assuming an unthreaded environment (thread 0). Obviously, this is an expensive method. It should only be called once typically in a run.- Specified by:
initialPopulationin classInitializer
-
setupPopulation
Description copied from class:InitializerLoads a Population from the parameter file, sets it up, and returns it.- Specified by:
setupPopulationin classInitializer
-