almabasedmodel
Class AEventGenerator

java.lang.Object
  extended by almabasedmodel.AEventGenerator

public class AEventGenerator
extends java.lang.Object

This class evaluates and generates emotional events for ALMA emotional model. When some event is catched by EventGenerator.java class appropriate method here is called to evaluate the event by OCC variables and send it to emotion model (PogamutALMA.java). One event can lead to more emotions (usually two). The emotions generated depend on the event properties and sometimes also on the feeling we have associated with the agents that caused or are affected by the event. The names of the methods here follow certain logic. If the keyword Action is present it means the event is result of some action. If the proposal keyword is present, it means that the event is associated with proposals somehow and etc. "By" keyword means that the cause of the action wasn't our agent (someone else has done the action). Keyword "Other" means that our agent wasn't involved at all in the event.


Field Summary
 PogamutALMA emModel
          Class holding connection to ALMA emotion model
 EmotionalBot myAgent
          Pointer to our agent we generate evets for
 AEmotionState myEmotionState
          Class holding information about agents emotions and feelings got and computed from ALMA
private  int pickupEventId
          This variable prevents some concurent write exceptions in ALMA model - cause of them yet unknown
 
Constructor Summary
AEventGenerator(PogamutALMA inputModel, AEmotionState myEmState, EmotionalBot myAgent)
          Only constructor for this class.
 
Method Summary
 void generateActionByeByEvent(int id)
          Result of Action BYE.
 void generateActionByeOtherEvent(int id, PlayerInfo agentLeft)
          Result of Action BYE.
 void generateActionComplimentByEvent(int id)
          Result of Action COMPLIMENT.
 void generateActionComplimentOtherEvent(int id, PlayerInfo target)
          Result of Action COMPLIMENT.
 void generateActionCuddleByEvent(int id)
           
 void generateActionInsultByEvent(int id)
          Result of Action INSULT.
 void generateActionInsultOtherEvent(int id, PlayerInfo target)
          Result of Action INSULT.
 void generateActionKickByEvent(int id)
          Not implemented yet.
 void generateActionKickOtherEvent(int kickerId, PlayerInfo target)
          Result of Action KICK.
 void generateActionKissByEvent(int id)
          Result of Action KISS.
 void generateActionKissEvent(int agentId)
          Result of Action KISS – we have kissed the agent.
 void generateActionKissOtherEvent(int kisserId, PlayerInfo target)
          Result of Action KISS – someone has kissed other agent in the scenario (our agent wasn't involved).
 void generateActionLeaveByEvent(int id)
          Result of Action LEAVE.
 void generateActionLeaveOtherEvent(int id, PlayerInfo agentLeft)
          Result of Action LEAVE.
 void generateActionSexByEvent(int id)
          Result of Action SEX.
 void generateActionSexOtherEvent(int id, PlayerInfo result)
          Result of Action SEX.
 void generateActionSlapByEvent(int agentId)
          Result of Action SLAP – we have been slapped by other agent.
 void generateActionSlapOtherEvent(int slapperId, PlayerInfo target)
          Result of Action SLAP.
 void generateAloneEvent()
          Generated every x seconds when we are alone (agent doesn't see anyone).
 void generateAngerFearMessageEvent(int id, int smiliesCount, double reduction)
          Someone has sent us message that contains anger and/or fear smilies.
 void generateConversationIgnoreByEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
          This event is generated after some time we have spent together with other agent who is not responding to our conversation.
 void generateHappySadMessageEvent(int id, int smiliesCount, double reduction)
          Someone has sent us message that contains joy and/or distress smilies.
 void generateInterruptedEvent(java.util.ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> agentInterrupters)
          We are with some other agent and we are doing something with him – speaking or going somewhere – and we are interrupted by other agent or agents – someone is speaking to us, polymorph approached us or else and we want to react to these other agents (we are not ignoring him, he is close enough and etc.).
 void generateItemJelausyEvent(ScenarioItemType itemType, int id)
          Some agent gave item to other agent.
 void generateLikeDislikeMessageEvent(int id, int smiliesCount, double reduction)
          Someone has sent us message that contains like and/or dislike smilies.
 void generateMessageToOtherEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, int likeCount, int dislikeCount, double reduction)
          Someone has send message to other agent that contains like and/or dislike smilies.
 void generatePickupEvent(ScenarioItemType type)
          We have picked up some item – can be flower, condom or gun.
 void generatePlayerAppearedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player pl, boolean firstTime)
          This event is generated when we have spotted the agent for the first time or when we haven't seen the agent for some time and we see him again (emotions are lower in the second case).
 void generatePlayerKilledEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled pk)
          Shouldn't happen in the scenario.
 void generatePlayerLostEvent(int id)
          Generated when we have lost sight of other agent (we have stopped seeing him and this state lasts for some time now).
 void generatePlayerTogetherEvent(int id)
          Generated every x seconds we are together with other agent.
 void generatePolymorphActionBiteEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message)
          The polymorph has bitten us!
 void generatePolymorphBiteEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotDamaged bd)
          The polymorph has damaged us – caused our health to be lower.
 void generatePolymorphDislikeFearEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, double reduction)
          We are close to hostile polymorph who is making bad noises.
 void generatePolymorphLikeEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, double reduction)
          We have encountered friendly polymorph and he is making friendly noises toward us.
 void generateProposalByOtherToAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType type)
          Someone is making a proposal toward agent we are currently with!
 void generateProposalIgnoreEvent(int id)
          Someone we have made proposal to is not responding to it (he ignored our proposal).
 void generateProposalOtherResponseEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType type, boolean bAccepted)
          Someone is responding to proposal to other agent (and none of them is currently with us).
 void generateProposalResponseEvent(boolean accepted, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message)
          Someone has responded to our proposal.
 void generateProposalResponseToOtherByAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType proposalType, boolean bAccepted)
          The agent we are currently with is responding to proposal made by other agent.
 void generateProposalToOtherByAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType type)
          The agent we are currently with is making proposal to other agent.
 void generateProposalToOtherEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType type)
          Someone is making proposal to other agent (and none of them is currently with us).
 void generateReceivedItemEvent(ScenarioItemType itemType, int id)
          We have received item from someone.
 void generateReceivedProposalEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message, ProposalType type, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agentWith, java.util.Collection<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> agentInterrupters)
          Someone has made proposal to us.
 void generateWaitAgentNotReturnedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
          We were waiting for the agent and the agent didn't come to us in time.
 void generateWaitAgentReturnedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
          We were waiting for the agent and the agent returned in time.
 void generateWaitInProgressEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
          We are currently waiting on the agent.
 void generateWeHitPolymorphEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerDamaged pd)
          We have hit the polymorph with the gun – we are proud on ourselves.
 double sigmoid(double x, double normV, double sharpness)
          Calculates S-curve for point x in the interval 0 .. normV
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emModel

public PogamutALMA emModel
Class holding connection to ALMA emotion model


myEmotionState

public AEmotionState myEmotionState
Class holding information about agents emotions and feelings got and computed from ALMA


myAgent

public EmotionalBot myAgent
Pointer to our agent we generate evets for


pickupEventId

private int pickupEventId
This variable prevents some concurent write exceptions in ALMA model - cause of them yet unknown

Constructor Detail

AEventGenerator

public AEventGenerator(PogamutALMA inputModel,
                       AEmotionState myEmState,
                       EmotionalBot myAgent)
Only constructor for this class. Requires several other objects.

Parameters:
inputModel - emotion model we are using (ALMA)
myEmState - class that holds emotion and feeling information
myAgent - the agent we are generating emotion events for
Method Detail

generateActionKissEvent

public void generateActionKissEvent(int agentId)
Result of Action KISS – we have kissed the agent. Emotions generated depends on the feeling toward other agent. Emotions: joy and love or distress and hate

Parameters:
agentId - agent we have kissed

generateActionKissOtherEvent

public void generateActionKissOtherEvent(int kisserId,
                                         PlayerInfo target)
Result of Action KISS – someone has kissed other agent in the scenario (our agent wasn't involved). Emotions are dependent on the feeling. We will generate dislike and anger emotions towards kisser - the intensity is as high as we like the opposite sex agent in the couple. Emotions: disliking and anger

Parameters:
kisserId - the agent who kissed someone
target - the agent who was kissed

generateActionSlapByEvent

public void generateActionSlapByEvent(int agentId)
Result of Action SLAP – we have been slapped by other agent. Emotions are not dependent on the feeling towards agent. Emotions: distress and disliking and anger

Parameters:
agentId - the agent who slapped us

generateActionSlapOtherEvent

public void generateActionSlapOtherEvent(int slapperId,
                                         PlayerInfo target)
Result of Action SLAP. Someone has slapped other agent. We will generate emotions if the feeling toward the agent slapped exceeds certain threshold. Emotions: (disliking and anger)

Parameters:
slapperId - agent who slapped someone
target - victim - agent that was slapped

generateActionKickOtherEvent

public void generateActionKickOtherEvent(int kickerId,
                                         PlayerInfo target)
Result of Action KICK. Someone has kicked other agent. We will generate emotions if the feeling toward the agent kicked exceeds certain threshold. Emotions: distress and anger

Parameters:
kickerId - the agent who kicked someone
target - victim - agent who was kicked (probably some animal)

generateActionByeByEvent

public void generateActionByeByEvent(int id)
Result of Action BYE. Some other agent has said bye to us. Emotions depends on the feeling toward agent (if positive or negative). Emotions: joy (if the feeling is negative) or distress (if the feeling is positive)

Parameters:
id - agent that said bye to us

generateActionComplimentByEvent

public void generateActionComplimentByEvent(int id)
Result of Action COMPLIMENT. Someone has said compliment to us. Emotions intensities depend on the feeling toward other agent. Emotions: joy and liking (higher the feeling, higher the emotions)

Parameters:
id - agent that said compliment to us

generateActionComplimentOtherEvent

public void generateActionComplimentOtherEvent(int id,
                                               PlayerInfo target)
Result of Action COMPLIMENT. Someone has said compliment to other agent. Emotions intensities depend on the feeling toward the agent who said the compliment. Emotions: distress and anger (toward the agent who said the compliment)

Parameters:
id - the agent who said the compliment
target - the target of the compliment (not us)

generateActionCuddleByEvent

public void generateActionCuddleByEvent(int id)
Parameters:
id -

generateActionInsultByEvent

public void generateActionInsultByEvent(int id)
Result of Action INSULT. Other agent has insulted us. Emotions don't depend on the feeling. Emotions: disliking and anger

Parameters:
id - agent who said the insult to us

generateActionInsultOtherEvent

public void generateActionInsultOtherEvent(int id,
                                           PlayerInfo target)
Result of Action INSULT. Someone has insulted other agent. Depends on the feeling toward the agent who was insulted. Emotions: joy and pride (feeling toward the insulted agent is negative) or distress and anger (feeling toward the insulted agent is positive)

Parameters:
id - agent that said the insult
target - victim - the agent the insult was for

generateActionKickByEvent

public void generateActionKickByEvent(int id)
Not implemented yet. Just animals should be kicked, not agents. Called when someone kicks us.

Parameters:
id -

generateActionSexByEvent

public void generateActionSexByEvent(int id)
Result of Action SEX. We are making love with other agent or vice versa (the method has By in the name, but is used even when WE were the cause of the action). This is the result of accepted proposal sex. The emotions depends on the feeling (for positive emotions the feeling should be higher than sexFeelingConst – this should be true, otherwise we wouldn't accept the proposal anyway). Emotions: liking and love (if the feeling exceeds threshold) or disliking and hate (if the feeling does not exceed threshold)

Parameters:
id - the agent we are making love to or vice versa

generateActionSexOtherEvent

public void generateActionSexOtherEvent(int id,
                                        PlayerInfo result)
Result of Action SEX. Someone is making love with other agent. Emotions depend on the feeling toward the agent of opposite sex in the couple. The higher the feeling the higher the intensities of emotions. The emotions here are associated toward tboth of the agents. Emotions: distress and hate (toward both of the agents)

Parameters:
id - agent that is making love to someone
result - target of the love act

generateActionKissByEvent

public void generateActionKissByEvent(int id)
Result of Action KISS. Someone has kissed us. Emotions depend on the feeling toward the agent – the higher the feeling, the bigger positive emotions and vice versa. Emotions: joy and love or distress and hate

Parameters:
id - agent that has kissed us

generateActionLeaveByEvent

public void generateActionLeaveByEvent(int id)
Result of Action LEAVE. Someone has left us – said bye in a bad way. Emotions depend on the feeling toward the agent. Emotions: joy and gratitude (feeling negative) or distress and anger (feeling positive)

Parameters:
id - agent that has left us

generateActionLeaveOtherEvent

public void generateActionLeaveOtherEvent(int id,
                                          PlayerInfo agentLeft)
Result of Action LEAVE. Someone has left other agent. Emotions depend on the feelings toward both of the agents. Emotions: joy – if someone we don't like left someone we like or else OR distress – if someone we like left someone we like

Parameters:
id - the agent that left someone
agentLeft - the agent that was left by someone

generateActionByeOtherEvent

public void generateActionByeOtherEvent(int id,
                                        PlayerInfo agentLeft)
Result of Action BYE. Someone has left other agent. Emotions depend on the feelings toward both of the agents. Emotions: joy – if someone we don't like said bye to someone we like or else OR distress – if someone we like said bye to someone we like

Parameters:
id - the agent that said bye to someone
agentLeft - the agent that was left (the bye was for this agent)

generateConversationIgnoreByEvent

public void generateConversationIgnoreByEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
This event is generated after some time we have spent together with other agent who is not responding to our conversation. When the conditions are met the event will be generated every 35 seconds. Emotions: anger

Parameters:
agent - agent that ignored us

generateAloneEvent

public void generateAloneEvent()
Generated every x seconds when we are alone (agent doesn't see anyone). Emotions: distress


generatePickupEvent

public void generatePickupEvent(ScenarioItemType type)
We have picked up some item – can be flower, condom or gun. Emotions don't depend on the type of the item. Emotions: joy

Parameters:
type - type of the item we have picked up

generatePlayerLostEvent

public void generatePlayerLostEvent(int id)
Generated when we have lost sight of other agent (we have stopped seeing him and this state lasts for some time now). Emotions depend on the feeling toward the agent are more intense if the agent is of the opposite sex. Emotions: joy (if the feeling is negative) or distress (if the feeling is positive)

Parameters:
id - the agent we have lost sight to

generatePlayerTogetherEvent

public void generatePlayerTogetherEvent(int id)
Generated every x seconds we are together with other agent. Emotions depend on the feeling toward the other agent. Emotions are more intense if the agent is of opposite sex. Emotions: joy (if the feeling is positive) or distress (if the feeling is negative)

Parameters:
id - the agent we are together with

generatePlayerAppearedEvent

public void generatePlayerAppearedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player pl,
                                        boolean firstTime)
This event is generated when we have spotted the agent for the first time or when we haven't seen the agent for some time and we see him again (emotions are lower in the second case). Emotions depend on the feeling toward the agent. Emotions are more intense if the agent is of opposite sex. Emotions: joy (if the feeling is positive) or distress (if the feeling is negative)

Parameters:
pl - agent that has appeared
firstTime - true if we see the agent for the first time

generateAngerFearMessageEvent

public void generateAngerFearMessageEvent(int id,
                                          int smiliesCount,
                                          double reduction)
Someone has sent us message that contains anger and/or fear smilies. We will generate anger or fear emotion toward the agent based on the number of the smilies (more anger smilies = anger and vice versa). The emotion intensity is affected by the number of messages we got from the agent in last x seconds. The more messages we got the lower the intensity of the emotion. The intensity of the emotions decrease rapidly. The reduction is sent as a parameter. Emotions: fear or anger

Parameters:
id - agent who said the message
smiliesCount - number of the smilies - positive means more anger smilies, negative more fear smilies
reduction - number we will reduce the emotion instensity by

generateHappySadMessageEvent

public void generateHappySadMessageEvent(int id,
                                         int smiliesCount,
                                         double reduction)
Someone has sent us message that contains joy and/or distress smilies. We will generate joy or distress emotion toward the agent based on the number of the smilies (more joy smilies = joy and vice versa). The emotion intensity is affected by the number of messages we got from the agent in last x seconds. The more messages we got the lower the intensity of the emotion. The intensity of the emotions decrease rapidly. The reduction is sent as a parameter. Emotions: joy or distress

Parameters:
id - agent who said the message
smiliesCount - number of the smilies - positive means more joy smilies, negative more distress smilies
reduction - number we will reduce the emotion instensity by

generateInterruptedEvent

public void generateInterruptedEvent(java.util.ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> agentInterrupters)
We are with some other agent and we are doing something with him – speaking or going somewhere – and we are interrupted by other agent or agents – someone is speaking to us, polymorph approached us or else and we want to react to these other agents (we are not ignoring him, he is close enough and etc.). Emotions depend on the feeling toward the agents. Emotions: joy and gratitude (feeling is positive) or distress and anger (feeling is negative)

Parameters:
agentInterrupters - list of agents that are interrupting us

generateItemJelausyEvent

public void generateItemJelausyEvent(ScenarioItemType itemType,
                                     int id)
Some agent gave item to other agent. We will generate emotions if we have positive feeling to the giver and the item is flower – we will be jelaous. Emotions: distress and anger (if the feeling is positive and item is flower)

Parameters:
itemType - type of the item that was given to someone
id - id of the agent who gave the item to someone (not us)

generateMessageToOtherEvent

public void generateMessageToOtherEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                        int likeCount,
                                        int dislikeCount,
                                        double reduction)
Someone has send message to other agent that contains like and/or dislike smilies. We will generate emotions based on the smilies. We will generate the emotions just in case the feeling toward the agent who said the message is positive. There is big reduction in emotion intensity based on the number of the messages that the agent said to other agent. Emotions: distress and anger (if the message contains more liking smilies) or joy and gratitude (if the message contains more disliking smilies)

Parameters:
message - the message that was sent to some agent
likeCount - number of like smilies in the message
dislikeCount - number of dislike smilies in the message
reduction - number we will reduce the emotion intensity by

generateLikeDislikeMessageEvent

public void generateLikeDislikeMessageEvent(int id,
                                            int smiliesCount,
                                            double reduction)
Someone has sent us message that contains like and/or dislike smilies. We will generate like or dislike emotion toward the agent based on the number of the smilies (more like smilies = like and vice versa). The emotion intensity is affected by the number of messages we got from the agent in last x seconds. The more messages we got the lower the intensity of the emotion. The intensity of the emotions decrease rapidly. The reduction is sent as a parameter. Emotions: like or dislike

Parameters:
id - agent who said the message
smiliesCount - number of the smilies - positive means more like smilies, negative more dislike smilies
reduction - number we will reduce the emotion instensity by

generatePolymorphActionBiteEvent

public void generatePolymorphActionBiteEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message)
The polymorph has bitten us! We will generate negative emotions. Emotions: fears confirmed and fear Note: Fears confirmed emotion will lead probably to other negative emotiosn such as distress. Otherwise it is not monitored by the agents.

Parameters:
message - message containing the hostile polymorph message

generateProposalToOtherEvent

public void generateProposalToOtherEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                         ProposalType type)
Someone is making proposal to other agent (and none of them is currently with us). We will generate emotions just in case we have positive feelings toward the agent who is making the proposal. The emotion intensities are dependent on the type of proposal – kiss and sex proposals generate high negative emotions while other proposals just low negative emotions. Emotions: distress and disliking

Parameters:
message - message containing the proposal of some other agent to someone
type - type of the proposal sent

generateProposalOtherResponseEvent

public void generateProposalOtherResponseEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                               ProposalType type,
                                               boolean bAccepted)
Someone is responding to proposal to other agent (and none of them is currently with us). We will generate emotions just in case we have positive feelings toward the agent who is responding to the proposal. If he accepts the proposal we will generate negative emotions and vice versa. The intensity is also dependent on the type of proposal – kiss and sex proposals generate medium positive/negative emotions while other proposals just low positive/negative emotions. Emotions: joy and liking (in case the proposal was rejected) or distress and disliking (in case the proposal was accepted)

Parameters:
message - message containing the proposal response
type - type of the proposal
bAccepted - true if it was accepted, false otherwise

generateProposalResponseToOtherByAgentWithEvent

public void generateProposalResponseToOtherByAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                                            ProposalType proposalType,
                                                            boolean bAccepted)
The agent we are currently with is responding to proposal made by other agent. This is the same as with generateProposalOtherResponse event above, except the emotion intensities are medium to high. Emotions: joy and liking (in case the proposal was rejected) or distress and disliking (in case the proposal was accepted)

Parameters:
message - message containing the proposal response
proposalType - type of the proposal
bAccepted - true if the proposal was accepted, false otherwise

generateProposalToOtherByAgentWithEvent

public void generateProposalToOtherByAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                                    ProposalType type)
The agent we are currently with is making proposal to other agent. This is the same as above with generateProposalOtherMaking, except the emotions generated are slightly higher. Emotions: distress and disliking

Parameters:
message - message containing the proposal from agentWith
type - type of the proposal

generateProposalByOtherToAgentWithEvent

public void generateProposalByOtherToAgentWithEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                                    ProposalType type)
Someone is making a proposal toward agent we are currently with! We will generate negative emotions with intensities depending on the type of the proposal. Sex and kiss proposals will trigger emotions with higher intensities. Emotions: distress and disliking

Parameters:
message - message containing the proposal for agentWith
type - type of the proposal

generateProposalResponseEvent

public void generateProposalResponseEvent(boolean accepted,
                                          cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message)
Someone has responded to our proposal. If accepted we will generate positive emotions and vice versa. The feeling toward agent is not important here. Emotions: joy and liking (if the proposal was accepted) or distress and disliking (if the proposal was rejected)

Parameters:
accepted - true if the proposal was accepted
message - message containing the proposal response

generateProposalIgnoreEvent

public void generateProposalIgnoreEvent(int id)
Someone we have made proposal to is not responding to it (he ignored our proposal). We will be a bit unhappy by this. Emotions: anger

Parameters:
id - agent that ignored our proposal

generatePolymorphDislikeFearEvent

public void generatePolymorphDislikeFearEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                              double reduction)
We are close to hostile polymorph who is making bad noises. We are afraid of him and don't like him. There is ongoing reduction of intensity based on the number of the negative messages the polymorph has made to us. Emotions: dislike and fear

Parameters:
message - message containing the hostile polymorph message
reduction - we will reduce the emotion intensity by this

generatePolymorphBiteEvent

public void generatePolymorphBiteEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotDamaged bd)
The polymorph has damaged us – caused our health to be lower. Not generated right now, will be probably erased and just PolymorphActionBiteEvent will be used. Emotions: fear confirmed and fear

Parameters:
bd - message containing the information about who damaged us

generatePolymorphLikeEvent

public void generatePolymorphLikeEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                       double reduction)
We have encountered friendly polymorph and he is making friendly noises toward us. There is ongoing reduction of intensity based on the number of messages the polymorph has made to us. Emotions: liking

Parameters:
message - message containing the friendly polymoprh message
reduction - we will reduce the emotion intensity by this number

generateWaitAgentNotReturnedEvent

public void generateWaitAgentNotReturnedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
We were waiting for the agent and the agent didn't come to us in time. Emotions: distress and disliking

Parameters:
agent - agent that we were waiting for

generateWaitAgentReturnedEvent

public void generateWaitAgentReturnedEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
We were waiting for the agent and the agent returned in time. Emotions: joy and liking

Parameters:
agent - agent we were waiting for and now has returned

generateWaitInProgressEvent

public void generateWaitInProgressEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
We are currently waiting on the agent. Every few seconds this event is generated while waiting. Emotions: distress and anger

Parameters:
agent - agent we are waiting for

generateWeHitPolymorphEvent

public void generateWeHitPolymorphEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerDamaged pd)
We have hit the polymorph with the gun – we are proud on ourselves. Emotions: joy and pride

Parameters:
pd - message containing the information about hit we have made

generateReceivedItemEvent

public void generateReceivedItemEvent(ScenarioItemType itemType,
                                      int id)
We have received item from someone. We will react based on the feeling toward the giver and on the type of the item. Generally we will be pleased, just if the item is condom, then we will be offended unless the feeling toward the agent is high. Emotions: joy and liking (medium for flower or condom and feeling high) or distress and disliking (condom and feeling low)

Parameters:
itemType - type of the item we have received
id - agent who gave us the item

generateReceivedProposalEvent

public void generateReceivedProposalEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat message,
                                          ProposalType type,
                                          cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agentWith,
                                          java.util.Collection<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> agentInterrupters)
Someone has made proposal to us. We will react based on the feelings toward the other agent. If the proposal will be accepted we are happy, if we will reject it we will be offended by kiss or sex proposals. If we don't like the agent (feeling negative) we will be offended a little by any proposal and vice versa (except the kiss and sex proposals, that are handled separately). Emotions: joy and gratitude or distress and anger

Parameters:
message - message containing the proposal from other agent
type - type of the proposal
agentWith - the agent who made the proposal
agentInterrupters - list of all agent interrupters if the proposal is proposal leave we will check if we want to leave the agents - if we like them too much we will be unhappy that someone is asking us to leave

generatePlayerKilledEvent

public void generatePlayerKilledEvent(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled pk)
Shouldn't happen in the scenario. Left from previous implementations.

Parameters:
pk - message containing the info about player killed

sigmoid

public double sigmoid(double x,
                      double normV,
                      double sharpness)
Calculates S-curve for point x in the interval 0 .. normV

Parameters:
x - input coordinate
normV - scale value which corresponds to 1.0 if x is normalized
sharpness - adjusts steepness of curve (value of 1 equals undistorted sigmoid)
Returns:
sigmoid for point X