org.jactr.core.module.procedural.six.learning
Class DefaultProceduralLearningModule6

java.lang.Object
  extended by org.jactr.core.module.AbstractModule
      extended by org.jactr.core.module.procedural.six.learning.DefaultProceduralLearningModule6
All Implemented Interfaces:
IModule, IProceduralLearningModule5, IProceduralLearningModule, IProceduralLearningModule6, IInitializable, IInstallable, IParameterized

public class DefaultProceduralLearningModule6
extends AbstractModule
implements IProceduralLearningModule6, IParameterized

production learning is accomplished by listening to the procedural module for firing events..

Author:
developer

Field Summary
 
Fields inherited from interface org.jactr.core.module.procedural.five.learning.IProceduralLearningModule5
PRODUCTION_COMPILATION_PARAM
 
Fields inherited from interface org.jactr.core.module.procedural.IProceduralLearningModule
OPTIMIZED_LEARNING, PARAMETER_LEARNING_RATE
 
Constructor Summary
DefaultProceduralLearningModule6()
           
 
Method Summary
 void addListener(IProceduralLearningModule6Listener listener, java.util.concurrent.Executor executor)
           
 IExpectedUtilityEquation getExpectedUtilityEquation()
           
 int getOptimizationLevel()
           
 java.lang.String getParameter(java.lang.String key)
          return parameter value - null if not defined.
 double getParameterLearning()
           
 java.util.Collection<java.lang.String> getPossibleParameters()
          Return all parameters that can be read
 IProductionCompiler getProductionCompiler()
           
 java.util.Collection<java.lang.String> getSetableParameters()
          Return list of all parameters that can be set.
 void initialize()
          this will be called after all the modules have been installed permitting the module to attach listeners to other modules.
 boolean isLearningEnabled()
           
 boolean isParameterLearningEnabled()
           
 boolean isProductionCompilationEnabled()
           
 void removeListener(IProceduralLearningModule6Listener listener)
           
 void reset()
          reset the module.
 void reward(double initialReward)
           
 void setExpectedUtilityEquation(IExpectedUtilityEquation equation)
           
 void setOptimizationLevel(int level)
           
 void setParameter(java.lang.String key, java.lang.String value)
          Set the named parameter
 void setParameterLearning(double rate)
           
 void setProductionCompilationEnabled(boolean enabled)
           
 void setProductionCompiler(IProductionCompiler compiler)
           
 
Methods inherited from class org.jactr.core.module.AbstractModule
delayedFuture, dispose, getExecutor, getModel, getName, immediateFuture, immediateReturn, install, uninstall
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jactr.core.module.IModule
dispose, getModel, getName, install
 
Methods inherited from interface org.jactr.core.utils.IInstallable
uninstall
 

Constructor Detail

DefaultProceduralLearningModule6

public DefaultProceduralLearningModule6()
Method Detail

isProductionCompilationEnabled

public boolean isProductionCompilationEnabled()
Specified by:
isProductionCompilationEnabled in interface IProceduralLearningModule5

setProductionCompilationEnabled

public void setProductionCompilationEnabled(boolean enabled)
Specified by:
setProductionCompilationEnabled in interface IProceduralLearningModule5

getParameterLearning

public double getParameterLearning()
Specified by:
getParameterLearning in interface IProceduralLearningModule

isParameterLearningEnabled

public boolean isParameterLearningEnabled()
Specified by:
isParameterLearningEnabled in interface IProceduralLearningModule

setParameterLearning

public void setParameterLearning(double rate)
Specified by:
setParameterLearning in interface IProceduralLearningModule

isLearningEnabled

public boolean isLearningEnabled()

initialize

public void initialize()
Description copied from interface: IModule
this will be called after all the modules have been installed permitting the module to attach listeners to other modules. if you want to get access to chunks,types, or productions before the model runs, attach a model listener and do that during the modelStarted call

Specified by:
initialize in interface IModule
Specified by:
initialize in interface IInitializable
Specified by:
initialize in class AbstractModule

getProductionCompiler

public IProductionCompiler getProductionCompiler()
Specified by:
getProductionCompiler in interface IProceduralLearningModule5

setProductionCompiler

public void setProductionCompiler(IProductionCompiler compiler)

setExpectedUtilityEquation

public void setExpectedUtilityEquation(IExpectedUtilityEquation equation)

getExpectedUtilityEquation

public IExpectedUtilityEquation getExpectedUtilityEquation()
Specified by:
getExpectedUtilityEquation in interface IProceduralLearningModule6

getOptimizationLevel

public int getOptimizationLevel()
Specified by:
getOptimizationLevel in interface IProceduralLearningModule

setOptimizationLevel

public void setOptimizationLevel(int level)
Specified by:
setOptimizationLevel in interface IProceduralLearningModule

reward

public void reward(double initialReward)
Specified by:
reward in interface IProceduralLearningModule6

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

addListener

public void addListener(IProceduralLearningModule6Listener listener,
                        java.util.concurrent.Executor executor)
Specified by:
addListener in interface IProceduralLearningModule6

removeListener

public void removeListener(IProceduralLearningModule6Listener listener)
Specified by:
removeListener in interface IProceduralLearningModule6

reset

public void reset()
Description copied from interface: IModule
reset the module. This will typically clear the owned buffers and abort any module specific operations

Specified by:
reset in interface IModule