Hello Folks!
I am posting this from far away, although I wrote it some time ago. Hope you enjoy my post.
A model that is fascinating me so much is the Naming-Game model (NG). This model is a very interesting way to describe and simulate social behaviour in a general but effective fashion.
Advertisement, political campaigns, television and media influence, marketing are only a short list of application that can be represented by such a model.
The area of research from which this model comes frome is known as opinion dynamics.
According to this model, people speak to each other in a simplified way: a speaker randomly selects a hearer from a list of friends and speaks a randomly selected word from a list of topics. It is that easy.
Two basic rules are then applied to the model:
1) if the hearer doesn’t have the spoken word in his/her dictionary he/she adds it
2) if the hearer has the word, she deletes all the other words in her dictionary but the received one
The evolution of such a system is not easy to predict because it depends on several factors such as how the words are selected, how speakers and hearers interact with each other and the topology of the network.
A paper that inspired me a lot is “Social consensus through the influence of committed minorities“. In this paper the regular NG model is enriched by the presence of committed agents, people who are immune to influence and will only try to turn the entire “society” to consensus.
The study is very interesting because authors found that if the percentage of committed agents is below a critical threshold, the system reaches consensus in time t ~ ln N (where N is the number of nodes). If the percentage of committed agents is higher than the critical threshold the system can reach consensus much faster in t ~ exp(a(p)N).
I found this amazing! This kind of models are normally described in analytical form with two relatively simple differential equations that describe how densities of people evolve in time. Analytical analysis can answer to a lot of questions about the dynamical system.
But in order to see agents interacting with each other I decided to write a simulator that plots the evolution of the system in several frames and creates a movie of the entire simulation (until consensus is reached). I consider this piece of software my new toy that might be useful to answer to some questions that the analytical analysis cannot answer.
For instance, how would you take into account topology? Clearly there are topologies that are most favourable and lead to consensus faster than others (provided the same amount of words and agents)
At the moment it is quite simple since I am ignoring the fact that people can be difficult to convince (this means that rule 2 should be apply with a certain probability).
But I am working on it in my spare time, making it more and more complex, complete and more realistic.
Simulator description
With this simulator I can specify the amount of nodes (regular and committed agents), the amount of random words in dictionaries, the topology of the network (a connection matrix that can be random, fully connected graph, small-world network, or user defined) and the number of seconds and fps of the final video.
Once launched agents will start interacting with each other as they were sharing opinions. Immune nodes will never be influenced by others’ opinions and will only try to convince their neighbors about the topics in their dictionary.
I found the scatter plot a good way to visualize this system. Each circle represents a node.
Colors are used to visualize nodes that are interacting (orange), immune nodes (red), regular nodes (blue). The different size represents the amount of words in node’s dictionary at current time.
Triangle nodes are committed agents. Nodes become red when they have been “persuaded” by committed agents.
At the end of the simulation, if consensus is reached, all nodes are smaller and red. That is they have small dictionaries filled with words that come from immune agents’ dictionaries.
As in the paper above by changing the amount of immune nodes and keeping the same amount of words, agents and topology, consensus is reached in a time that can be logaritmic or exponential. The critical threshold is confirmed by my simulations between 8% and 9%.
Results
For each simulation I also collect information about how main interactions are needed to reach consensus, how the number of words evolves in time and what is the success rate (how many times rule 1 is applied) and failure rate (how many times rule 2 is applied). Finally these values are plot in a graph.
This is the simulation of 200 Agents, 4 of which are immune.
Below are the plots of number-of-words / number-of-iterations for three simulations with 4%, 9% and 16% immune agents respectively.



Here is the simulation of 10000 Agents, 200 of which are immune.
If you are interested in the source code or if you want to improve it or just give me some hints, I would be glad to receive an email at worldofpiggy@gmail.com
(oo)