Changeset 709


Ignore:
Timestamp:
11/12/2010 12:06:25 PM (10 years ago)
Author:
joao.dias
Message:
 
Location:
AgentMind/branches/FAtiMA-Modular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/Context.java

    r694 r709  
    88import FAtiMA.Core.wellFormedNames.Substitution; 
    99import FAtiMA.Core.wellFormedNames.SubstitutionSet; 
    10 import FAtiMA.socialRelations.LikeCondition; 
    1110 
    1211/** 
     
    2322        private TimeCondition _timeCondition; 
    2423        private PlaceCondition _placeCondition; 
    25         private ArrayList<LikeCondition> _socialConditions; 
     24        private ArrayList<SocialCondition> _socialConditions; 
    2625         
    2726        public Context(){ 
    2827                _timeCondition = NullTimeCondition.GetInstance(); 
    2928                _placeCondition = NullPlaceCondition.GetInstance(); 
    30                 _socialConditions = new ArrayList<LikeCondition>(); 
     29                _socialConditions = new ArrayList<SocialCondition>(); 
    3130        } 
    3231         
     
    4746        } 
    4847         
    49         public void SetSocialConditions( ArrayList<LikeCondition> socialConditions ){ 
     48        public void SetSocialConditions( ArrayList<SocialCondition> socialConditions ){ 
    5049                _socialConditions = socialConditions; 
    5150        } 
    5251         
    53         public void AddSocialCondition( LikeCondition socialCondition ){ 
     52        public void AddSocialCondition(SocialCondition socialCondition ){ 
    5453                _socialConditions.add(socialCondition); 
    5554        } 
     
    7069                aux._placeCondition = (PlaceCondition)_placeCondition.clone(); 
    7170                for( int i = 0, limit = _socialConditions.size(); i != limit; ++i ) 
    72                         aux._socialConditions.add((LikeCondition)_socialConditions.get(i).clone() ); 
     71                        aux._socialConditions.add((SocialCondition)_socialConditions.get(i).clone() ); 
    7372                return aux; 
    7473        } 
     
    103102                _placeCondition.MakeGround(bindings); 
    104103                for( int i = 0, limit = _socialConditions.size(); i != limit; ++i ){ 
    105                         ((LikeCondition)_socialConditions.get(i)).MakeGround(bindings); 
     104                        ((SocialCondition)_socialConditions.get(i)).MakeGround(bindings); 
    106105                } 
    107106        //this._name.MakeGround(bindings); 
     
    114113                _placeCondition.MakeGround(subst); 
    115114                for( int i = 0, limit = _socialConditions.size(); i != limit; ++i ){ 
    116                         ((LikeCondition)_socialConditions.get(i)).MakeGround(subst); 
     115                        ((SocialCondition)_socialConditions.get(i)).MakeGround(subst); 
    117116                } 
    118117    } 
     
    122121                _placeCondition.ReplaceUnboundVariables(variableID); 
    123122                for( int i = 0, limit = _socialConditions.size(); i != limit; ++i ){ 
    124                         ((LikeCondition)_socialConditions.get(i)).ReplaceUnboundVariables(variableID); 
     123                        ((SocialCondition)_socialConditions.get(i)).ReplaceUnboundVariables(variableID); 
    125124                } 
    126125        } 
     
    131130                boolean grounded = true; 
    132131                for( int i = 0, limit = _socialConditions.size(); i != limit; ++i ){ 
    133                         if( !((LikeCondition)_socialConditions.get(i)).isGrounded() ){ 
     132                        if( !((SocialCondition)_socialConditions.get(i)).isGrounded() ){ 
    134133                                grounded = false; 
    135134                                break; 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/CultureLoaderHandler.java

    r696 r709  
    363363                _contextBeingParsed.SetPlaceCondition( PlaceCondition.Parse(attributes) ); 
    364364        } 
     365 
     366        public void Social(Attributes attributes ) throws ContextParsingException{ 
     367                if( _contextBeingParsed == null ) 
     368                        throw new ContextParsingException("Trying to parse a SocialCondition outside of a Context"); 
     369 
     370                _contextBeingParsed.AddSocialCondition( SocialCondition.Parse(attributes) ); 
     371        } 
    365372} 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/emotionalState/Appraisal.java

    r698 r709  
    3737import FAtiMA.Core.util.enumerables.EmotionType; 
    3838import FAtiMA.Core.wellFormedNames.Name; 
    39 import FAtiMA.socialRelations.LikeRelation; 
    4039 
    4140 
     
    207206                String subject = event.GetSubject(); 
    208207                 
     208                 
    209209                if(desirabilityForOther == 0) return null; 
    210210                 
    211                 targetBias = LikeRelation.getRelation(Constants.SELF,other).getValue(am.getMemory()) * desirabilityForOther/10; 
     211                //TODO move this code to the social relations component appraisal  
     212                /*targetBias = LikeRelation.getRelation(Constants.SELF,other).getValue(am.getMemory()) * desirabilityForOther/10; 
    212213                bias = targetBias; 
    213214                if(!subject.equals(Constants.SELF)) 
     
    217218                } 
    218219                 
    219                 newDesirability = (desirability + bias)/2; 
    220  
    221                  
    222                 return OCCAppraiseFortuneOfOthers(event, newDesirability, desirabilityForOther, other); 
     220                newDesirability = (desirability + bias)/2;*/ 
     221 
     222                 
     223                return OCCAppraiseFortuneOfOthers(event, desirability, desirabilityForOther, other); 
    223224                                         
    224225        } 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/memory/episodicMemory/ActionDetail.java

    r667 r709  
    5050import FAtiMA.Core.sensorEffector.Event; 
    5151import FAtiMA.Core.sensorEffector.Parameter; 
    52 import FAtiMA.Core.util.Constants; 
    5352import FAtiMA.Core.util.enumerables.ActionEvent; 
    5453import FAtiMA.Core.util.enumerables.EmotionType; 
     
    5655import FAtiMA.Core.util.enumerables.EventType; 
    5756import FAtiMA.Core.util.enumerables.GoalEvent; 
    58 import FAtiMA.socialRelations.LikeRelation; 
    59 import FAtiMA.socialRelations.RespectRelation; 
     57 
    6058 
    6159 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/sensorEffector/RemoteAgent.java

    r699 r709  
    9797import FAtiMA.Core.wellFormedNames.Name; 
    9898import FAtiMA.Core.wellFormedNames.SubstitutionSet; 
    99 import FAtiMA.socialRelations.LikeRelation; 
    100 import FAtiMA.socialRelations.RespectRelation; 
    10199 
    102100 
     
    446444                Send(msg); 
    447445                 
    448                 LikeRelation like; 
     446                /*LikeRelation like; 
    449447                RespectRelation respect; 
    450448                ArrayList<LikeRelation> relations = LikeRelation.getAllRelations(this._agent.getMemory(), this._agent.getName()); 
     
    474472                msg += "</Relations>"; 
    475473                Send(msg); 
     474                */ 
    476475        } 
    477476         
Note: See TracChangeset for help on using the changeset viewer.