Setting up a population#

Simulations in which agents update their belief systems need to be initialised with a list of positions. This is optional: a debate can progress without any agents present.

When simulations are initialised with a population, the agents from this population update their belief systems in response to argument introductions and sentence pool expansions. The simulation objects have a Simulation.positions attribute, which is a list of populations in which the \(i\)th element stores the population at the \(i\)th simulation step. The initialised population is stored in the first element, Simulation.positions[0].

Populations are lists of positions#

The initial population needs to be generated as a list of taupy.Position objects:

>>> my_population = [Position() for _ in range(10)]

The agents’ behaviour in argument introductions can be controlled using the introduction_strategy attribute.

>>> my_population = [Position(debate=None, introduction_strategy=strategies.fortify for _ in range(10)]

A population can consist of agents with different argumentation strategies (see the taupy.simulation.strategies module for pre-defined strategies. Custom argumentation strategies are also accepted):

>>> fortify_positions = [Position(debate=None, introduction_strategy=strategies.fortify for _ in range(5)]
>>> convert_positions = [Position(debate=None, introduction_strategy=strategies.convert for _ in range(5)]
>>> my_population = fortify_positions + convert_positions

When you initialise positions like this, they will be assigned random thruth-value attributions during the simulation initialisation.

It is also possible to generate a population with specific beliefs. The population below is set-up as bi-polarised:

pos_template_1 = {
        symbols("p0"): True, symbols("p1"): True, symbols("p2"): True,
        symbols("p3"): True, symbols("p4"): True, symbols("p5"): True
}

pos_template_2 = {
        symbols("p0"): False, symbols("p1"): False, symbols("p2"): False,
        symbols("p3"): False, symbols("p4"): False, symbols("p5"): False
}

pop_part_1 = [Position(None, pos_template_1, introduction_strategy=strategies.convert) for _ in range(10)]
pop_part_2 = [Position(None, pos_template_2, introduction_strategy=strategies.undercut) for _ in range(10)]

my_polarised_pop = pop_part_1 + pop_part_2

Argumentation strategies#

The following argumentation strategies are pre-defined in taupy. They all introduce arguments that are valid given the current debate stage.

random

A completely random strategy that works even if a simulation has no positions at all.

fortify

Insert a valid argument the premises and conclusion of which are accepted by the source position.

attack

A valid argument. The premises are accepted by the source position, and the source at least tolerates the conclusion. However, the target denies the conclusion, given its current truth-value attribution.

convert

A valid argument with premises picked from the target. The conclusion is picked from the source, and the source also accepts the conclusion. It is not checked whether the target accepts the conclusion.

undercut

A valid argument is constructed with premises that the target accepts. The source at least tolerates the conclusion. The conclusion however is not accepted by the target.

unrestricted_undercut

Like undercut, but does not require the source agent to tolerate the conclusion.