Emilio Rocca Stanislav Zamusteanu

Computer Science and Simulation for Economics

Project work on

"Political opinions."


The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.

powered by NetLogo

view/download model file: political_opinions.nlogo


The model is trying to show the dynamics of opinion formation on a specific political issue: the optimal size of the public sector in economy, in the presence of political leaders. Since this issue reflects the typical political division in a country ( right, centre, left ), we divide our turtles in 5 groups of voters.


At the beginning, every patch sprouts a turtle. We assign a random value (from 0 to 1) to the opinion of every turtle (voter), and as a consequence all turtles are divided in 5 breeds, distinguished by the colour of turtles. The voters cannot move in the world.
We can modify the initial proportion of different breeds. Left and right breeds can vary from 0 to 35% of the total papulation, so do the centre-left and centre-right breeds, while centre-voters breed remains always at 30%.
Additionally, every voter has a random value (from 0 to 1) for another variable - stability of opinion. If the value of stability is 1, the agent never changes her opinion.
Political leaders are another type of agents, shaped as a circle. They are divided in 2 opposite groups (left and right) and have the capacity to change the opinion of the voters they meet.
When the simulation starts, the voters begin to interact, changing their opinion.
Without introducing political leaders all voters adopt the average opinion and converges in the centre-voters breed. When we try to change the variables like influence or opinion-stability, the dynamics changes. Introducing political leaders makes the simulation more realistic; in this case may emerge different long-run equilibria.


We explain below the function of every object in the interface tab.
Creates the world, the population of voters and (optional) the political leaders.
It assigns too the values for stability and opinion to the voters.
Starts the simulation; the voters begin to interact and form new opinion; the political leaders begin to "convince" the voters they meet.

controls the proportion of left-voters (centre-left-voters) in the population from a minimum of 5% to 35%.
same as leftvoters slider for right-voters (centre-right-voters)
with this slider we can vary the number of left political leaders created at the beginning of the simulation (from 0 to 10).
same as the above slider, controls the number of right leaders created.
slider which can introduce an element of disturbance in the perception of other voters' opinion; if it's high and persistent enough it can overturn the long-run equilibrium.
represents the weight that we give to the opinion of neighboring turtles in the formation of new individual opinion.
with this slider we can modify the initial stability assigned to every turtle.

5 monitors displays the proportion of the total population represented by 5 groups of voters.

indicates the evolution of the public opinion in time; 5 pens represent 5 different breeds of voters (red - left-voters, blue - right-voters, black - centre-voters,
sky - centre-right-voters and pink - centre-left-voters)


Without changing the initial settings and introducing political leaders, all voters converge in the centre-voters breed after few ticks. By changing influence and proportion of extreme voters (right-voters, left-voters) we can modify the speed of this convergence, but the result is the same. If we increase the stability of opinion, the long-run proportion of centre-voters is lower than in the first case.


Try to change the initial parameters of the simulation and observe the dynamics;
Introduce the political-leaders, the dynamics becomes more unpredictable, and the long-run equilibrium is not obvious.


Introduce links among turtles give them the possibility to interact and consider the opinions not only of neighbors but the opinions of distant turtles too.
Make the interaction among turtles more articulated, to reflect the real interaction between individual, perhaps by introducing additional variables and the capacity of the turtles to learn from past experiences.


Voting model in NetLogo model library.


Blinder, Alan S., and Alan B. Krueger.2004.What does the public know about economic policy, and how does it know it? Working paper 10787. NBER. Cambridge(MA). http://www.nber.org/papers/w10787
Fatas-Villafranca, F., D.Saura and F.J. Vazquez.2004.Political opinion formation in policy issues. An evolutionary approach.Computing in economics and finance series(n.28).Society for computational economics.
Terna, P.2009. The epidemic of innovation - playing around with an agent-based model.Economics of Innovation and New Technology, 18:7, 707-728.