|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalmabasedmodel.AEmotionState
public class AEmotionState
This class is used to count and store the feeling toward other agents in the scenario and provides interface between ALMA and our agent. Feeling is counted from the emotions that are caused by other agents in the scenario. These emotions are used for counting the feeling: love, hate, liking, disliking, joy, distress, anger and gratitude. Love, hate, liking and disliking creates fixed feeling part - these emotions are remebered and can change a little during the scenario. The second, dynamic part of the feeling is counted from emotions joy, distress, anger and gratitude. These emotions are not remembered and in ALMA they decay over time.
| Field Summary | |
|---|---|
AMood |
currentMood
Here we store current mood of the agent - not used right now |
java.util.ArrayList<java.lang.Integer> |
emotionObjects
Here we store ids of all agents in the scenario, so we can get emotions towards them from ALMA |
java.util.HashMap<java.lang.Integer,java.util.HashMap<de.affect.emotion.EmotionType,AEmotion>> |
feelingsHistory
Here the fixed part of the feeling is stored for all agents. |
java.util.ArrayList<AMood> |
moodHistory
Here we store mood history of the agent - not used right now |
EmotionalBot |
myAgent
Pointer toward our agent |
PogamutALMA |
myALMA
Pointer toward ALMA emotion model |
| Constructor Summary | |
|---|---|
AEmotionState(PogamutALMA alma,
EmotionalBot myAgent)
Only constructor for this class, requires few other objects. |
|
| Method Summary | |
|---|---|
void |
decayFeelings()
Decay all our stored emotions by some const. |
double |
getAlmaEmotionIntensity(int id,
de.affect.emotion.EmotionType type)
Returns intensity of emotion towards elicitor of input type. |
AEmotion |
getCurrentDominantEmotion()
Returns the current dominant emotion from ALMA. |
java.util.ArrayList<AEmotion> |
getCurrentEmotions()
Returns the list of ALMA current emotions for our agent. |
AMood |
getCurrentMood()
Returns agent current mood. |
double |
getFeeling(int id)
Here we get a feeling toward agent - either positive or negative. |
java.lang.String |
getSmiliesString(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player plr)
Here we will process our feelings and emotions and generate appropriate smilies string that will be used in our agent messages. |
void |
insertEmotionObject(int newId)
Checks if emotionObjects already contains the id we want to add. |
int |
parseId(java.lang.String stringId)
Parses elicitor (in string format) for int UnrealId |
void |
processEmotions()
Updates current emotions and mood |
void |
processFeelings()
Updates our feelingsHistory, so we have emotions we felt to all objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public PogamutALMA myALMA
public EmotionalBot myAgent
public AMood currentMood
public java.util.ArrayList<AMood> moodHistory
public java.util.HashMap<java.lang.Integer,java.util.HashMap<de.affect.emotion.EmotionType,AEmotion>> feelingsHistory
public java.util.ArrayList<java.lang.Integer> emotionObjects
| Constructor Detail |
|---|
public AEmotionState(PogamutALMA alma,
EmotionalBot myAgent)
alma - our ALMA emotion modelmyAgent - our agent| Method Detail |
|---|
public void decayFeelings()
public void processFeelings()
public void processEmotions()
public java.util.ArrayList<AEmotion> getCurrentEmotions()
public AEmotion getCurrentDominantEmotion()
public double getAlmaEmotionIntensity(int id,
de.affect.emotion.EmotionType type)
id - agent the emotion is associated withtype - type of the emotion
public AMood getCurrentMood()
public double getFeeling(int id)
id - agent that the feeling is associated with
public java.lang.String getSmiliesString(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player plr)
plr - agent we want to generate smilies string for
public int parseId(java.lang.String stringId)
stringId - - string to parse
public void insertEmotionObject(int newId)
newId - - id to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||