JDemoc

Simulation of a democratic environment

Java applet simulating a democratic environment. If you see this, then your browser is not able to display Java content, sorry.

This is a beta version.

You need a real Java 1.1 or greater enabled browser, or you can install the Java Plug-in. This applet works good with Netscape Navigator 4.5 or greater & Internet Explorer 4 or greater. I don't know what happens with older versions of such browsers, or with other browsers (like Opera), so let me know!

In this simple simulation there is a rectangular grid, each element of the grid represents a person. Each person can follow one "party". At each turn a person is selected at random and, as being convinced, changes his party to that of a neighbour chosen at random from the eight around him.

The display is not updated at every change, to not slow down the simulation. In this case the display is updated every 1000 turns, but this parameter is not fixed.

What is interesting in this example is how these simple rules give a really complex and unstable system. In fact the only attractor for this system is "tyranny", i.e. when all people follow one single party. I tried to write down a mathematical analysis of the problem, but I didn't get great results. I'd like to obtain a prediction of the mean time before the system degenerates to the one party attractor, as a function of the starting conditions. I'll put some notes here later.

As you can easily see looking at the HTML source of this page, this applet accepts several parameters:

JDemoc applet parameters
Parameter nameDescriptionExample value
XDimX dimension of the grid of person100
YDimY dimension of the grid of person100
DiffTypesNumber of different parties3
UpdateRateNumber of turns before updating1000
FriendlyIf true changes party to that of a neighbour, if false to the next party true

The example values above are those of the current (hopefully) running applet.

You can get it at the download page.


Simulation Back to simulation.
Danilo Poccia - Home Page You can find my home page here.