Changeset 961


Ignore:
Timestamp:
02/13/2011 02:15:30 PM (10 years ago)
Author:
joao.dias
Message:
 
Location:
AgentMind/branches/FAtiMA-Modular
Files:
17 added
4 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.EmotionalIntelligence/.classpath

    r801 r961  
    55        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 
    66        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.AdvancedMemory"/> 
     7        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 
    78        <classpathentry kind="output" path="bin"/> 
    89</classpath> 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.EmotionalIntelligence/src/FAtiMA/emotionalIntelligence/ActionTendencyOperatorFactory.java

    r958 r961  
    88import FAtiMA.Core.plans.Effect; 
    99import FAtiMA.Core.plans.Step; 
    10 import FAtiMA.Core.reactiveLayer.Action; 
    1110import FAtiMA.Core.util.enumerables.ActionEvent; 
    1211import FAtiMA.Core.util.enumerables.EventType; 
    1312import FAtiMA.Core.wellFormedNames.Name; 
    1413import FAtiMA.Core.wellFormedNames.Symbol; 
     14import FAtiMA.ReactiveComponent.Action; 
    1515 
    1616public abstract class ActionTendencyOperatorFactory { 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.EmotionalIntelligence/src/FAtiMA/emotionalIntelligence/EmotionalIntelligence.java

    r958 r961  
    1111import FAtiMA.Core.componentTypes.IComponent; 
    1212import FAtiMA.Core.plans.Step; 
    13 import FAtiMA.Core.reactiveLayer.Action; 
    1413import FAtiMA.Core.sensorEffector.Event; 
    1514import FAtiMA.Core.util.AgentLogger; 
     15import FAtiMA.ReactiveComponent.Action; 
     16import FAtiMA.ReactiveComponent.ReactiveComponent; 
    1617 
    1718public class EmotionalIntelligence implements IComponent { 
     
    3435        @Override 
    3536        public void initialize(AgentModel am) { 
     37                 
     38                ReactiveComponent reactiveComponent = (ReactiveComponent) am.getComponent(ReactiveComponent.NAME); 
    3639 
    3740                ArrayList<Step> occRules = OCCAppraisalRules.GenerateOCCAppraisalRules(am); 
     
    4144                } 
    4245                 
    43                 for(Action at: am.getReactiveLayer().getActionTendencies().getActions()) 
     46                for(Action at: reactiveComponent.getActionTendencies().getActions()) 
    4447                { 
    4548                        am.getActionLibrary().addAction(ActionTendencyOperatorFactory.CreateATOperator(am, at)); 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/.classpath

    r959 r961  
    55        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 
    66        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.DeliberativeComponent"/> 
     7        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 
    78        <classpathentry kind="output" path="bin"/> 
    89</classpath> 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/src/FAtiMA/ToM/ModelOfOther.java

    r959 r961  
    2121import FAtiMA.Core.goals.GoalLibrary; 
    2222import FAtiMA.Core.memory.Memory; 
    23 import FAtiMA.Core.reactiveLayer.ReactiveProcess; 
    2423import FAtiMA.Core.sensorEffector.Event; 
    2524import FAtiMA.Core.sensorEffector.RemoteAgent; 
    2625import FAtiMA.Core.util.Constants; 
    2726import FAtiMA.Core.wellFormedNames.Symbol; 
     27import FAtiMA.ReactiveComponent.ReactiveComponent; 
    2828 
    2929public class ModelOfOther implements AgentModel, Serializable { 
     
    4040        private ArrayList<IAppraisalDerivationComponent> _appraisalComponents; 
    4141        private ArrayList<IAffectDerivationComponent> _affectDerivationComponents; 
    42         private ReactiveProcess _reactiveProcess; 
     42        private ReactiveComponent _reactiveComponent; 
    4343         
    4444        public ModelOfOther(String name, AgentCore ag)  
     
    109109        public void emotionReading(Event e) 
    110110        { 
     111                 
    111112                BaseEmotion perceivedEmotion; 
    112113                ActiveEmotion predictedEmotion; 
     
    114115                //if the perceived action corresponds to an emotion expression of other, we  
    115116                //should update its action tendencies accordingly 
    116                 perceivedEmotion = _reactiveProcess.getActionTendencies().RecognizeEmotion(this, e.toStepName()); 
     117                perceivedEmotion = _reactiveComponent.getActionTendencies().RecognizeEmotion(this, e.toStepName()); 
    117118                if(perceivedEmotion != null) 
    118119                { 
     
    154155        public void addComponent(IComponent c) 
    155156        { 
    156                 if(c.name().equals(ReactiveProcess.NAME)) 
    157                 { 
    158                         _reactiveProcess = (ReactiveProcess) c; 
     157                if(c.name().equals(ReactiveComponent.NAME)) 
     158                { 
     159                        _reactiveComponent = (ReactiveComponent) c; 
    159160                } 
    160161                 
     
    194195        { 
    195196                return null; 
    196         } 
    197  
    198         @Override 
    199         public ReactiveProcess getReactiveLayer() { 
    200                  
    201                 return _reactiveProcess; 
    202197        } 
    203198 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/src/FAtiMA/ToM/ModelOfOtherPanel.java

    r929 r961  
    66import FAtiMA.Core.AgentCore; 
    77import FAtiMA.Core.AgentModel; 
    8 import FAtiMA.Core.Display.ActionTendenciesPanel; 
    98import FAtiMA.Core.Display.AgentDisplayPanel; 
    109import FAtiMA.Core.Display.EmotionalStatePanel; 
     
    3534             _components.addTab("Emotional State", null, new EmotionalStatePanel()); 
    3635              
    37              _components.addTab("ShortTermMemory", null, new ShortTermMemoryPanel()); 
    38               
    39              _components.addTab("ActionTendencies", null, new ActionTendenciesPanel()); 
    40               
     36             _components.addTab("ShortTermMemory", null, new ShortTermMemoryPanel());         
    4137              
    4238             for(IComponent c: m.getComponents()) 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/.classpath

    r957 r961  
    55        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 
    66        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.DeliberativeComponent"/> 
     7        <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 
    78        <classpathentry kind="output" path="bin"/> 
    89</classpath> 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/CultureLoaderHandler.java

    r957 r961  
    4848import FAtiMA.Core.exceptions.UnknownGoalException; 
    4949import FAtiMA.Core.goals.Goal; 
    50 import FAtiMA.Core.reactiveLayer.Reaction; 
    51 import FAtiMA.Core.reactiveLayer.ReactiveProcess; 
    5250import FAtiMA.Core.sensorEffector.Event; 
    5351import FAtiMA.Core.util.AgentLogger; 
     
    5755import FAtiMA.Core.wellFormedNames.Symbol; 
    5856import FAtiMA.DeliberativeComponent.DeliberativeComponent; 
     57import FAtiMA.ReactiveComponent.Reaction; 
     58import FAtiMA.ReactiveComponent.ReactiveComponent; 
    5959 
    6060 
     
    6969        private String _currentGoalKey; 
    7070         
    71         ReactiveProcess _reactiveLayer; 
     71        ReactiveComponent _reactiveComponent; 
    7272        DeliberativeComponent _deliberativeLayer; 
    7373         
     
    7979                _rituals = new ArrayList<Ritual>(); 
    8080                _self = new Substitution(new Symbol("[SELF]"), new Symbol(FAtiMA.Core.util.Constants.SELF)); 
    81                 _reactiveLayer = (ReactiveProcess) aM.getComponent(ReactiveProcess.NAME);  
     81                _reactiveComponent = (ReactiveComponent) aM.getComponent(ReactiveComponent.NAME);  
    8282                _deliberativeLayer = (DeliberativeComponent) aM.getComponent(DeliberativeComponent.NAME); 
    8383                _am = aM; 
     
    140140 
    141141                //Add the emotional reaction to the reactive layer 
    142                 _reactiveLayer.getEmotionalReactions().AddEmotionalReaction(_eventReaction); 
     142                _reactiveComponent.getEmotionalReactions().AddEmotionalReaction(_eventReaction); 
    143143        } 
    144144 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/AgentCore.java

    r952 r961  
    4646import FAtiMA.Core.memory.semanticMemory.KnowledgeSlot; 
    4747import FAtiMA.Core.plans.IDetectThreatStrategy; 
    48 import FAtiMA.Core.reactiveLayer.ReactiveProcess; 
    4948import FAtiMA.Core.sensorEffector.Event; 
    5049import FAtiMA.Core.sensorEffector.IONRemoteAgent; 
     
    5756import FAtiMA.Core.util.VersionChecker; 
    5857import FAtiMA.Core.util.enumerables.AgentPlatform; 
    59 import FAtiMA.Core.util.parsers.AgentLoaderHandler; 
    6058import FAtiMA.Core.util.parsers.BinaryStringConverter; 
     59import FAtiMA.Core.util.parsers.EmotionDispositionsLoaderHandler; 
    6160import FAtiMA.Core.util.parsers.MemoryLoaderHandler; 
    6261import FAtiMA.Core.util.writers.MemoryWriter; 
     
    9493         
    9594        protected boolean _shutdown; 
    96         protected ReactiveProcess _reactiveLayer; 
    9795        protected ArrayList<ValuedAction> _actionsForExecution; 
    9896        protected ArrayList<Event> _perceivedEvents; 
     
    197195                                _goalLibrary = new GoalLibrary(ConfigurationManager.getGoalsFile()); 
    198196         
    199                                 //For efficiency reasons these two are not real processes 
    200                                 _reactiveLayer = new ReactiveProcess(); 
    201                                 addComponent(_reactiveLayer); 
    202197                                 
    203198                                addComponent(new OCCComponent()); 
     
    422417 
    423418 
    424         /** 
    425          * Gets the agent's Reactive Layer that you can use 
    426          * to get access to reactive structures such as  
    427          * ActionTendencies and  EmotionalReactions 
    428          * @return the agent's Reactive Layer 
    429          */ 
    430         public ReactiveProcess getReactiveLayer() 
    431         { 
    432                 return this._reactiveLayer; 
    433         } 
    434  
    435  
    436419        public void setModelStrategy(IGetModelStrategy strat) 
    437420        { 
     
    467450                ObjectInputStream s = new ObjectInputStream(in); 
    468451         
    469                 this._reactiveLayer = (ReactiveProcess) s.readObject(); 
    470452                this._emotionalState = (EmotionalState) s.readObject(); 
    471453                this._memory = (Memory) s.readObject(); 
     
    519501 
    520502                AgentLogger.GetInstance().log("LOADING Personality: " + personalityFile); 
    521                 AgentLoaderHandler c = new AgentLoaderHandler(_reactiveLayer,_emotionalState); 
     503                EmotionDispositionsLoaderHandler c = new EmotionDispositionsLoaderHandler(_emotionalState); 
    522504 
    523505                SAXParserFactory factory = SAXParserFactory.newInstance(); 
     
    877859                        ObjectOutputStream s = new ObjectOutputStream(out); 
    878860                         
    879                         s.writeObject(_reactiveLayer); 
    880861                        s.writeObject(_emotionalState); 
    881862                        s.writeObject(_memory); 
     
    966947                        //s.writeObject(_ToM); 
    967948                        //s.writeObject(_nearbyAgents); 
    968                         s.writeObject(_reactiveLayer); 
    969949                        s.writeObject(_emotionalState); 
    970950                        s.writeObject(_memory); 
     
    10281008 
    10291009                        ObjectInputStream s = new ObjectInputStream(in); 
    1030                         this._reactiveLayer = (ReactiveProcess) s.readObject(); 
    10311010                        this._emotionalState = (EmotionalState) s.readObject(); 
    10321011                        this._memory = (Memory) s.readObject(); 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/AgentModel.java

    r952 r961  
    66import FAtiMA.Core.goals.GoalLibrary; 
    77import FAtiMA.Core.memory.Memory; 
    8 import FAtiMA.Core.reactiveLayer.ReactiveProcess; 
    98import FAtiMA.Core.sensorEffector.RemoteAgent; 
    109import FAtiMA.Core.wellFormedNames.Symbol; 
     
    2221        public Memory getMemory(); 
    2322         
    24         //public DeliberativeProcess getDeliberativeLayer(); 
    25          
    2623        public AgentModel getModelToTest(Symbol ToM); 
    2724         
    2825        public String getName(); 
    29          
    30         public ReactiveProcess getReactiveLayer(); 
    3126         
    3227        public RemoteAgent getRemoteAgent(); 
Note: See TracChangeset for help on using the changeset viewer.