Leviathan
An example of the Leviathan function can be found here: Leviathan Example
-
class
defSim.extensions.influence_sim.Leviathan.
Leviathan
(regime: str, **kwargs) Bases:
defSim.influence_sim.influence_sim.InfluenceOperator
-
static
influence
(network: networkx.classes.graph.Graph, ai: int, aj: int, noise: float, gossip: int, sigma: float, vanity: float, propagation: float) The method of influence of the Leviathan model, called in spread_influence. The agent aj influence the opinion of ai.
- Parameters
network – The network in which the agents exist.
ai – the index of the focal agent that is the target of the influence.
aj – the index of the focal agent that is the source of the influence.
attributes – A list of the names of all the attributes that are subject to influence. If an agent has e.g. the attributes “Sex” and “Music taste”, only supply [“Music taste”] as a parameter for this function. The influence function itself can still be a function of the “Sex” attribute.
noise – the noise in the influence. Correspond to a uniform random number between -noise and noise .
gossip – the number of gossip in the influence. The agent aj talk about that number of agents.
sigma – ruling the slope of the logistic function determining the propagation coefficients.
vanity – ruling the intensity of the reward or punishment depending of aj opinion about ai.
propagation – ruling the intensity of the opinion influence.
-
static
spread_influence
(network: networkx.classes.graph.Graph, agent_i: int, agents_j: List[int], regime: str, dissimilarity_measure: defSim.dissimilarity_component.dissimilarity_calculator.DissimilarityCalculator, attributes: Optional[List[str]] = None, **kwargs) → bool The Leviathan model combines processes of vanity and opinion propagation. Each agent has an opinion about herself and about each other agent. The model assume that how strongly agents influence each other is dependent on the hierarchy between them. During an interaction, the agents propagate their opinions about themselves and about other people they know. Moreover, each individual is subject to vanity : if her interlocutor seems to value her highly, then she increases her opinion about this interlocutor. On the contrary she tends to decrease her opinion about those who seem to undervalue her. The model only exist in the one-to-one communication regime, with a bi-directional influence. Based on [Deffuant2013]
- Parameters
network – The network in which the agents exist.
agent_i – the index of the focal agent that is either the source or the target of the influence
agents_j – A list of indices of the agents who can be either the source or the targets of the influence. The list can have a single entry, implementing one-to-one communication.
regime – only “one-to-one” is managed.
dissimilarity_measure – An instance of a
DissimilarityCalculator
.kwargs – Additional parameters specific to the implementation of the InfluenceOperator. Possible parameters are the following:
sigma (float=0.3) – ruling the slope of the logistic function determining the propagation coefficients.
:param int=1 gossip:the number of gossip in the influence. The agent aj talk about that number of agents. :param float=0.1 noise: the noise in the influence. Correspond to a uniform random number between -noise and noise. :param float=0.3 vanity: ruling the intensity of the reward or punishment depending of aj opinion about ai. :param float=1 propagation: ruling the intensity of the opinion influence. :returns: true if agent(s) were successfully influenced (always)
-
static
References
- Deffuant2013
Deffuant, G., Carletti, T., & Huet, S. (2013). The Leviathan Model: Absolute dominance, generalised distrust, small worlds and other patterns emerging from combining vanity with opinion propagation. The Journal of Artificial Societies and Social Simulation, 16(1), 32.