public class Chrest
extends java.util.Observable
Constructor and Description |
---|
Chrest() |
Modifier and Type | Method and Description |
---|---|
void |
advanceClock(int time)
Advance the clock by given amount.
|
void |
assignEmotionToCurrentItem(Stm stm,
Emotion emotion)
Attach given emotion to top item in STM, if present.
|
Node |
associateAndLearn(ListPattern pattern1,
ListPattern pattern2) |
Node |
associateAndLearn(ListPattern pattern1,
ListPattern pattern2,
int time)
Used to learn an association between two patterns.
|
ListPattern |
associatePattern(ListPattern pattern)
Asks Chrest to return the image of the node which is associated
with the node obtained by sorting given pattern through the network.
|
void |
clear()
Clear the STM and LTM of the model.
|
void |
constructTemplates()
Instruct model to construct templates, if the 'constructTemplates' flag is true.
|
int |
countTemplates()
Return a count of the number of templates in the model's visual LTM.
|
void |
emoteAndPropagateAcrossModalities(java.lang.Object stmsobject)
Propagate emotion across all the given STMs.
|
void |
freeze()
Instruct model not to update observers.
|
double |
getActionLtmAverageDepth()
Return the average depth of nodes in action long-term memory.
|
int |
getAddLinkTime()
Accessor to retrieve time to add a new link.
|
int |
getClock()
Accessor to retrieve current time of model.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getContentCounts()
Return a map from content sizes to frequencies for the model's LTM.
|
boolean |
getCreateSemanticLinks()
Accessor to option of whether to create semantic links.
|
boolean |
getCreateTemplates()
Accessor to option of whether to create templates.
|
Emotion |
getCurrentEmotion(Stm stm)
Accessor for the emotion associated with the topmost item in STM.
|
Emotion |
getCurrentFollowedByEmotion(Stm stm) |
int |
getDiscriminationTime()
Accessor to retrieve time to discriminate a new node.
|
DomainSpecifics |
getDomainSpecifics()
Retrieve the model's current domain specification.
|
EmotionAssociator |
getEmotionAssociator()
Accessor for Emotion Associator.
|
int |
getFamiliarisationTime()
Accessor to retrieve time to familiarise image of a node.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getImageCounts()
Return a map from image sizes to frequencies for the model's LTM.
|
Node |
getLtmByModality(ListPattern pattern)
Return the root node of the long-term memory which the given pattern
would be sorted through, based on its modality.
|
protected int |
getMinTemplateLevel()
Accessor to value of minimum template level.
|
protected int |
getMinTemplateOccurrences()
Accessor to minimum require occurrences for forming template.
|
java.util.Map<ListPattern,java.lang.Integer> |
getMovePredictions(Scene scene,
int numFixations,
java.lang.String colour)
Return a map of moves vs frequencies.
|
Perceiver |
getPerceiver()
Accessor to retrieve the model's perceiver object.
|
float |
getRho()
Accessor to retrieve value of rho, the probability of learning an item.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getSemanticLinkCounts()
Return a map from number of semantic links to frequencies for the model's LTM.
|
float |
getSimilarityThreshold()
Accessor to retrieve value of similarity threshold, the number of items
which must be shared between two images for a semantic link to be formed.
|
int |
getTotalLtmNodes()
Accessor to retrieve the total number of nodes within LTM.
|
double |
getVerbalLtmAverageDepth()
Return the average depth of nodes in verbal long-term memory.
|
Stm |
getVerbalStm()
Accessor to retrieve verbal short-term memory of model.
|
int |
getVerbalStmSize()
Accessor to retrieve the size of verbal short-term memory.
|
Node |
getVisualLtm()
Accessor to retrieve visual long-term memory of model.
|
double |
getVisualLtmAverageDepth()
Return the average depth of nodes in visual long-term memory.
|
double |
getVisualLtmAverageImageSize()
Return the average image size of nodes in visual long-term memory.
|
Stm |
getVisualStm()
Accessor to retrieve visual short-term memory of model.
|
int |
getVisualStmSize()
Accessor to retrieve the size of visual short-term memory.
|
boolean |
isExperienced()
Model is 'experienced' if it has at least 2000 nodes in LTM.
|
void |
learnAndNamePatterns(ListPattern pattern1,
ListPattern pattern2) |
void |
learnAndNamePatterns(ListPattern pattern1,
ListPattern pattern2,
int time)
Learn and link a visual and verbal pattern with a naming link.
|
void |
learnScene(Scene scene,
int numFixations) |
void |
learnSceneAndMove(Scene scene,
Move move,
int numFixations)
Learn a scene with an attached next move.
|
int |
ltmActionSize()
Return a count of the number of nodes in action long-term memory.
|
int |
ltmVerbalSize()
Return a count of the number of nodes in verbal long-term memory.
|
int |
ltmVisualSize()
Return a count of the number of nodes in visual long-term memory.
|
ListPattern |
namePattern(ListPattern pattern)
Asks Chrest to return the image of the node which names the node
obtained by sorting given pattern through the network.
|
Move |
predictMove(Scene scene,
int numFixations)
Predict a move using a CHUMP-like mechanism.
|
Move |
predictMove(Scene scene,
int numFixations,
java.lang.String colour)
Predict a move using a CHUMP-like mechanism.
|
ListPattern |
recallPattern(ListPattern pattern)
Asks Chrest to return the image of the node obtained by sorting given
pattern through the network.
|
Node |
recognise(ListPattern pattern)
Retrieve a node in long-term memory using the given ListPattern.
|
Node |
recogniseAndLearn(ListPattern pattern)
Used to learn about a new pattern.
|
Node |
recogniseAndLearn(ListPattern pattern,
int time)
Use given ListPattern to perform a step of learning within the network.
|
Scene |
scanScene(Scene scene,
int numFixations)
Scan given scene, then return a scene which would be recalled.
|
Scene |
scanScene(Scene scene,
int numFixations,
boolean clearStm)
Scan given scene, then return a scene which would be recalled.
|
void |
setAddLinkTime(int time)
Modify time to add a new link.
|
void |
setCreateSemanticLinks(boolean value)
Modify option to create semantic links.
|
void |
setCreateTemplates(boolean value)
Modify option to create templates.
|
void |
setDefaultAlpha(double alpha) |
void |
setDiscriminationTime(int time)
Modify time to discriminate a new node.
|
void |
setDomain(DomainSpecifics domain)
Set the domain specification.
|
void |
setFamiliarisationTime(int time)
Modify time to familiarise image of a node.
|
void |
setRho(float rho)
Modify value of rho, the probability of learning an item.
|
void |
setSimilarityThreshold(int threshold)
Modify value of similarity threshold.
|
void |
setTemplateConstructionParameters(int minLevel,
int minOccurrences)
Modify values for template construction.
|
void |
setVerbalStmSize(int size)
Modify size of verbal short-term memory.
|
void |
setVisualStmSize(int size)
Modify size of visual short-term memory.
|
void |
unfreeze()
Instruct model to now update observers for future changes.
|
void |
writeModelAsVna(java.io.Writer writer)
Write model to given Writer object in VNA format
|
void |
writeModelSemanticLinksAsVna(java.io.Writer writer)
Write model semantic links to given Writer object in VNA format
|
public DomainSpecifics getDomainSpecifics()
public void setDomain(DomainSpecifics domain)
public int getAddLinkTime()
public void setAddLinkTime(int time)
public int getDiscriminationTime()
public void setDiscriminationTime(int time)
public int getFamiliarisationTime()
public void setFamiliarisationTime(int time)
public float getRho()
public void setRho(float rho)
public float getSimilarityThreshold()
public void setSimilarityThreshold(int threshold)
public void setCreateSemanticLinks(boolean value)
public boolean getCreateSemanticLinks()
public void setCreateTemplates(boolean value)
public boolean getCreateTemplates()
protected int getMinTemplateLevel()
protected int getMinTemplateOccurrences()
public void setTemplateConstructionParameters(int minLevel, int minOccurrences)
public int getVisualStmSize()
public void setVisualStmSize(int size)
public int getVerbalStmSize()
public void setVerbalStmSize(int size)
public int getClock()
public void advanceClock(int time)
public int getTotalLtmNodes()
public Stm getVisualStm()
public Stm getVerbalStm()
public Node getVisualLtm()
public int ltmVisualSize()
public double getVisualLtmAverageDepth()
public double getVisualLtmAverageImageSize()
public int ltmVerbalSize()
public double getVerbalLtmAverageDepth()
public int ltmActionSize()
public double getActionLtmAverageDepth()
public boolean isExperienced()
public void constructTemplates()
public int countTemplates()
public Node getLtmByModality(ListPattern pattern)
public void freeze()
public void unfreeze()
public java.util.Map<java.lang.Integer,java.lang.Integer> getContentCounts()
public java.util.Map<java.lang.Integer,java.lang.Integer> getImageCounts()
public java.util.Map<java.lang.Integer,java.lang.Integer> getSemanticLinkCounts()
public Perceiver getPerceiver()
public Node recognise(ListPattern pattern)
public Node recogniseAndLearn(ListPattern pattern, int time)
public Node recogniseAndLearn(ListPattern pattern)
public Node associateAndLearn(ListPattern pattern1, ListPattern pattern2, int time)
public Node associateAndLearn(ListPattern pattern1, ListPattern pattern2)
public ListPattern recallPattern(ListPattern pattern)
public ListPattern associatePattern(ListPattern pattern)
public ListPattern namePattern(ListPattern pattern)
public void learnAndNamePatterns(ListPattern pattern1, ListPattern pattern2, int time)
public void learnAndNamePatterns(ListPattern pattern1, ListPattern pattern2)
public void learnScene(Scene scene, int numFixations)
public void learnSceneAndMove(Scene scene, Move move, int numFixations)
public java.util.Map<ListPattern,java.lang.Integer> getMovePredictions(Scene scene, int numFixations, java.lang.String colour)
public Move predictMove(Scene scene, int numFixations)
public Move predictMove(Scene scene, int numFixations, java.lang.String colour)
public Scene scanScene(Scene scene, int numFixations)
public Scene scanScene(Scene scene, int numFixations, boolean clearStm)
public void clear()
public void writeModelAsVna(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void writeModelSemanticLinksAsVna(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void setDefaultAlpha(double alpha)
public EmotionAssociator getEmotionAssociator()
public void emoteAndPropagateAcrossModalities(java.lang.Object stmsobject)
public void assignEmotionToCurrentItem(Stm stm, Emotion emotion)
public Emotion getCurrentEmotion(Stm stm)