Skip to main content

Module consensus

Module consensus 

Source
Expand description

DeGroot and Friedkin-Johnsen consensus over the ballots on one issue.

Each agent’s opinion is a distribution over the choices on the ballots, one-hot at the start. The step is x(t+1) = Λ W x(t) + (I - Λ) x(0) with W the row-stochastic trust matrix from [consensus.trust] and Λ the diagonal of susceptibilities. Λ = I is DeGroot (doi:10.1080/01621459.1974.10480137): the group agrees exactly when the trust graph has one closed, aperiodic group every agent reaches (Berger, doi:10.1080/01621459.1981.10477662), and the limit weights each ballot by the left Perron vector of W. Below one it is Friedkin-Johnsen (doi:10.1080/0022250X.1990.9990069): the run always settles, on agents that still differ. With no rows configured W is doubly stochastic and the consensus is the tally as a fraction.

Structs§

AgentLimit
One agent’s row of the result.
Outcome
The result of running DeGroot over one issue’s ballots.

Enums§

Settling
Whether the iteration settled, and on what.
TrustSource
Where the influence matrix came from, for a reader wondering why a result looks the way it does.

Functions§

anchor_rows
Per-agent susceptibilities as {"agent": s, ...}, each in [0, 1].
of_issue
The consensus on one issue of a tracker, under that tracker’s trust rows.
of_issue_anchored
of_issue_with with per-agent susceptibilities laid over [consensus.susceptibility_of]: a persona’s own anchor, in [0, 1], where 0 never moves off its ballot and 1 is plain DeGroot.
of_issue_with
of_issue with rows laid over the configured trust, pair by pair.
of_plan
What each child of plan settled on, one row per child; nothing is folded across children.
settle
Settle ballots under cfg: DeGroot at susceptibility one, Friedkin-Johnsen below it. Empty when nobody voted; one ballot settles on itself.
tally
The plain count, for the line that shows what the weighting changed.
trust_rows
Trust rows as [[from, to, weight], ...] or [{from, to, weight}, ...].