Persuasion

class defSim.influence_sim.Persuasion.Persuasion(regime: str, **kwargs)

Bases: defSim.influence_sim.influence_sim.InfluenceOperator

Models with persuasive social influence can be grounded on the assumption that people are unable to communicate their precise opinion position, but rather communicate an argument close to their opinion position. We take the opinion position op the sending agent in the model (between 0 and 1) as the probability that this agent will communicate argument 1. It is a special case of the opinion ‘urn’-model where a random argument is drawn from a collection of arguments \(O\) in the memory of agent \(i\), containing either pro or con arguments as \(\{0,1\}\). Such an ‘urn’-based opinion can be transformed to a continuous opinion by taking \(\dfrac{\sum_{x \in O_i} x}{|O|}\). Here, we make use of that relationship and implement an implicit argument communication model. agent_i communicates a pro (1) argument on a given topic with a probability equal to their current opinion on that topic.

__init__(regime: str, **kwargs)
Parameters
  • regime – This string determines the mode in which the agents influence each other. In ‘one-to-one’ the focal agent influences one other agent, in ‘one-to-many’ multiple other agents and in ‘many-to-one’ the focal agent is influenced by multiple other agents in the network.

  • kwargs – Additional parameters specific to the implementation of the InfluenceOperator. Possible parameters are the following:

  • convergence_rate (float=0.2) – A number between 0 and 1 determining the share of the opinion scale the receiving agent will move in either direction after interaction.

  • bi_directional (bool=False) – A boolean specifying whether influence is bi- or uni-directional.

  • confidence_level (float=1) – A number between 0 and 1 determining the cutoff value for the dissimilarity at which agents do not interact anymore. 1 means that only strictly dissimilar agents do not interact, 0 means no agents will interact. Passed as a kwargs argument.

spread_influence(network: networkx.classes.graph.Graph, agent_i: int, agents_j: List[int], dissimilarity_measure: defSim.dissimilarity_component.dissimilarity_calculator.DissimilarityCalculator, attributes: Optional[List[str]] = None, **kwargs) → bool
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.

  • 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.

  • dissimilarity_measure – An instance of a DissimilarityCalculator.

Returns

true if agent(s) were successfully influenced