Package FAtiMA.Core
Class AgentCore
java.lang.Object
FAtiMA.Core.AgentCore
- All Implemented Interfaces:
AgentModel,IGetModelStrategy,Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ActionLibraryprotected ArrayList<ValuedAction>protected ArrayList<IAffectDerivationComponent>protected AgentDisplayprotected ArrayList<IAppraisalDerivationComponent>protected ArrayList<IBehaviourComponent>protected CentralXMLParserprotected Stringprotected IDetectThreatStrategyprotected Stringprotected EmotionalStateprotected HashMap<String,IComponent> protected GoalLibraryprotected Loggerprotected Memoryprotected ArrayList<IModelOfOtherComponent>protected Stringprotected longprotected ArrayList<IProcessEmotionComponent>protected ArrayList<IProcessExternalRequestComponent>protected ArrayList<IAdvancedPerceptionsComponent>protected RemoteAgentprotected Stringprotected Stringprotected booleanprotected booleanprotected SpeechActprotected longstatic final Namestatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidagentCoreLoad(short agentPlatform, String host, int port, String directory, String fileName) static NameapplyPerspective(Name n, String agentName) Gets the agent's name that is displayed externallyvoidEnforceCopingStrategy(AgentModel am, String coping) booleangetComponent(String name) getModelToTest(Symbol ToM) getName()Gets the name of the agentreturns a String that contains the serialized internal state of the agent in a String formatvoidinitialize(String scenariosFile, String scenarioName, String agentName) booleanisSelf()voidLoadAgentState(String fileName) voidvoidPerceiveEntityRemoved(String entity) voidPerceives a given event from the virtual worldvoidPerceiveLookAt(String subject, String target) voidPerceivePropertyChanged(String ToM, Name propertyName, String value) voidPerceivePropertyChanged(String ToM, String subject, String property, String value) voidPerceivePropertyRemoved(String subject, String property) static NameremovePerspective(Name n, String agentName) voidvoidvoidReset()Resets the agent's reasoning layers (deliberative + cognitive)role()Gets the agent's rolevoidRun()Runs the agent, endless loop until there is a shutdownvoidvoidsetSerializedState(String state) sets the internal state of the agent to the state which is contained in the passed stringsex()Gets the gender of the agentsimulateEmotionalState(Event simulatedEvent, IComponent callingComponent) voidStarting the agent added by Meiyii 19/11/09void
-
Field Details
-
MIND_PATH
- See Also:
-
MIND_PATH_ANDROID
- See Also:
-
MEMORY_FILENAME
- See Also:
-
ACTION_CONTEXT
-
_generalComponents
-
_processEmotionComponents
-
_behaviourComponents
-
_modelOfOtherComponents
-
_processExternalRequestComponents
-
_processPerceptionsComponents
-
_affectDerivationComponents
-
_appraisalComponents
-
_detectThreatStrat
-
_centralParser
-
_emotionalState
-
_memory
-
_goalLibrary
-
_actionLibrary
-
_shutdown
protected boolean _shutdown -
_actionsForExecution
-
_perceivedEvents
-
_remoteAgent
-
_role
-
_name
-
_sex
-
_displayName
-
_speechAct
-
_currentEmotion
-
_numberOfCycles
protected long _numberOfCycles -
_totalexecutingtime
protected long _totalexecutingtime -
_agentDisplay
-
_showStateWindow
protected boolean _showStateWindow -
_logger
-
-
Constructor Details
-
AgentCore
-
-
Method Details
-
initialize
public void initialize(String scenariosFile, String scenarioName, String agentName) throws ParserConfigurationException, SAXException, IOException, UnknownGoalException, ActionsParsingException, GoalLibParsingException -
agentCoreLoad
-
applyPerspective
-
removePerspective
-
isSelf
public boolean isSelf()- Specified by:
isSelfin interfaceAgentModel
-
addComponent
-
getRemoteAgent
- Specified by:
getRemoteAgentin interfaceAgentModel
-
getComponent
- Specified by:
getComponentin interfaceAgentModel
-
getComponents
-
getProcessExternalRequestComponents
-
getActionLibrary
- Specified by:
getActionLibraryin interfaceAgentModel
-
PerceiveActionFailed
-
displayName
Gets the agent's name that is displayed externally- Returns:
- the agent's external name
-
getEmotionalState
- Specified by:
getEmotionalStatein interfaceAgentModel
-
getMemory
- Specified by:
getMemoryin interfaceAgentModel
-
getAgentLoad
public boolean getAgentLoad() -
getGoalLibrary
- Specified by:
getGoalLibraryin interfaceAgentModel
-
getName
Gets the name of the agent- Specified by:
getNamein interfaceAgentModel- Returns:
- the agent's name
-
setModelStrategy
- Specified by:
setModelStrategyin interfaceAgentModel
-
EnforceCopingStrategy
-
LoadAgentState
- Throws:
IOExceptionClassNotFoundException
-
PerceiveEvent
Perceives a given event from the virtual world- Parameters:
e- - the Event to perceive
-
PerceiveLookAt
-
PerceivePropertyChanged
-
PerceivePropertyChanged
-
PerceivePropertyRemoved
-
PerceiveEntityRemoved
-
Reset
public void Reset()Resets the agent's reasoning layers (deliberative + cognitive) -
role
Gets the agent's role- Returns:
- the role of the agent (Victim, Bully, etc)
-
Run
public void Run()Runs the agent, endless loop until there is a shutdown -
simulateEmotionalState
- Specified by:
simulateEmotionalStatein interfaceAgentModel
-
RequestAgentSave
public void RequestAgentSave() -
RequestMemorySave
public void RequestMemorySave() -
sex
Gets the gender of the agent- Returns:
- the agent's sex
-
StartAgent
public void StartAgent()Starting the agent added by Meiyii 19/11/09 -
getSerializedState
returns a String that contains the serialized internal state of the agent in a String format -
getModelToTest
- Specified by:
getModelToTestin interfaceAgentModel
-
execute
- Specified by:
executein interfaceIGetModelStrategy
-
setSerializedState
sets the internal state of the agent to the state which is contained in the passed string -
updateEmotions
- Specified by:
updateEmotionsin interfaceAgentModel
-