public class MajorityGP extends GPProblem implements SimpleProblemForm
| Modifier and Type | Field and Description |
|---|---|
(package private) CA |
ca |
static int |
CA_WIDTH |
(package private) double |
density |
private Object[] |
lock |
(package private) int |
lockCount |
(package private) int[] |
majorities |
(package private) static int |
MAJORITY_ONE |
(package private) static int |
MAJORITY_ZERO |
static int |
NEIGHBORHOOD |
static int |
NUM_TESTS |
static int |
NUM_TRIALS |
(package private) static int |
RANDOM |
static int |
STEPS |
(package private) int[][] |
trials |
| Constructor and Description |
|---|
MajorityGP() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
all(int[] vals,
int val) |
void |
describe(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum,
int log)
Part of SimpleProblemForm.
|
void |
evaluate(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum)
Evaluates the individual in ind, if necessary (perhaps
not evaluating them if their evaluated flags are true),
and sets their fitness appropriately.
|
void |
finishEvaluating(EvolutionState state,
int threadnum)
Will be called by the Evaluator after prepareToEvaluate(...) is called
and then a series of individuals are evaluated.
|
void |
generateTrials(EvolutionState state,
int thread) |
(package private) boolean |
makeTrial(EvolutionState state,
int thread,
int[] trial,
int trialType) |
void |
prepareToEvaluate(EvolutionState state,
int threadnum)
May be called by the Evaluator prior to a series of individuals to
evaluate, and then ended with a finishEvaluating(...).
|
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
clone, defaultBasecanEvaluate, closeContacts, describe, initializeContacts, reinitializeContactsCA ca
public static final int NUM_TRIALS
public static final int CA_WIDTH
public static final int NEIGHBORHOOD
public static final int STEPS
int[][] trials
int[] majorities
static final int MAJORITY_ZERO
static final int MAJORITY_ONE
static final int RANDOM
int lockCount
private Object[] lock
public static final int NUM_TESTS
double density
boolean makeTrial(EvolutionState state, int thread, int[] trial, int trialType)
public void generateTrials(EvolutionState state, int thread)
public void setup(EvolutionState state, Parameter base)
PrototypeFor prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
public void prepareToEvaluate(EvolutionState state, int threadnum)
ProblemprepareToEvaluate in class Problempublic void finishEvaluating(EvolutionState state, int threadnum)
ProblemfinishEvaluating in class Problempublic static boolean all(int[] vals,
int val)
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemFormevaluate in interface SimpleProblemFormpublic void describe(EvolutionState state, Individual ind, int subpopulation, int threadnum, int log)
Problemdescribe in interface SimpleProblemFormdescribe in class ProblemCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.