Package ec.simple
Class SimpleEvaluator
java.lang.Object
ec.Evaluator
ec.simple.SimpleEvaluator
- All Implemented Interfaces:
Setup,Singleton,Serializable
- Direct Known Subclasses:
DEEvaluator,DOVSEvaluator,SimpleGroupedEvaluator,SteadyStateEvaluator
The SimpleEvaluator is a simple, non-coevolved generational evaluator which
evaluates every single member of every subpopulation individually in its
own problem space. One Problem instance is cloned from p_problem for
each evaluating thread, and chunks of individuals are sent to each thread
for evaluation.
The Problem must implement either SimpleProblemForm or GroupedProblemForm.
If a GroupedProblemForm is provided, then an entire chunk of individuals is
sent to the problem to be evaluated together in a batch. If a SimpleProblemForm
is provided, then each thread sends individuals sequentially to be evaluated
one-at-a-time.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intbooleanstatic final intstatic final intstatic final intintintstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ec.Evaluator
masterproblem, P_IAMSLAVE, P_MASTERPROBLEM, p_problem, P_PROBLEM, runComplete -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidevalPopChunk(EvolutionState state, int[] numinds, int[] from, int threadnum, Problem p) A private helper function for evaluatePopulation which evaluates a chunk of individuals in a subpopulation for a given thread.voidevaluatePopulation(EvolutionState state) A simple evaluator that doesn't do any coevolutionary evaluation.runComplete(EvolutionState state) The SimpleEvaluator determines that a run is complete by asking each individual in each population if he's optimal; if he finds an individual somewhere that's optimal, he signals that the run is complete.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.Methods inherited from class ec.Evaluator
closeContacts, initializeContacts, postEvaluationGlobalUpdate, postEvaluationLocalUpdate, reinitializeContacts, setRunComplete
-
Field Details
-
P_CLONE_PROBLEM
- See Also:
-
P_NUM_TESTS
- See Also:
-
P_MERGE
- See Also:
-
V_MEAN
- See Also:
-
V_MEDIAN
- See Also:
-
V_BEST
- See Also:
-
P_CHUNK_SIZE
- See Also:
-
V_AUTO
- See Also:
-
MERGE_MEAN
public static final int MERGE_MEAN- See Also:
-
MERGE_MEDIAN
public static final int MERGE_MEDIAN- See Also:
-
MERGE_BEST
public static final int MERGE_BEST- See Also:
-
numTests
public int numTests -
mergeForm
public int mergeForm -
cloneProblem
public boolean cloneProblem -
C_AUTO
public static final int C_AUTO- See Also:
-
pool
-
-
Constructor Details
-
SimpleEvaluator
public SimpleEvaluator()
-
-
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. -
evaluatePopulation
A simple evaluator that doesn't do any coevolutionary evaluation. Basically it applies evaluation pipelines, one per thread, to various subchunks of a new population.- Specified by:
evaluatePopulationin classEvaluator
-
runComplete
The SimpleEvaluator determines that a run is complete by asking each individual in each population if he's optimal; if he finds an individual somewhere that's optimal, he signals that the run is complete.- Specified by:
runCompletein classEvaluator
-
evalPopChunk
protected void evalPopChunk(EvolutionState state, int[] numinds, int[] from, int threadnum, Problem p) A private helper function for evaluatePopulation which evaluates a chunk of individuals in a subpopulation for a given thread. Although this method is declared protected, you should not call it.
-