org.jactr.core.chunk.basic
Class AbstractSubsymbolicChunk

java.lang.Object
  extended by org.jactr.core.chunk.basic.AbstractSubsymbolicChunk
All Implemented Interfaces:
ISubsymbolicChunk, IParameterized
Direct Known Subclasses:
DefaultSubsymbolicChunk4

public abstract class AbstractSubsymbolicChunk
extends java.lang.Object
implements ISubsymbolicChunk


Field Summary
 
Fields inherited from interface org.jactr.core.chunk.ISubsymbolicChunk
ACTIVATION, BASE_LEVEL_ACTIVATION, CREATION_TIME, REFERENCE_COUNT, REFERENCE_TIMES, SOURCE_ACTIVATION, SPREADING_ACTIVATION, TIMES_IN_CONTEXT, TIMES_NEEDED
 
Constructor Summary
AbstractSubsymbolicChunk(IChunk parent)
           
 
Method Summary
 void accessed(double time)
          Is called whenever the chunk is accessed (check via a condition or modified via an action in a IProduction) ? it can only be called once per cycle since the ReferenceList maintains a listing of unique access times.
 void dispose()
          Description of the Method
 void encode(double when)
          non-locking since this will set creation time
 double getActivation()
          Return the total activation (summation of base-level, spreading, and noise).
 double getBaseLevelActivation()
          Return the current base level activation.
 double getCreationTime()
           
 java.lang.String getParameter(java.lang.String key)
          return parameter value - null if not defined.
 java.util.Collection<java.lang.String> getPossibleParameters()
          Return all parameters that can be read
 IReferences getReferences()
          The org.jactr.misc.ReferenceList class maintains an optimized list of access times and access counts.
 java.util.Collection<java.lang.String> getSetableParameters()
          Return list of all parameters that can be set.
 double getSourceActivation()
          returns the transient amount of source activation
 double getSpreadingActivation()
          Get the transient amount of spreading activation to this chunk.
 int getTimesInContext()
          Get the number of times this chunk has been a slot value of a chunk in the goal buffer.
 int getTimesNeeded()
          Return the number of times that this chunk has been needed in a buffer other than the goal buffer.
 void incrementTimesInContext()
          Description of the Method
 void incrementTimesNeeded()
          Description of the Method
 void setActivation(double act)
          Set the total activation.
 void setBaseLevelActivation(double base)
          Set the base-level activation.
 void setCreationTime(double time)
          set the creation time and pass on an event.
 void setParameter(java.lang.String key, java.lang.String value)
          Set the named parameter
 void setSourceActivation(double source)
          Set the source activation of this chunk.
 void setSpreadingActivation(double spread)
          Sets the spreadingActivation attribute of the ISubsymbolicChunk object
 void setTimesInContext(int context)
          Set number of times this chunk has been a slot value of a chunk in the goal buffer.
 void setTimesNeeded(int needed)
          Sets the number of times that this chunk has been needed in a buffer other than the goal buffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSubsymbolicChunk

public AbstractSubsymbolicChunk(IChunk parent)
Method Detail

accessed

public void accessed(double time)
Description copied from interface: ISubsymbolicChunk
Is called whenever the chunk is accessed (check via a condition or modified via an action in a IProduction) ? it can only be called once per cycle since the ReferenceList maintains a listing of unique access times.

Specified by:
accessed in interface ISubsymbolicChunk
Parameters:
time - TODO

dispose

public void dispose()
Description copied from interface: ISubsymbolicChunk
Description of the Method

Specified by:
dispose in interface ISubsymbolicChunk

encode

public void encode(double when)
non-locking since this will set creation time

Specified by:
encode in interface ISubsymbolicChunk
See Also:
ISubsymbolicChunk.encode(double)

getActivation

public double getActivation()
Description copied from interface: ISubsymbolicChunk
Return the total activation (summation of base-level, spreading, and noise). The activation values are only computed once per cycle and then cached. If this call occurs and the value has not been calculated, it will be calculated, cached and then returned.

Specified by:
getActivation in interface ISubsymbolicChunk
Returns:
The activation value

getBaseLevelActivation

public double getBaseLevelActivation()
Description copied from interface: ISubsymbolicChunk
Return the current base level activation. This is a function of the current model time and the recency and frequency of access of the chunk.

Specified by:
getBaseLevelActivation in interface ISubsymbolicChunk
Returns:
The baseLevelActivation value

getCreationTime

public double getCreationTime()
Specified by:
getCreationTime in interface ISubsymbolicChunk
Returns:
chunk's creation time

getReferences

public IReferences getReferences()
Description copied from interface: ISubsymbolicChunk
The org.jactr.misc.ReferenceList class maintains an optimized list of access times and access counts. These values are used to compute the basic power-law functions of base-level decay etc. This returns the actual list, programmers should be wary not to corrupt the list.

Specified by:
getReferences in interface ISubsymbolicChunk
Returns:
The referenceList value

getSourceActivation

public double getSourceActivation()
Description copied from interface: ISubsymbolicChunk
returns the transient amount of source activation

Specified by:
getSourceActivation in interface ISubsymbolicChunk
Returns:
The sourceActivation value

getSpreadingActivation

public double getSpreadingActivation()
Description copied from interface: ISubsymbolicChunk
Get the transient amount of spreading activation to this chunk. The spreading activation passes from any chunk with a source activation != 0 to all of its associated chunks (via. Actr.chunk.four.Link).

Specified by:
getSpreadingActivation in interface ISubsymbolicChunk
Returns:
The spreadingActivation value

getTimesInContext

public int getTimesInContext()
Description copied from interface: ISubsymbolicChunk
Get the number of times this chunk has been a slot value of a chunk in the goal buffer.

Specified by:
getTimesInContext in interface ISubsymbolicChunk
Returns:
The timesInContext value

getTimesNeeded

public int getTimesNeeded()
Description copied from interface: ISubsymbolicChunk
Return the number of times that this chunk has been needed in a buffer other than the goal buffer.

Specified by:
getTimesNeeded in interface ISubsymbolicChunk
Returns:
The timesNeeded value

incrementTimesInContext

public void incrementTimesInContext()
Description copied from interface: ISubsymbolicChunk
Description of the Method

Specified by:
incrementTimesInContext in interface ISubsymbolicChunk

incrementTimesNeeded

public void incrementTimesNeeded()
Description copied from interface: ISubsymbolicChunk
Description of the Method

Specified by:
incrementTimesNeeded in interface ISubsymbolicChunk

setActivation

public void setActivation(double act)
Description copied from interface: ISubsymbolicChunk
Set the total activation. If none of the activation learning equations are enabled, this value will be passed on to the base-level activation, and all other values will be zeroed.

Specified by:
setActivation in interface ISubsymbolicChunk
Parameters:
act - The new activation value

setBaseLevelActivation

public void setBaseLevelActivation(double base)
Description copied from interface: ISubsymbolicChunk
Set the base-level activation. If IModel.isBaseLevelLearningEnabled() is true, this value will change on a cycle basis.

Specified by:
setBaseLevelActivation in interface ISubsymbolicChunk
Parameters:
base - The new baseLevelActivation value

setCreationTime

public void setCreationTime(double time)
Description copied from interface: ISubsymbolicChunk
set the creation time and pass on an event.

Specified by:
setCreationTime in interface ISubsymbolicChunk
Parameters:
time - The new creationTime value

setSourceActivation

public void setSourceActivation(double source)
Description copied from interface: ISubsymbolicChunk
Set the source activation of this chunk. This chunk must be a slot value of another chunk that is in an activation propogating buffer (the goal buffer for instance). This is called by the IActivationBuffer after a call to IActivationBuffer.setSourceChunk(IChunk).

Specified by:
setSourceActivation in interface ISubsymbolicChunk
Parameters:
source - The new sourceActivation value

setSpreadingActivation

public void setSpreadingActivation(double spread)
Description copied from interface: ISubsymbolicChunk
Sets the spreadingActivation attribute of the ISubsymbolicChunk object

Specified by:
setSpreadingActivation in interface ISubsymbolicChunk
Parameters:
spread - The new spreadingActivation value

setTimesInContext

public void setTimesInContext(int context)
Description copied from interface: ISubsymbolicChunk
Set number of times this chunk has been a slot value of a chunk in the goal buffer. passes on an event.

Specified by:
setTimesInContext in interface ISubsymbolicChunk
Parameters:
context - The new timesInContext value

setTimesNeeded

public void setTimesNeeded(int needed)
Description copied from interface: ISubsymbolicChunk
Sets the number of times that this chunk has been needed in a buffer other than the goal buffer. This is used in the calculation of the strengths of association. passes on an event.

Specified by:
setTimesNeeded in interface ISubsymbolicChunk
Parameters:
needed - The new timesNeeded value

getParameter

public java.lang.String getParameter(java.lang.String key)
Description copied from interface: IParameterized
return parameter value - null if not defined.

Specified by:
getParameter in interface IParameterized
Parameters:
key - Description of the Parameter
Returns:
The parameter value

getPossibleParameters

public java.util.Collection<java.lang.String> getPossibleParameters()
Description copied from interface: IParameterized
Return all parameters that can be read

Specified by:
getPossibleParameters in interface IParameterized
Returns:
The possibleParameters value

getSetableParameters

public java.util.Collection<java.lang.String> getSetableParameters()
Description copied from interface: IParameterized
Return list of all parameters that can be set.

Specified by:
getSetableParameters in interface IParameterized
Returns:
The setableParameters value

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Description copied from interface: IParameterized
Set the named parameter

Specified by:
setParameter in interface IParameterized