Opinion Spread, Explained

After reading this you will be able to predict, from a single confidence threshold, whether a population settles into one consensus, splits into two camps or freezes into many isolated cliques, and you will know how a handful of zealots can capture the whole crowd.

What this model does and one example to fix ideas

Picture 500 people, each holding an opinion as a number between 0 and 1. Zero means "strongly disagree", one means "strongly agree", and 0.5 sits on the fence. Start everyone at a random position, so opinions are spread evenly across the line. Now let people talk.

At each step, pick two agents who happen to meet. If their opinions are close enough, each moves a little toward the other. If their opinions are too far apart, nothing happens: they shrug and walk away. "Close enough" is set by one number, the confidence threshold \varepsilon.

The surprise is how sharply the outcome depends on \varepsilon. Set \varepsilon = 0.4 and the whole crowd converges to a single opinion near 0.5 within a few hundred steps. Drop it to \varepsilon = 0.15 and the same crowd freezes into three stable clusters that never merge, because agents in one cluster can no longer hear agents in the next. Nothing changed except one dial.

When this model is useful and when it is not

Use this model when you want to reason about influence between similar people: the way a room of moderates can pull toward the center, or the way two distant groups stop listening and drift apart. It captures one mechanism cleanly, so you can see cause and effect without noise.

Do not read it as a forecast of any real election, market or argument. Real opinions are multidimensional, people lie about their views, media inject correlated signals, and the "network" of who talks to whom changes daily. This model has none of that. It is a thinking tool: it shows that closed-mindedness alone, with no bad actors and no propaganda, is enough to fracture a population. That is a claim about a mechanism, not a measurement of the world.

If you want to compare mechanisms, other simulations on this site isolate different ones. Schelling's Segregation Model shows how a mild preference for similar neighbours sorts a city, and SIR Epidemic Simulator shows how a single contact rate decides whether an outbreak grows or dies.

The bounded-confidence rule and its math

This is the Deffuant, Weisbuch model from 2000. Let x_i be the opinion of agent i. When agents i and j meet, first check the gap. If it is at least \varepsilon, do nothing. If it is smaller, update both toward each other:

x_i' = x_i + \mu\,(x_j - x_i) \quad \text{if } |x_i - x_j| \lt \varepsilon

Here x_i' is the new opinion, \mu is the convergence rate (how far each agent moves per meeting, usually between 0 and 0.5), and \varepsilon is the confidence threshold. The other agent updates symmetrically with x_j' = x_j + \mu\,(x_i - x_j). When \mu = 0.5 both agents jump exactly to their midpoint in one step.

The mean of an interacting pair is conserved: x_i' + x_j' = x_i + x_j for any \mu. That is why symmetric starting distributions tend to converge symmetrically. What \varepsilon controls is not where clusters land but how many can survive. A rough count is 1/(2\varepsilon) clusters. At \varepsilon = 0.5 that gives 1 (consensus); at \varepsilon = 0.15 it gives about 3.3, which rounds down to 3 in practice.

A slider sets the confidence threshold epsilon from 0.05 to 0.5. As you raise it, the predicted number of surviving opinion clusters 1/(2*epsilon) falls: 0.05 gives 10 clusters, 0.15 gives about 3, 0.25 gives 2, and 0.5 gives a single consensus.

A worked example reproducing the demo

The demo button uses the field defaults: 500 agents, uniform random start on [0, 1], \varepsilon = 0.2, \mu = 0.5 and no zealots. Follow one pair by hand to see the arithmetic, then trust the count for the whole crowd.

Two meetings, step by step

  1. Agent A starts at 0.62, agent B at 0.71. Gap is 0.09, which is below \varepsilon = 0.2, so they interact.
  2. With \mu = 0.5 both jump to the midpoint: (0.62 + 0.71) / 2 = 0.665. Now A and B both sit at 0.665.
  3. Next, agent A at 0.665 meets agent C at 0.18. Gap is 0.485, which exceeds 0.2. They ignore each other. A stays at 0.665.
  4. Agent A meets agent D at 0.52. Gap 0.145 is below 0.2, so both move to 0.5925.

Repeat this millions of times across 500 agents. With \varepsilon = 0.2 the estimate 1/(2\varepsilon) = 2.5 predicts two or three clusters. In practice this setting lands on two dominant peaks, roughly at 0.25 and 0.75, with the fence-sitters near 0.5 pulled one way or the other as the gaps close.

The initially flat distribution collapses into two spikes near 0.25 and 0.75. Every agent ends inside one of the two peaks; the bins between them empty out.

How the number of clusters depends on the threshold

The single most useful fact from this model is the cluster count. Run the same crowd at a range of thresholds and the outcome steps down cleanly as \varepsilon grows.

Predicted versus typical observed cluster counts for a uniform start
Threshold \varepsilonEstimate 1/(2ε)Typical clustersOutcome
0.0510.09 to 10Fragmentation
0.105.04 to 5Many factions
0.153.333Polarised trio
0.202.52Two camps
0.301.671 to 2Near consensus
0.501.01Full consensus
The curve 1/(2ε) falls steeply for small thresholds and flattens toward one. Real runs track this envelope but land on whole numbers below it.

Adding stubbornness and zealots

Two extra ingredients harden the picture. Stubbornness shrinks an agent's \mu, so it moves less per meeting. That slows convergence and lets narrow clusters survive longer. Zealots are agents whose opinion is fixed: their \mu = 0, so they influence others but never move themselves.

Zealots have leverage out of all proportion to their number. Seed 500 agents, place 10 zealots (2 percent) all at opinion 0.9, and set \varepsilon = 0.3 so most moderates stay within reach of them. Because every meeting with a zealot pulls a moderate up while the zealot stays put, the mean drifts steadily toward 0.9. A committed 2 percent can capture a network that started centered on 0.5. This is the toy-model version of the committed-minority tipping point studied in real opinion dynamics.

A single zealot cluster wins only if the threshold is wide enough for moderates to keep hearing it. Put zealots at 0.9 with \varepsilon = 0.1 and moderates near 0.5 never come within range, so the zealots capture nobody and simply stand alone. Leverage needs a listening channel.

Reading the results without fooling yourself

Watch three things. First, the number of peaks in the histogram: that is the cluster count, and it should sit at or just below 1/(2\varepsilon). Second, the peak positions: with a symmetric start and no zealots they land symmetrically about 0.5, so 0.25 and 0.75 for two clusters. Third, the time to freeze: once every remaining pair is separated by more than \varepsilon, nothing moves again, and the state is final.

A common trap is calling a run "still converging" when it has actually frozen. Check the gaps. If the smallest gap between distinct clusters exceeds \varepsilon, the simulation is done no matter how long you wait. At \varepsilon = 0.2 two clusters at 0.25 and 0.75 are 0.5 apart, far above the threshold, so they are locked forever.

Common mistakes

The most frequent errors come from confusing the two dials and from over-reading the output.

Confusing \varepsilon with \mu
The threshold \varepsilon decides how many clusters survive. The rate \mu only decides how fast they form. Lowering \mu to 0.1 does not create more clusters; it just makes the same clusters take about five times as many steps to settle.
Treating peak positions as predictions
The peaks land near 0.25 and 0.75 because the start was uniform and symmetric. Skew the start and the peaks shift. The model tells you the number of camps far more reliably than their exact location.
Ignoring finite-size noise
With only 50 agents, a run at \varepsilon = 0.2 might collapse to a single cluster by luck. With 500 agents the two-cluster outcome is stable. Small populations are noisy; run a few times before trusting a count.

Related simulations on this site

Bounded confidence is one of a family of agent models where simple local rules produce sharp collective outcomes. Predator-Prey Simulator shows cycles instead of convergence, driven by two coupled equations. Traffic Jam Simulator and City Traffic Grid show jams emerging from local car rules. Forest Fire Model and Sugarscape show self-organised criticality and emergent inequality from equally plain rules.

Frequently asked questions

Why does a small confidence threshold cause polarisation?

Because agents only listen to opinions within \varepsilon of their own. As a cluster tightens, its members drift out of range of the next cluster and lose the channel to influence it. At \varepsilon = 0.15 you get about 1/(2\varepsilon) = 3.3 clusters, and once they are more than 0.15 apart they are frozen apart forever.

What is the difference between epsilon and mu?

The threshold \varepsilon sets who talks to whom, and therefore how many final clusters exist. The rate \mu sets how big each nudge is, and therefore only the speed of convergence. Change \varepsilon to change the outcome; change \mu to change the pace.

How can 2 percent of agents capture the whole network?

Zealots never move, so every interaction with one is a one-way pull. Moderates give ground and zealots do not, so the population mean ratchets toward the zealot position as long as moderates stay within \varepsilon of them. With \varepsilon = 0.3, 10 zealots at 0.9 can drag 490 moderates up from 0.5.

Does this model predict real elections?

No. It isolates one mechanism, influence between similar people, and strips out media, deception, multiple issues and changing networks. Use it to understand how closed-mindedness alone can fracture a group, not to forecast any actual vote.

When does the simulation stop changing?

When every pair of distinct clusters is separated by more than \varepsilon. At that point no interaction passes the confidence test, so no opinion can move. The state is permanent, and waiting longer changes nothing.