org.jactr.core.module.declarative.four.learning
Class ProceduralModuleListener

java.lang.Object
  extended by org.jactr.core.module.declarative.four.learning.ProceduralModuleListener
All Implemented Interfaces:
java.util.EventListener, IParameterListener, IProceduralModuleListener

public class ProceduralModuleListener
extends java.lang.Object
implements IProceduralModuleListener

we use a proceduralmodule listener to track the chunks that are accessed in service of firing a production. We listen to two methods: productionWillFire() to snag all the chunks that the production requires to fire, and productionFired() to call the various parameter update methods on the chunks

Author:
developer

Constructor Summary
ProceduralModuleListener(DefaultDeclarativeLearningModule4 learning)
           
 
Method Summary
 void conflictSetAssembled(ProceduralModuleEvent pme)
          called after the conflict set is assembled
 void parameterChanged(IParameterEvent pe)
           
 void productionAdded(ProceduralModuleEvent pme)
          called when a production is added to the procedural module
 void productionCreated(ProceduralModuleEvent pme)
          called when a production has been created, but not necessarily configured with all its symbolic/subsymbolic contents
 void productionFired(ProceduralModuleEvent pme)
          adjust the parameter values for the chunks that enabled this production to fire
 void productionsMerged(ProceduralModuleEvent pme)
          called when two productions have been merged into one.
 void productionWillFire(ProceduralModuleEvent pme)
          snag the chunks that the production that is about to fire is matched against
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProceduralModuleListener

public ProceduralModuleListener(DefaultDeclarativeLearningModule4 learning)
Method Detail

conflictSetAssembled

public void conflictSetAssembled(ProceduralModuleEvent pme)
Description copied from interface: IProceduralModuleListener
called after the conflict set is assembled

Specified by:
conflictSetAssembled in interface IProceduralModuleListener

productionAdded

public void productionAdded(ProceduralModuleEvent pme)
Description copied from interface: IProceduralModuleListener
called when a production is added to the procedural module

Specified by:
productionAdded in interface IProceduralModuleListener

productionWillFire

public void productionWillFire(ProceduralModuleEvent pme)
snag the chunks that the production that is about to fire is matched against

Specified by:
productionWillFire in interface IProceduralModuleListener
See Also:
IProceduralModuleListener.productionWillFire(org.jactr.core.module.procedural.event.ProceduralModuleEvent)

productionCreated

public void productionCreated(ProceduralModuleEvent pme)
Description copied from interface: IProceduralModuleListener
called when a production has been created, but not necessarily configured with all its symbolic/subsymbolic contents

Specified by:
productionCreated in interface IProceduralModuleListener

productionFired

public void productionFired(ProceduralModuleEvent pme)
adjust the parameter values for the chunks that enabled this production to fire

Specified by:
productionFired in interface IProceduralModuleListener
See Also:
IProceduralModuleListener.productionFired(org.jactr.core.module.procedural.event.ProceduralModuleEvent)

productionsMerged

public void productionsMerged(ProceduralModuleEvent pme)
Description copied from interface: IProceduralModuleListener
called when two productions have been merged into one. pme.getProductions() will return handles for both the original (unchanged) and the mergie (changed)

Specified by:
productionsMerged in interface IProceduralModuleListener

parameterChanged

public void parameterChanged(IParameterEvent pe)
Specified by:
parameterChanged in interface IParameterListener