Details on the tool

Description

This tool gathers from a society of agents their emotional arousal and self-rated motivations as well as their location in order to plot a map of a city or geographical region with information about the motivations and emotional state of the agents that inhabit it.

Features

Video

Images

Input specification

A detailed description of the xml structure follows. The root element is <emotionalagentmapper>. Inside this element it is mandatory to have a <geographic_bonduaries> and a <frame_set> elements.
In the <geographic_bonduaries> element we can find several options:

  • The <type> element defines the type of the coordinates. Currently only 2 dimensional Cartesian coordinates are supported. This element is mandatory.
  • The <lower_left> defines the lower left point of the rectangle that defines the limits of the map. This element is mandatory.
  • The <upper_right> defines the upper right point of the rectangle that defines the limits of the map. This element is mandatory.
  • The <bg> is used to define the background image of the map. The image must be in the PNG format. Images with a 16:9 ratio are recommended. This element is optional.
  • The <agent_ellipse_size> is used to define the size of the circle that represents an agent in the map. The value can be any float higher than 0. The default is 10. This element is optional.
  • The <agent_colors> is used to update or extend the default emotion to color mapping. Inside it we can find the element <e> element that has the attributes name, r (red), g (green) and b (blue). Attributes r, j and b represent a color in the RGB color model and thus must be integers between 0 and 255. The <agent_colors> element is optional and does not require that all emotions used in the simulation are included. The default emotion to color mapping can be found in the Table 1.

Table 1.  Default emotion to color mapping.

Emotion name Color

Happy

Red

Unhappy

Blue

Fear

RGB(122, 27, 224)

Hope

Green

Surprise

Yellow

Disappointed

Cyan

Relieved

Magenta


In the <frame_set> element we can find the data regarding the agents’ position and internal state. This element has the attributes time_units which defines the units used by the frames (currently only seconds are supported) and size (the number of frames).
Inside the <frame_set> we have <f> elements that correspond to frames. Each frame represents an instant in time. This element has the attribute t that indicates what instant the frame represents. Inside the <f> element we have <a> elements that correspond to agents. This element has the attribute n (a string containing a unique identifier, can be any string) and the element c (a string containing the position of the agent, this string depends on the coordinates type, for the 2d_carthesian the string must be “x y”, with x and y as float values). Inside the element <a> we have <el>, <gl> and <bl> elements which represent an emotion list, a goal list and a belief list, respectively.  The <el> element is mandatory and it must have at least one <e> element inside. The <gl> and <bl> elements are optional. All the agents must be present in all the frames. Inside the <el> element we have <e> elements. Each one of the <e> elements represents an emotion. This element has the attributes n (the name of the emotion) and i (a float with the intensity of the emotion with values in the interval [0,1]). An agent can have arbitrary emotions, that is, it does not always need to have the same emotions. Inside the <gl> and <bl> we have <d> elements. Inside a <d> element we find a string containing a description of the goal or belief.
It should also be noted that the tag names which can be high in number are quite short. As many frames with many agents can exist, this will help to save disk space.