|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.memphis.ccrg.lida.framework.initialization.InitializableImpl
edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
edu.memphis.ccrg.lida.actionselection.BasicActionSelection
public class BasicActionSelection
Rudimentary action selection that selects the behavior with the highest activation.
The new BehaviorNetwork
implementation is more sophisticated that this one and is preferable.
Field Summary |
---|
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
---|
taskSpawner |
Constructor Summary | |
---|---|
BasicActionSelection()
Default constructor |
Method Summary | |
---|---|
void |
addActionSelectionListener(ActionSelectionListener listener)
Adds specified ActionSelectionListener . |
void |
addListener(ModuleListener listener)
Override this method to add a listener to the module |
void |
addPreafferenceListener(PreafferenceListener listener)
Adds specified PreafferenceListener |
void |
decayModule(long ticks)
Decay only this Module. |
java.util.Collection<Behavior> |
getBehaviors()
Returns a view of the behaviors currently in ActionSelection |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Intended to be called from the GUI. |
(package private) double |
getThreshold()
Gets candidate threshold. |
void |
init()
Will set parameters with the following names: actionSelection.refractoryperiodTicks refractory period of action selection actionSelection.candidateThreshold threshold to be considered for selection actionSelection.removalThreshold threshold for elements to remain active in the action selection module actionSelection.backgroundTaskTicksPerRun frequency of possible action selection actionSelection.behaviorDecayStrategy decay strategy of behaviors in this module actionSelection.thresholdDecayRate decay rate of candidate threshold If any parameter is not specified its default value will be used. |
void |
learn(Coalition coalition)
A place-holder method to remind implementing classes that they should implement learning. |
void |
receiveBehavior(Behavior b)
Receive a Behavior |
void |
receiveBroadcast(Coalition coalition)
Listener must receive a broadcast of a the winning Coalition
This method should return as possible in order to not delay the rest of the broadcasting. |
Behavior |
selectBehavior(java.util.Collection<Behavior> behaviors,
double candidateThreshold)
Selects a behavior (containing an action) for execution. |
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString |
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl |
---|
containsParameter, getParam, getParameters, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule |
---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable |
---|
setAssociatedModule |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable |
---|
containsParameter, getParam, getParameters, init |
Constructor Detail |
---|
public BasicActionSelection()
Method Detail |
---|
public void init()
init
in interface Initializable
init
in class InitializableImpl
Initializable
public void addListener(ModuleListener listener)
FrameworkModuleImpl
addListener
in interface FrameworkModule
addListener
in class FrameworkModuleImpl
listener
- - listener of this FrameworkModulepublic void addActionSelectionListener(ActionSelectionListener listener)
ActionSelection
ActionSelectionListener
.
addActionSelectionListener
in interface ActionSelection
listener
- a module that receives selected actions from ActionSelection
public void receiveBehavior(Behavior b)
ProceduralMemoryListener
Behavior
receiveBehavior
in interface ProceduralMemoryListener
b
- - a stream, a partial order, of behaviorspublic java.util.Collection<Behavior> getBehaviors()
ActionSelection
ActionSelection
getBehaviors
in interface ActionSelection
Collection
of Behavior
objectsdouble getThreshold()
public Behavior selectBehavior(java.util.Collection<Behavior> behaviors, double candidateThreshold)
ActionSelection
selectBehavior
in interface ActionSelection
behaviors
- Collection
of behaviors currently available in the modulecandidateThreshold
- threshold for a behavior to be a candidate
public java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModuleImpl
getModuleContent
in interface FrameworkModule
getModuleContent
in class FrameworkModuleImpl
params
- parameters specifying what content will be returned
public void addPreafferenceListener(PreafferenceListener listener)
ActionSelection
PreafferenceListener
addPreafferenceListener
in interface ActionSelection
listener
- a module that receives preafference from ActionSelection
public void learn(Coalition coalition)
BroadcastListener
GlobalWorkspace
and thus it should be managed by the receiving module.
learn
in interface BroadcastListener
coalition
- the Coalition
that won the most recent competition for consciousnesspublic void receiveBroadcast(Coalition coalition)
BroadcastListener
Coalition
This method should return as possible in order to not delay the rest of the broadcasting.
receiveBroadcast
in interface BroadcastListener
coalition
- the Coalition
that won the most recent competition for consciousnesspublic void decayModule(long ticks)
FrameworkModule
decayModule
in interface FrameworkModule
ticks
- number of ticks to decay.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |