vs.plotagent
Class BetterPerceptionManager

java.lang.Object
  extended by vs.plotagent.BetterPerceptionManager
All Implemented Interfaces:
IAgentModule, IExplainable, IPerceptionManager

public class BetterPerceptionManager
extends java.lang.Object
implements IPerceptionManager

Better implementation of perception handling. Better separation of concerns between creating setting/perception, and registering result of operator. In comparison to BasicPerceptionManager, this one doesn't start interpreting the operator result as setting/perceptions up till the point where characters need to be informed. Also easier to install perception rules since it is clearer where this should be done. NOTE: Experimental; if bugs occur, one might use BasicPerceptionManager instead.

Author:
swartjes

Constructor Summary
BetterPerceptionManager(IPlotAgent owner)
          Constructor
 
Method Summary
 java.util.Set<FabulaCausality> explainCausalities()
          Explain the motivations, the causalities or enablements that the interfaced class produced.
 java.util.Set<FabulaElement> explainElements()
          Explain the fabula elements that the interfaced class produced
 IAgent getAgent()
          To get the Agent
 void informCharacters()
          Sends new perceptions and setting elements to the characters
 void registerOperatorResult(OperatorResult or)
          Register operator results
 void sendPerceptions(java.util.Vector<StoryPerception> perceptions, jade.core.AID character)
           
 void sendSettingElements(java.util.Vector<StorySettingElement> setting_elements, jade.core.AID character)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetterPerceptionManager

public BetterPerceptionManager(IPlotAgent owner)
Constructor

Parameters:
owner - plot agent that owns this perception manager
Method Detail

registerOperatorResult

public void registerOperatorResult(OperatorResult or)
Description copied from interface: IPerceptionManager
Register operator results

Specified by:
registerOperatorResult in interface IPerceptionManager
Parameters:
or - the Operator Result to register

informCharacters

public void informCharacters()
Description copied from interface: IPerceptionManager
Sends new perceptions and setting elements to the characters

Specified by:
informCharacters in interface IPerceptionManager

sendPerceptions

public void sendPerceptions(java.util.Vector<StoryPerception> perceptions,
                            jade.core.AID character)

sendSettingElements

public void sendSettingElements(java.util.Vector<StorySettingElement> setting_elements,
                                jade.core.AID character)

getAgent

public IAgent getAgent()
Description copied from interface: IAgentModule
To get the Agent

Specified by:
getAgent in interface IAgentModule
Returns:
an Agent that owns this module

explainCausalities

public java.util.Set<FabulaCausality> explainCausalities()
Description copied from interface: IExplainable
Explain the motivations, the causalities or enablements that the interfaced class produced.

Specified by:
explainCausalities in interface IExplainable
Returns:
a set of causality declarations describing an explanation for fabula elements.

explainElements

public java.util.Set<FabulaElement> explainElements()
Description copied from interface: IExplainable
Explain the fabula elements that the interfaced class produced

Specified by:
explainElements in interface IExplainable
Returns:
a set of fabula elements produced by the interfaced class