Some Experiments on the Dynamics of Continuous Opinions

The Original Hegselmann-Krause Model

The following is an implementation of the model for the dynamics of continuous opinions in Hegselmann, Rainer & Krause, Ulrich: 2002, ‘Opinion dynamics and bounded confidence: models, analysis and simulation’, Journal of Artificial Societies and Social Simulation 5(3).

The simulation lasts for R rounds and in each round there are n peers each holding an opinion between 0 and 1. The views of all peers within ϵ affects the view of a peer.

Parameters:

Initial distribution

You need a browser with support for the canvas tag in HTML5, such as Firefox 1.5+, Chrome, Safari 2.0+, or Opera 9.0+.

The vertical dimension represents views from 0 at the bottom to 1 at the top. The horizontal dimension represents time, with the first round at the far left and the last at the far right. The views of individual peers are represented by black lines.

The Extended Model

The following is an implementation of the extended model for the dynamics of continuous opinions in Gustafsson, Johan E. & Peterson, Martin: ‘A Computer Simulation of the Argument from Disagreement’, Synthese 184 (3): 387–405, 2012.

The simulation lasts for R rounds and in each round there are n peers each holding an opinion between 0 and 1. The views of all peers within ϵ affects the view of a peer. Each peer has a certain lifespan that may be as low as peerMinAge and as high as peerMaxAge. When a peer has reached the end of its lifespan it is replaced by a peer with a randomized view within mutRnge of the view of its predecessor. There are authNr authorities that may last from authMinDur to authMaxDur rounds. An authority affects the views of all peers with a view within authRnge of the authority. Furthermore, there are shftNr shifts that in a single round changes the views of all peers holding a view within shftRnge from a certain view. The shift either increases or decreases the views of the affected peers by shftPull. The truth affects all peers with a certain strength in all rounds. The relative strength of the influence from a peer’s earlier view, other peers, authorities, and the truth are consInfl, peerInfl, authInfl, TInfl.

Parameters:

Fact
Initial distribution

You need a browser with support for the canvas tag in HTML5, such as Firefox 1.5+, Chrome, Safari 2.0+, or Opera 9.0+.

The vertical dimension represents views from 0 at the bottom to 1 at the top. The horizontal dimension represents time, with the first round at the far left and the last at the far right. The views of individual peers are represented by black lines, authorities by red lines, downward shifts by green lines, upward shifts by blue lines, and the fact by a yellow line.