public abstract class AbstractSubsymbolicChunk extends DefaultAdaptable implements ISubsymbolicChunk
Modifier and Type | Field and Description |
---|---|
protected double |
_baseLevelActivation |
protected double |
_creationTime |
protected double |
_lastActivationComputationTime |
protected IChunk |
_parentChunk |
protected double |
_randomActivation |
protected IReferences |
_referenceList |
protected java.util.Map<IActivationBuffer,java.lang.Double> |
_sourceActivation |
protected double |
_spreadingActivation |
protected double |
_timesInContext |
protected double |
_timesNeeded |
protected double |
_totalActivation |
protected java.util.Map<java.lang.String,java.lang.String> |
_unknownParameters |
ACTIVATION, BASE_LEVEL_ACTIVATION, CREATION_TIME, REFERENCE_COUNT, REFERENCE_TIMES, SOURCE_ACTIVATION, SPREADING_ACTIVATION, TIMES_IN_CONTEXT, TIMES_NEEDED
Constructor and Description |
---|
AbstractSubsymbolicChunk() |
Modifier and Type | Method and Description |
---|---|
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 |
bind(IChunk wrapper) |
protected void |
calculateValues() |
protected abstract double |
computeBaseLevelActivation() |
protected abstract double |
computeRandomActivation() |
protected abstract double |
computeSpreadingActivation()
return the spreading activation value
|
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.
|
IChunk |
getParentChunk() |
java.util.Collection<java.lang.String> |
getPossibleParameters()
Return all parameters that can be read
|
double |
getRandomActivation()
get the transient, random activation of this chunk (calculated at most,
once per cycle)
|
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.
|
double |
getTimesInContext()
Get the number of times this chunk has been a slot value of a chunk in the
goal buffer.
|
double |
getTimesNeeded()
Return the number of times that this chunk has been needed in a buffer
other than the goal buffer.
|
void |
incrementTimesInContext(double value)
Description of the Method
|
void |
incrementTimesNeeded(double value)
Description of the Method
|
protected java.util.concurrent.locks.Lock |
readLock() |
protected void |
refreshActivationValues() |
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 |
setRandomActivation(double random) |
void |
setSourceActivation(IActivationBuffer sourceBuffer,
double source)
Set the source activation of this chunk.
|
void |
setSpreadingActivation(double spread)
Sets the spreadingActivation attribute of the ISubsymbolicChunk object
|
void |
setTimesInContext(double context)
Set number of times this chunk has been a slot value of a chunk in the goal
buffer.
|
void |
setTimesNeeded(double needed)
Sets the number of times that this chunk has been needed in a buffer other
than the goal buffer.
|
protected java.util.concurrent.locks.Lock |
writeLock() |
addAdapterFactory, getAdapter, removeAdapterFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdapter
protected IChunk _parentChunk
protected IReferences _referenceList
protected double _creationTime
protected double _baseLevelActivation
protected double _spreadingActivation
protected double _randomActivation
protected java.util.Map<IActivationBuffer,java.lang.Double> _sourceActivation
protected double _totalActivation
protected double _timesInContext
protected double _timesNeeded
protected double _lastActivationComputationTime
protected java.util.Map<java.lang.String,java.lang.String> _unknownParameters
public void bind(IChunk wrapper)
protected java.util.concurrent.locks.Lock readLock()
protected java.util.concurrent.locks.Lock writeLock()
public void accessed(double time)
ISubsymbolicChunk
accessed
in interface ISubsymbolicChunk
time
- TODOpublic void dispose()
ISubsymbolicChunk
dispose
in interface ISubsymbolicChunk
public void encode(double when)
encode
in interface ISubsymbolicChunk
ISubsymbolicChunk.encode(double)
public double getActivation()
ISubsymbolicChunk
getActivation
in interface ISubsymbolicChunk
public double getBaseLevelActivation()
ISubsymbolicChunk
getBaseLevelActivation
in interface ISubsymbolicChunk
public double getRandomActivation()
ISubsymbolicChunk
getRandomActivation
in interface ISubsymbolicChunk
public double getCreationTime()
getCreationTime
in interface ISubsymbolicChunk
public IReferences getReferences()
ISubsymbolicChunk
getReferences
in interface ISubsymbolicChunk
public double getSourceActivation()
ISubsymbolicChunk
getSourceActivation
in interface ISubsymbolicChunk
public double getSpreadingActivation()
ISubsymbolicChunk
getSpreadingActivation
in interface ISubsymbolicChunk
public double getTimesInContext()
ISubsymbolicChunk
getTimesInContext
in interface ISubsymbolicChunk
public double getTimesNeeded()
ISubsymbolicChunk
getTimesNeeded
in interface ISubsymbolicChunk
public void incrementTimesInContext(double value)
ISubsymbolicChunk
incrementTimesInContext
in interface ISubsymbolicChunk
value
- TODOpublic void incrementTimesNeeded(double value)
ISubsymbolicChunk
incrementTimesNeeded
in interface ISubsymbolicChunk
value
- TODOpublic void setActivation(double act)
ISubsymbolicChunk
setActivation
in interface ISubsymbolicChunk
act
- The new activation valuepublic void setBaseLevelActivation(double base)
ISubsymbolicChunk
setBaseLevelActivation
in interface ISubsymbolicChunk
base
- The new baseLevelActivation valuepublic void setRandomActivation(double random)
public void setCreationTime(double time)
ISubsymbolicChunk
setCreationTime
in interface ISubsymbolicChunk
time
- The new creationTime valuepublic void setSourceActivation(IActivationBuffer sourceBuffer, double source)
ISubsymbolicChunk
setSourceActivation
in interface ISubsymbolicChunk
sourceBuffer
- TODOsource
- The new sourceActivation valuepublic void setSpreadingActivation(double spread)
ISubsymbolicChunk
setSpreadingActivation
in interface ISubsymbolicChunk
spread
- The new spreadingActivation valuepublic void setTimesInContext(double context)
ISubsymbolicChunk
setTimesInContext
in interface ISubsymbolicChunk
context
- The new timesInContext valuepublic void setTimesNeeded(double needed)
ISubsymbolicChunk
setTimesNeeded
in interface ISubsymbolicChunk
needed
- The new timesNeeded valuepublic java.lang.String getParameter(java.lang.String key)
IParameterized
getParameter
in interface IParameterized
key
- Description of the Parameterpublic java.util.Collection<java.lang.String> getPossibleParameters()
IParameterized
getPossibleParameters
in interface IParameterized
public java.util.Collection<java.lang.String> getSetableParameters()
IParameterized
getSetableParameters
in interface IParameterized
public void setParameter(java.lang.String key, java.lang.String value)
IParameterized
setParameter
in interface IParameterized
protected void refreshActivationValues()
protected void calculateValues()
protected abstract double computeBaseLevelActivation()
protected abstract double computeSpreadingActivation()
protected abstract double computeRandomActivation()
public IChunk getParentChunk()
getParentChunk
in interface ISubsymbolicChunk