# Hegselmann-Krause bounded confidence model

All of the opinion dynamics models we have considered so far had discrete opinions. However it would be rather natural to think about opinions as being continuous. Opinions become discrete only due to the way we observe them, namely ballots in the elections and questionnaires in the polls can have only discrete options (even in case you can write in your own preference). Also discrete opinions are easier to analyze, only then one can talk about the majority or compare their popularity.

Nevertheless there are few interesting models with continuous opinions. Usually these models are based on the concept of bounded confidence. Meaning that people tend to listen to other people who have a relatively similar opinion to theirs. Here in this post we will discuss one of these bounded confidence models proposed by Hegselmann and Krause in [1].

## The model

In the Hegselmann-Krause model we consider a population \( N \) agents. In general case these agents might be put on a graph (interacting only with their immediate neighbors), but let us consider only the simplest case when the agents are on the complete graph and able to interact with all other agents. Each of these agents is initially assigned opinion \( x_i \), which is randomly chosen from the interval \( [0,1] \).

Afterwards at each time tick one random agent is selected. Also a set of agents, who have similar opinions (\( | x_i - x_j | < \epsilon \)), is created (including the agent himself) and average opinion of this set is established, \( \bar{x}^{(i)}(t) \). Then the opinion of the selected agent is updated as follows:

\begin{equation} x_i(t+1) = x_i(t) - \mu ( x_i(t) - \bar{x}^{(i)}(t)) . \end{equation}

Note that in the original Hegselmann-Krause model \( \mu = 1 \), namely the agent instantaneously adjusts his opinion to match the mean, but we allow for the adjustment to take some time. Note that the model parameters must lay in the interval \( (0,1] \) to obtain meaningful results.

Note that Hegselmann-Krause model in its specification is very similar to the Deffuant model, but involves a bit more computational requirements. Namely, picking another random agent is a lot easier than establishing the mean opinion of all agents with similar opinions (this gets even more involved if the opinions are not one dimensional). Hence not a lot is known about this model neither from analytical nor from numerical perspective. Nevertheless it seems as rather interesting approach as it involves social (one-to-group) interactions.

## HTML 5 app

Feel free to explore the dynamics of the Hegselmann-Krause model using the app below. Just note that the app might be somewhat memory hungry. This is mainly because of the top figure, which shows opinion trajectories of all agents (100 of them are used in the app). The bottom figure shows current distribution of the opinions.

**Acknowledgment.** This post was written while reviewing literature relevant to the planned activities in postdoctoral fellowship ''Physical modeling of order-book and opinion dynamics'' (09.3.3-LMT-K-712-02-0026) project. The fellowship is funded by the European Social Fund under the No 09.3.3-LMT-K-712 ''Development of Competences of Scientists, other Researchers and Students through Practical Research Activities'' measure.

## References

- R. Hegselmann, U. Krause. Opinion dynamics and bounded confidence: Models, analysis and simulation. Journal of Artificial Societies and Social Simulation 5: 2 (2002). Web link.