public class LearnerCodelet extends Codelet
| Constructor and Description |
|---|
LearnerCodelet(int nStimuli,
int nActions,
RawMemory rawMemory,
WorkingStorage ws) |
| Modifier and Type | Method and Description |
|---|---|
void |
accessMemoryObjects()
This method is used in every Codelet to capture input, broadcast and
output MemoryObjects which shall be used in the proc() method.
|
void |
calculateActivation()
This abstract method must be implemented by the user.
|
int[] |
getGenotypeFromPhenotype(int[] phenotype) |
double |
getGoal_fitness() |
static int |
getMaxEventsSequenceLenght() |
int |
getMaxNumberOfNodes() |
int |
getMaxNumberOfSolutions() |
int |
getMinNumberOfNodes()
Lower bound for number of nodes the solution tree can have.
|
static int |
getnActions() |
static int |
getnNodes() |
static int |
getnReRuns() |
static int |
getnStimuli() |
boolean |
isEnabled() |
boolean |
isPrintLearnedSolutionTree() |
boolean |
isPrintSequenceUsedForLearning() |
void |
proc()
Main Codelet function, to be implemented in each subclass.
|
void |
setEnabled(boolean enabled)
Set the enable status.
|
void |
setGoalFitness(double goal_fitness) |
void |
setMaxEventsSequenceLenght(int Max_Events_Sequence_Lenght) |
void |
setMaxNumberOfNodes(int maxNumberOfNodes)
Higher bound for number of nodes the solution tree can have.
|
void |
setMaxNumberOfSolutions(int maxNumberOfSolutions) |
static void |
setnActions(int nActions) |
static void |
setnNodes(int nNodes) |
static void |
setnReRuns(int nReRuns) |
static void |
setnStimuli(int nStimuli) |
void |
setPrintLearnedSolutionTree(boolean printLearnedSolutionTree) |
void |
setPrintSequenceUsedForLearning(boolean printSequenceUsedForLearning) |
addBroadcast, addBroadcasts, addInput, addInputs, addOutput, addOutputs, getActivation, getBroadcast, getBroadcast, getBroadcast, getEnabled, getInput, getInput, getInputs, getInputsOfType, getName, getOutput, getOutput, getOutputs, getOutputsOfType, getThreadName, getThreshold, getTimeStep, impendingAccess, impendingAccessBuffer, isLoop, isProfiling, notifyCodelet, removeFromInput, removeFromOutput, removesInput, removesOutput, run, setActivation, setBroadcast, setCodeletProfiler, setInputs, setIsMemoryObserver, setLoop, setName, setOutputs, setProfiling, setThreshold, setTimeStep, shouldLoop, start, stop, toStringpublic LearnerCodelet(int nStimuli,
int nActions,
RawMemory rawMemory,
WorkingStorage ws)
public void accessMemoryObjects()
CodeletaccessMemoryObjects in class Codeletpublic void calculateActivation()
CodeletcalculateActivation in class Codeletpublic void proc()
Codeletpublic double getGoal_fitness()
public void setGoalFitness(double goal_fitness)
public static int getMaxEventsSequenceLenght()
public void setMaxEventsSequenceLenght(int Max_Events_Sequence_Lenght)
Max_Events_Sequence_Lenght - the Max_Events_Sequence_Lenght to setpublic int[] getGenotypeFromPhenotype(int[] phenotype)
public boolean isEnabled()
public void setEnabled(boolean enabled)
CodeletsetEnabled in class Codeletenabled - the enabled to setpublic static int getnNodes()
public static void setnNodes(int nNodes)
nNodes - the nNodes to setpublic static int getnActions()
public static void setnActions(int nActions)
nActions - the nActions to setpublic static int getnStimuli()
public static void setnStimuli(int nStimuli)
nStimuli - the nStimuli to setpublic static int getnReRuns()
public static void setnReRuns(int nReRuns)
nReRuns - the nReRuns to setpublic boolean isPrintLearnedSolutionTree()
public void setPrintLearnedSolutionTree(boolean printLearnedSolutionTree)
printLearnedSolutionTree - the printLearnedSolutionTree to setpublic boolean isPrintSequenceUsedForLearning()
public void setPrintSequenceUsedForLearning(boolean printSequenceUsedForLearning)
printSequenceUsedForLearning - the printSequenceUsedForLearning to setpublic int getMaxNumberOfSolutions()
public void setMaxNumberOfSolutions(int maxNumberOfSolutions)
maxNumberOfSolutions - the maxNumberOfSolutions to setpublic int getMaxNumberOfNodes()
public void setMaxNumberOfNodes(int maxNumberOfNodes)
maxNumberOfNodes - the maxNumberOfNodes to setpublic int getMinNumberOfNodes()