Package FAtiMA.Core

Class AgentCore

    • Field Detail

      • MIND_PATH_ANDROID

        public static final java.lang.String MIND_PATH_ANDROID
        See Also:
        Constant Field Values
      • ACTION_CONTEXT

        public static final Name ACTION_CONTEXT
      • _generalComponents

        protected java.util.HashMap<java.lang.String,​IComponent> _generalComponents
      • _behaviourComponents

        protected java.util.ArrayList<IBehaviourComponent> _behaviourComponents
      • _memory

        protected Memory _memory
      • _shutdown

        protected boolean _shutdown
      • _actionsForExecution

        protected java.util.ArrayList<ValuedAction> _actionsForExecution
      • _perceivedEvents

        protected java.util.ArrayList<Event> _perceivedEvents
      • _role

        protected java.lang.String _role
      • _name

        protected java.lang.String _name
      • _sex

        protected java.lang.String _sex
      • _displayName

        protected java.lang.String _displayName
      • _currentEmotion

        protected java.lang.String _currentEmotion
      • _numberOfCycles

        protected long _numberOfCycles
      • _totalexecutingtime

        protected long _totalexecutingtime
      • _showStateWindow

        protected boolean _showStateWindow
      • _logger

        protected java.util.logging.Logger _logger
    • Constructor Detail

      • AgentCore

        public AgentCore​(java.lang.String name)
    • Method Detail

      • agentCoreLoad

        public void agentCoreLoad​(short agentPlatform,
                                  java.lang.String host,
                                  int port,
                                  java.lang.String directory,
                                  java.lang.String fileName)
      • applyPerspective

        public static Name applyPerspective​(Name n,
                                            java.lang.String agentName)
      • removePerspective

        public static Name removePerspective​(Name n,
                                             java.lang.String agentName)
      • isSelf

        public boolean isSelf()
        Specified by:
        isSelf in interface AgentModel
      • addComponent

        public void addComponent​(IComponent c)
      • getComponents

        public java.util.Collection<IComponent> getComponents()
      • PerceiveActionFailed

        public void PerceiveActionFailed​(Event e)
      • displayName

        public java.lang.String displayName()
        Gets the agent's name that is displayed externally
        Returns:
        the agent's external name
      • getAgentLoad

        public boolean getAgentLoad()
      • getName

        public java.lang.String getName()
        Gets the name of the agent
        Specified by:
        getName in interface AgentModel
        Returns:
        the agent's name
      • EnforceCopingStrategy

        public void EnforceCopingStrategy​(AgentModel am,
                                          java.lang.String coping)
      • LoadAgentState

        public void LoadAgentState​(java.lang.String fileName)
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • PerceiveEvent

        public void PerceiveEvent​(Event e)
        Perceives a given event from the virtual world
        Parameters:
        e - - the Event to perceive
      • PerceiveLookAt

        public void PerceiveLookAt​(java.lang.String subject,
                                   java.lang.String target)
      • PerceivePropertyChanged

        public void PerceivePropertyChanged​(java.lang.String ToM,
                                            Name propertyName,
                                            java.lang.String value)
      • PerceivePropertyChanged

        public void PerceivePropertyChanged​(java.lang.String ToM,
                                            java.lang.String subject,
                                            java.lang.String property,
                                            java.lang.String value)
      • PerceivePropertyRemoved

        public void PerceivePropertyRemoved​(java.lang.String subject,
                                            java.lang.String property)
      • PerceiveEntityRemoved

        public void PerceiveEntityRemoved​(java.lang.String entity)
      • Reset

        public void Reset()
        Resets the agent's reasoning layers (deliberative + cognitive)
      • role

        public java.lang.String 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
      • RequestAgentSave

        public void RequestAgentSave()
      • RequestMemorySave

        public void RequestMemorySave()
      • sex

        public java.lang.String 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

        public java.lang.String getSerializedState()
        returns a String that contains the serialized internal state of the agent in a String format
      • setSerializedState

        public void setSerializedState​(java.lang.String state)
        sets the internal state of the agent to the state which is contained in the passed string