Changeset 961
- Timestamp:
- 02/13/2011 02:15:30 PM (10 years ago)
- 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 5 5 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 6 6 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.AdvancedMemory"/> 7 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 7 8 <classpathentry kind="output" path="bin"/> 8 9 </classpath> -
AgentMind/branches/FAtiMA-Modular/FAtiMA.EmotionalIntelligence/src/FAtiMA/emotionalIntelligence/ActionTendencyOperatorFactory.java
r958 r961 8 8 import FAtiMA.Core.plans.Effect; 9 9 import FAtiMA.Core.plans.Step; 10 import FAtiMA.Core.reactiveLayer.Action;11 10 import FAtiMA.Core.util.enumerables.ActionEvent; 12 11 import FAtiMA.Core.util.enumerables.EventType; 13 12 import FAtiMA.Core.wellFormedNames.Name; 14 13 import FAtiMA.Core.wellFormedNames.Symbol; 14 import FAtiMA.ReactiveComponent.Action; 15 15 16 16 public abstract class ActionTendencyOperatorFactory { -
AgentMind/branches/FAtiMA-Modular/FAtiMA.EmotionalIntelligence/src/FAtiMA/emotionalIntelligence/EmotionalIntelligence.java
r958 r961 11 11 import FAtiMA.Core.componentTypes.IComponent; 12 12 import FAtiMA.Core.plans.Step; 13 import FAtiMA.Core.reactiveLayer.Action;14 13 import FAtiMA.Core.sensorEffector.Event; 15 14 import FAtiMA.Core.util.AgentLogger; 15 import FAtiMA.ReactiveComponent.Action; 16 import FAtiMA.ReactiveComponent.ReactiveComponent; 16 17 17 18 public class EmotionalIntelligence implements IComponent { … … 34 35 @Override 35 36 public void initialize(AgentModel am) { 37 38 ReactiveComponent reactiveComponent = (ReactiveComponent) am.getComponent(ReactiveComponent.NAME); 36 39 37 40 ArrayList<Step> occRules = OCCAppraisalRules.GenerateOCCAppraisalRules(am); … … 41 44 } 42 45 43 for(Action at: am.getReactiveLayer().getActionTendencies().getActions())46 for(Action at: reactiveComponent.getActionTendencies().getActions()) 44 47 { 45 48 am.getActionLibrary().addAction(ActionTendencyOperatorFactory.CreateATOperator(am, at)); -
AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/.classpath
r959 r961 5 5 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 6 6 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.DeliberativeComponent"/> 7 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 7 8 <classpathentry kind="output" path="bin"/> 8 9 </classpath> -
AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/src/FAtiMA/ToM/ModelOfOther.java
r959 r961 21 21 import FAtiMA.Core.goals.GoalLibrary; 22 22 import FAtiMA.Core.memory.Memory; 23 import FAtiMA.Core.reactiveLayer.ReactiveProcess;24 23 import FAtiMA.Core.sensorEffector.Event; 25 24 import FAtiMA.Core.sensorEffector.RemoteAgent; 26 25 import FAtiMA.Core.util.Constants; 27 26 import FAtiMA.Core.wellFormedNames.Symbol; 27 import FAtiMA.ReactiveComponent.ReactiveComponent; 28 28 29 29 public class ModelOfOther implements AgentModel, Serializable { … … 40 40 private ArrayList<IAppraisalDerivationComponent> _appraisalComponents; 41 41 private ArrayList<IAffectDerivationComponent> _affectDerivationComponents; 42 private Reactive Process _reactiveProcess;42 private ReactiveComponent _reactiveComponent; 43 43 44 44 public ModelOfOther(String name, AgentCore ag) … … 109 109 public void emotionReading(Event e) 110 110 { 111 111 112 BaseEmotion perceivedEmotion; 112 113 ActiveEmotion predictedEmotion; … … 114 115 //if the perceived action corresponds to an emotion expression of other, we 115 116 //should update its action tendencies accordingly 116 perceivedEmotion = _reactive Process.getActionTendencies().RecognizeEmotion(this, e.toStepName());117 perceivedEmotion = _reactiveComponent.getActionTendencies().RecognizeEmotion(this, e.toStepName()); 117 118 if(perceivedEmotion != null) 118 119 { … … 154 155 public void addComponent(IComponent c) 155 156 { 156 if(c.name().equals(Reactive Process.NAME))157 { 158 _reactive Process = (ReactiveProcess) c;157 if(c.name().equals(ReactiveComponent.NAME)) 158 { 159 _reactiveComponent = (ReactiveComponent) c; 159 160 } 160 161 … … 194 195 { 195 196 return null; 196 }197 198 @Override199 public ReactiveProcess getReactiveLayer() {200 201 return _reactiveProcess;202 197 } 203 198 -
AgentMind/branches/FAtiMA-Modular/FAtiMA.ToM/src/FAtiMA/ToM/ModelOfOtherPanel.java
r929 r961 6 6 import FAtiMA.Core.AgentCore; 7 7 import FAtiMA.Core.AgentModel; 8 import FAtiMA.Core.Display.ActionTendenciesPanel;9 8 import FAtiMA.Core.Display.AgentDisplayPanel; 10 9 import FAtiMA.Core.Display.EmotionalStatePanel; … … 35 34 _components.addTab("Emotional State", null, new EmotionalStatePanel()); 36 35 37 _components.addTab("ShortTermMemory", null, new ShortTermMemoryPanel()); 38 39 _components.addTab("ActionTendencies", null, new ActionTendenciesPanel()); 40 36 _components.addTab("ShortTermMemory", null, new ShortTermMemoryPanel()); 41 37 42 38 for(IComponent c: m.getComponents()) -
AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/.classpath
r957 r961 5 5 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA"/> 6 6 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.DeliberativeComponent"/> 7 <classpathentry combineaccessrules="false" kind="src" path="/FAtiMA.ReactiveComponent"/> 7 8 <classpathentry kind="output" path="bin"/> 8 9 </classpath> -
AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/CultureLoaderHandler.java
r957 r961 48 48 import FAtiMA.Core.exceptions.UnknownGoalException; 49 49 import FAtiMA.Core.goals.Goal; 50 import FAtiMA.Core.reactiveLayer.Reaction;51 import FAtiMA.Core.reactiveLayer.ReactiveProcess;52 50 import FAtiMA.Core.sensorEffector.Event; 53 51 import FAtiMA.Core.util.AgentLogger; … … 57 55 import FAtiMA.Core.wellFormedNames.Symbol; 58 56 import FAtiMA.DeliberativeComponent.DeliberativeComponent; 57 import FAtiMA.ReactiveComponent.Reaction; 58 import FAtiMA.ReactiveComponent.ReactiveComponent; 59 59 60 60 … … 69 69 private String _currentGoalKey; 70 70 71 Reactive Process _reactiveLayer;71 ReactiveComponent _reactiveComponent; 72 72 DeliberativeComponent _deliberativeLayer; 73 73 … … 79 79 _rituals = new ArrayList<Ritual>(); 80 80 _self = new Substitution(new Symbol("[SELF]"), new Symbol(FAtiMA.Core.util.Constants.SELF)); 81 _reactive Layer = (ReactiveProcess) aM.getComponent(ReactiveProcess.NAME);81 _reactiveComponent = (ReactiveComponent) aM.getComponent(ReactiveComponent.NAME); 82 82 _deliberativeLayer = (DeliberativeComponent) aM.getComponent(DeliberativeComponent.NAME); 83 83 _am = aM; … … 140 140 141 141 //Add the emotional reaction to the reactive layer 142 _reactive Layer.getEmotionalReactions().AddEmotionalReaction(_eventReaction);142 _reactiveComponent.getEmotionalReactions().AddEmotionalReaction(_eventReaction); 143 143 } 144 144 -
AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/AgentCore.java
r952 r961 46 46 import FAtiMA.Core.memory.semanticMemory.KnowledgeSlot; 47 47 import FAtiMA.Core.plans.IDetectThreatStrategy; 48 import FAtiMA.Core.reactiveLayer.ReactiveProcess;49 48 import FAtiMA.Core.sensorEffector.Event; 50 49 import FAtiMA.Core.sensorEffector.IONRemoteAgent; … … 57 56 import FAtiMA.Core.util.VersionChecker; 58 57 import FAtiMA.Core.util.enumerables.AgentPlatform; 59 import FAtiMA.Core.util.parsers.AgentLoaderHandler;60 58 import FAtiMA.Core.util.parsers.BinaryStringConverter; 59 import FAtiMA.Core.util.parsers.EmotionDispositionsLoaderHandler; 61 60 import FAtiMA.Core.util.parsers.MemoryLoaderHandler; 62 61 import FAtiMA.Core.util.writers.MemoryWriter; … … 94 93 95 94 protected boolean _shutdown; 96 protected ReactiveProcess _reactiveLayer;97 95 protected ArrayList<ValuedAction> _actionsForExecution; 98 96 protected ArrayList<Event> _perceivedEvents; … … 197 195 _goalLibrary = new GoalLibrary(ConfigurationManager.getGoalsFile()); 198 196 199 //For efficiency reasons these two are not real processes200 _reactiveLayer = new ReactiveProcess();201 addComponent(_reactiveLayer);202 197 203 198 addComponent(new OCCComponent()); … … 422 417 423 418 424 /**425 * Gets the agent's Reactive Layer that you can use426 * to get access to reactive structures such as427 * ActionTendencies and EmotionalReactions428 * @return the agent's Reactive Layer429 */430 public ReactiveProcess getReactiveLayer()431 {432 return this._reactiveLayer;433 }434 435 436 419 public void setModelStrategy(IGetModelStrategy strat) 437 420 { … … 467 450 ObjectInputStream s = new ObjectInputStream(in); 468 451 469 this._reactiveLayer = (ReactiveProcess) s.readObject();470 452 this._emotionalState = (EmotionalState) s.readObject(); 471 453 this._memory = (Memory) s.readObject(); … … 519 501 520 502 AgentLogger.GetInstance().log("LOADING Personality: " + personalityFile); 521 AgentLoaderHandler c = new AgentLoaderHandler(_reactiveLayer,_emotionalState);503 EmotionDispositionsLoaderHandler c = new EmotionDispositionsLoaderHandler(_emotionalState); 522 504 523 505 SAXParserFactory factory = SAXParserFactory.newInstance(); … … 877 859 ObjectOutputStream s = new ObjectOutputStream(out); 878 860 879 s.writeObject(_reactiveLayer);880 861 s.writeObject(_emotionalState); 881 862 s.writeObject(_memory); … … 966 947 //s.writeObject(_ToM); 967 948 //s.writeObject(_nearbyAgents); 968 s.writeObject(_reactiveLayer);969 949 s.writeObject(_emotionalState); 970 950 s.writeObject(_memory); … … 1028 1008 1029 1009 ObjectInputStream s = new ObjectInputStream(in); 1030 this._reactiveLayer = (ReactiveProcess) s.readObject();1031 1010 this._emotionalState = (EmotionalState) s.readObject(); 1032 1011 this._memory = (Memory) s.readObject(); -
AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/AgentModel.java
r952 r961 6 6 import FAtiMA.Core.goals.GoalLibrary; 7 7 import FAtiMA.Core.memory.Memory; 8 import FAtiMA.Core.reactiveLayer.ReactiveProcess;9 8 import FAtiMA.Core.sensorEffector.RemoteAgent; 10 9 import FAtiMA.Core.wellFormedNames.Symbol; … … 22 21 public Memory getMemory(); 23 22 24 //public DeliberativeProcess getDeliberativeLayer();25 26 23 public AgentModel getModelToTest(Symbol ToM); 27 24 28 25 public String getName(); 29 30 public ReactiveProcess getReactiveLayer();31 26 32 27 public RemoteAgent getRemoteAgent();
Note: See TracChangeset
for help on using the changeset viewer.