Friday, June 13, 2008

(Abstract) An Agent-based Simulation of Riot Behavior

A riot, in its most basic form, is an unorganized crowd where widespread aggression occurs. The facts that not every crowd leads to a riot, and that not every act of aggression constitutes a riot, make it clear that there have to be certain factors present that are either necessary for, or at least strongly encourage rioting behavior. The goals of this project are to validate candidates for these factors and to develop a computer model that captures the “turnover-point” where a crowd becomes a riot. In a meta-analysis of studies on rioting, Postmes and Spears [1] argue that, contrary to a more intuitive understanding of the psychology of the riot phenomenon, deindiviudation plays a much smaller role than previously thought: Psychology-oriented accounts do in fact stress the role of individual agents within the pre-riot crowd. Of special interest for this project are, for example, those individuals Haddock and Polsby [2] call the entrepreneurs; in a sense the nuclei of aggression, around which larger patterns of violent behavior begin to grow. Further archetypes identified within a rioting crowd are hangers-on, as well as more passive bystanders.

The simulation itself is realized in NetLogo, a multi-agent based simulation suite particularly suited for the modeling of social phenomena and other distributed processes. A generic crowd situation with two opposed groups of individual agents is realized in a simple simulated environment. The up to 400 agents are able to scan their surroundings, and to change their behavior depending on both the given situation and certain individual traits. The program incorporates elements of an approach-avoidance model by Jager et al. [3], and of a cognitive system developed by Wijermans et al. [4]. The assumption is made that agents within a crowd are influenced by factors on three different levels: the environment; the groups present in the situation; and the individuals. More specifically, factors like crowd density, noise levels and temperature on the environmental level, and in/out-group, friendship, and leadership relationships on the group level are considered. On the intra-individual level of agents, physiological factors like energy, and functional factors such as saliency, motivation, and insecurity influence and modify behavior selection.

The results indicate that the simulation is capable to reproduce some important characteristic roles agents might play within a riot, such as the aforementioned entrepreneurs, hangers-on, and bystanders. These roles and their associated behavioral patterns are observable within the graphical simulation of the crowd, and can be linked to properties based on the assumed factors described above. It is hoped that further work on this first model can provide helpful insights and concepts for the understanding of the mechanisms and dynamics that underlie riot behavior.

References:

[1] Postmes, R.; Spears, R. (1998) Deindividuation and Antinormative Behavior: A Meta-Analysis. Psychological Bulletin, No. 123, pp. 238–259
[2] Haddock, D.D.; Polsby, D.D. (1994) Understanding Riots. Cato Journal, Vol. 14, No. 1, pp. 147-157.
[3] Jager, W.; Popping, R.; van de Sande, H. (2001) Clustering and Fighting in Two-party crowds. Journal of Artificial Societies and Social Simulation Vol. 4, No. 3.
[4] Wijermans, N.; Jorna, R.; Jager, W.; van Vliet, T. (2007) Modelling Crowd dynamics, influence factors related to the probability of a riot. In: F. Ablard (Ed.). Proceedings of the Fourth European Social Simulation Association Conference. ESSA: Toulouse, pp. 531-541.

Monday, June 9, 2008

Addendum to "Structure of the Model"


Most of the thresholds are indeed taken directly from the model of Jager and colleagues (which is illustrated in the original sketch above). The only change here was that I reduced the "Aggression motivation" (which is "security" in my terms, since it relates only to the ratios of block members in the vicinity) necessary to engage in a fight from 25 (out of 30) to 20 (out of 30), because I already included the additional "hurdle" of needing a fairly high aggression level (again, my term; also set to 20) for that.

The general idea behind that:

Jager, Popping, and van de Sande were mainly interested in the clustering aspect of rioting (which is handled by these thresholds, and which is pretty much preserved here); but what I did here was to further differentiate the conditions that have to be met for the actual "switch" from non-violent to violent behavior. For that, I "split" their single 0-30 "aggression motivation" variable into two, namely a more context-based one, "security", and one that is more affected by the "traits" of individual agents, "aggression level". In Jager's model, the agents lack any such individual traits, and they are instead arbitrarily grouped into three "types" with varying scanning frequencies (scan once every 10, 20, and 80 ticks) as the sole distinctive feature, whereas my agents all operate on the same scanning frequency (10 as it is). Now I hope to still find the same basic categories of agents (hardcore, hanger-on, bystanders) by merely looking at the "insecurity", "leadership" (or status/power, as we discussed), and "aggression tendency" values.

Session 6-08

Making a lot of test runs today, tweaking the code here and there, and including additional plots to generate data. I first tried a very general, by just looking at the means of trait variables of currently violent agents. Found a way to quickly import the stuff into excel, and threw together some graphs that turned out rather nice. I also generated some data on the attacking/defending issue, but looking into them will have to wait until tomorrow evening.

I'm thinking about a second approach to analysis, which includes testing the first agents to become violent against their success of "recruiting" hanger-on, and comparing this against their leadership values. Shouldn't be too hard, but I'll have to come up with a quick'n'dirty function to handle this dynamically nevertheless. Tomorrow. Signing off for today.

PS I still didn't get around to "properify" the bibliography section, which is a shame. If you read this sentence the next time, take a couple of minutes to get this done, will ya?

Saturday, June 7, 2008

Session 6-07

Worked mostly on the documentation on small fixes... I also started looking into ways to generate data for analysis out of test runs. I experimented with possibilities to write outcomes directly to a file, but also found the pretty nifty feature of NetLogo to export things to *.csv directly via GUI. We'll see what works best.

Friday, June 6, 2008

Structure of the Model


I threw together a little graph explaining my model (based on the Jager diagram, which is roughly contained in the left hand side of the graph shown above).

Session 6-06

Added value drop after energy is depleted (in accordance to Jager model)

Okay, so today will be the big day where the brain is inserted into the creature. So far, I have recreated most of Jager's model (at least as I understood it, based on the descriptions in the paper), which covers clustering, approach and withdrawal, but a (I think) very crude threshold-based control on whether violent behavior occurs or not. I will now expand this model by introducing concepts from Wijermans' work.
Beginning... it is done! It lives! The creature lives!

Next up: searchings for bugs, checking the logical structure, tweaking, "nicefy" things.

Thursday, June 5, 2008

Supplement

Well, looks like I found that little resource hog that caused all the lag. Runs considerable smooth now, even without the endless ifelse blocks.

Also added separate sliders for REDs and BLUs population sizes - asymmetric runs look amazing so far - the minority clusters really early in the run, and the majority "rushes" these clusters later on. Overall (without looking at the statistics) aggression seems to occur more plentiful, and more widespread - this would confirm the results from the papers.

Session 6-05

Scraped "flee" behavior altogether, as this is now implicitly handled by the
combination of both "spectate" and "seek-friendlies" mechanics ... DONE

Big one: get all the ifelse double blocks out of the program code -- hm, now that's courious. By simply removing these blocks (while functioning as expected) I'm seeing a HUGE performance drop here. Don't really know what causes this, but I guess I revert the changes for the time being, and stick to the proven method... UNDONE!

... okay, I just came back to this issue - I'm not quite sure what is responsible for this performance drop, but as long as it is still bearable, I'm going to stick to the new version after all. Part of the reason for this decision is that I have adapted a means to separate perception and action, by having the agents "scan" their environment only once every 10 ticks, in accordance to the Jager model (note that I still scan a lot more often than Jager did, for the reasons mentioned in an earlier post). Not only does this make sense in the 1-tick-one-second context, but it also brings the lag down to a bearable level. (This should also add some persistence to the behavior of individual agents, which is a nice thing to have).

The big theoretical thing to do today is to collapse my "aggression-level" and "arousal-level" into only one variable (which will keep the name "aggression-level") - I could explain the reasoning behind that with a quick picture, but the general idea is that the motivation towards violent behavior (which I previously handled as HIGH aggression AND HIGH arousal) is really just a combination of these two concepts. All in all, it seems favourable to have as few internal variables as possible.

Been reworking the violence-mechanic. In accordance to the Jager model, violence is now bi-directional. I also coupled it to the energy level of the agent - an agent will fight for 100 ticks, no more, no less, an then disengage. I also introduced booleans for "attacking" and "defending", to distinguish both types of violence. While violent? is true, the agent simply remains immobile.

Add violence-check to behavior node.... DONE

Handle color control in one of the top-level functions (instead of doing this distributed throughout the code)... DONE

Made a test run over 500 ticks - obviously there's some bug in the disengagement handling. Investigating ... D'OH! Found it. Fix'd it.

Made another test run over 800 ticks - beautiful! Agents are clustering slowly, took a lot of time (300-400 ticks) until the first incidents, then violence spread throughout the clusters and kept relatively stable, even given the new energy-level dependency of fighters. The ratio of violent behavior in the whole population leveled out at about 30 %, distributed over three sizable (2 bigger, 1 smaller) clusters.

The next big thing: implementing the "seek-friends" behavior (as a preferable alternative/sub-case to "seek-friendlies"). This should also improve clustering... DONE

Wednesday, June 4, 2008

Supplement

Finally found a way to get rid of these "ifelse" double-command-blocks to handle both reds and blus in one function. This will help to cut down the length of my code somewhat...

Session 6-04

I think I've gathered enough new input here to take up again the programming part.

In this session, what I mainly want to do is to revise some of my own stuff to closer resemble the Jager model, as outlined in the paper. In the end, I expect to see some nice agression-level handling, and clustering of agents.

Raw stream:

Re-adapting global and agent-level variables... SORT OF DONE!
Working on bilateral "friendship"-relation that links agents together... DONE!
No, wait, 'tis still buggy ... FIXED! (Damn, I'm good!)
Going back to agent variables... DONE SOMETHING!

Alright, that should take care of the new setup-functions. Next, I want to implement that one-turtle-per-patch policy (instead of having them all over the place, which currently results in massive, constantly collapsing turtle singularities instead of proper clusters).

Okay, looks like they stay off each other's patches now. I just got my first real cluster of turtles.

Add a own perception function, where values are stored for each agent - doing this once at the start of a "tick" probably helps performance a lot (up to now I had been making "in-range"-checks throughout the functions)... DONE!

Work on behavior node... other stuff... A LOT DONE.

What I have now is (minus all the bugs that are certainly left in there) the bare Jager model, minus type-differentiation via perception-frequency (which I want to avoid/replace ultimately), and the timed "fighting action" (which shouldn't be too hard to squeeze in there next time).

Numbers...

Okay, here's a little something I encountered yesterday. Via the Jager paper I found some pretty useful info on someone called OMJ Adang, also from The Netherlands, who seems to have done quite some work on rioting and related topics. They also quote from one of his works some pretty interesting numbers, that are really helpful for my cause as well. According to his studies, riot-prone crowds (as in "around sports event", which is pretty much what I am going at) are typically composed in such a way:
  • Most (90%) of the participants are pretty passive ("Bystanders")
  • Some (10%) will readily join the violence once it is initiated ("Hanger-On")
  • Of these, few (10%) will be ready to start a fight ("Hard-Core")
Now the problem is, I have these numbers from the Jager paper, and the original source seems to be available in Dutch only (which, I should add, I cannot read). Now this might cause some trouble when it comes to citations, but since I am currently working on the Jager model anyways, I still going to use these numbers for now.

Monday, June 2, 2008

Session 6-02

Okay, this is kind of a big deal right here. I found another simulation work (by Jager, Popping, and van de Sande, all from the University of Groningen) that is almost the same thing like what I am doing, with a slightly different approach in some of the details (e.g. they assign explicit roles to individual agents with regard to the "activeness" or "passiveness" of their riot participation, whereas I want to have these roles emerge from randomized individual settings). The second big difference is that these roles do not "modify" the change of values of internal variables directly (as I am doing it), but rather only modify the scanning frequency with which perceptions are made (high = active, low = passive).

As of now, this is "the" paper I'm mainly working with (print out an all ;-)

Friday, May 30, 2008

Session 5-30

After the last session, I feel like I should shift my focus a bit back to the theoretical side of the endeavor. I will spend some time going through the entries available through the WSC07 archive and see if I can find some relevant stuff.

Note (while I'm back to literature research): DOI numbers - so far I didn't find them for ANY of my source papers. Either I'm being stupid here, or the system isn't nearly as universal as Paolo made it sound. Anyways, getting the formalities right has a relaitevly low priority right now. I'll see what I can get done on the run, and leave the rest for later.

Thursday, May 29, 2008

Minutes 5-29

Meeting in Paolo’s office, today at 14:30. List of major topics and findings follows:

  • We discussed the model overview and its 4 stages/levels: the environment, the modifiers („Personality Traits“, „Internal Variables“), the Variables („influenced by perception“), and the behavior.
  • I could not provide convincing arguments as to the nature of the individual variables being [0,1] intervals, other than it representing a first working assumption. This should be clarified in future versions.
  • The role of the modifiers (obviously my term; I’ll just stick to it until I can decide on something more fitting) was discussed, especially regarding their natures definitions as compared to other terms and constructs commonly used to describe personalities (e.g. those of „the Big five“). It might be worthwhile to get a better overview here, but all in all I got the impression that I was on the right track here, especially after discussing the conceptual closeness of my „insecurity“ and „leadership“ terms with the notions „status“ and „power“. Still, from the theoretical background point of view it would be nice to be able to provide some alternatives here.
  • Another important topic was my (intuitive? At least somewhat unreflected) inclusion of a decay mechanic within the handling of an agent’s arousal level. Paolo was right here in assuming that I merely included it in the first place because, well, I felt that merely increasing an important variable like that over time would not represent a very natural process. I will have to see if I can somehow back up either approach with some literature, but I must confess that I am now intrigued to go with an unrestrained arousal level first; I quite liked the idea of “Gefangensein in einem Zustand”. Otherwise, a more concrete theory of how disengagement actually works could be helpful. Tony Higgins was named as a possible source.
  • Also mentioned was the problem of consistency (and therefore the possible occurance of dithering), which is not currently explicitly addressed in the model (that is, agents show little consistency in their states other than that introduced by the fact of small step changes). I’ve taken the hint that I should probably think about the implementation of some more explicit and endogenous mechanism to handle this, like some kind of “momentum” of change. Right now, however, I feel like this has a relatively low priority, since said mechanism could probably be built on the current handling, which (while maybe not being perfect with regard to artifacts) still provides some basic functionality.
  • Also discussed were more technical aspects of the programming environment, such as the possibility to include external functions (Java,…), and the importance of wrappers to analyze over multiple runs (something that I will definitely look into once the analysis moves into main focus).
  • Finally, the last (but certainly not least) major topic was literature, where I agreed to do further background research (“persons/institutions/journals”) on the existing bibliography. In addition, Paolo showed me two new (and apparently promising) sources for papers, namely the ACM/WSC ’07 (several landmark papers and tutorials) and BRIMS/SISO ’07 (emphasis on list of recommended readings).

Wednesday, May 28, 2008

Session 5-28

Going to work on a number of smaller things today. Main goal is to rework the existing modifiers, and finally introduce the one that handles the aggression level.
Raw Stream:

Session 5-28 Opened (Programming)

Review existing code & notes ("getting back into the mindset")... DONE
Implementing the "perception range slider" (so far, I was using "in-range" to crudely simulate the limited perception/action radius of individual agents, with values picked more or less randomly. A centralized way to control this could be helpful, though.) ... playing around with parameters a bit, seems to work nicely... DONE
Add an additional color to indicate violent behavior in different blocks... DONE
Implement a behavior function SKELETON for support...
SUB Think about mechanics of support behavior (scribble break)
... DONE
Implement a behavior function SKELETON for "spectating" (default)... DONE
Rework modify-safety function ...
SUB introduce ratio into calc... POSTPONED (need a better way to handle ratios first; I'll think about this later)
SUB take acts of hostile violence into account (they shout decrease an agent's safety level somewhat, or even more if the hostiles have an advantage in numbers) ... DONE
SUB make safety a value between 0 and 1 ... DONE

-SALAD BREAK- ... BACK

Test new modify-safety function... seems OKAY.

Add to the arousal-modifier: density-dependant increase... DONE. For now I ended up using this: 4 agents per patch are "normal" (no modification), everything above increases the 0-1 arousal value by (n-4)/10.

Implement aggression-level modifier/handling ... LEFT FOR TOMORROW.


Session closed.

It became pretty late; seems like I'll have to leave the agression-level handling for tomorrow. Other than that, things seemed to come along nicely.

Bibliography

Work in progress...

Postmes, R.; Spears, R. (1998) Deindividuation and Antinormative Behavior: A Meta-Analysis. Psychological Bulletin.
http://psy.ex.ac.uk/~tpostmes/PDF/postmesspearsPcychBull98.pdf

Haddock, D.D.; Polsby, D.D. (1994) Understanding Riots. Cato Journal. Volume 14, Number 1.
http://www.cato.org/pubs/journal/cj14n1-13.html

Russel, G. (1998) The Anatomy of a Riot. Psychology Today, Nov/Dec 98.
http://psychologytoday.com/articles/pto-19981101-000017.html

Reicher, S. (2001) The Psychology of Crowd Dynamics. Blackwell.
http://www.uni-kiel.de/psychologie/ispp/doc_upload/Reicher_crowd%20dynamics.pdf

Wijermans, N.; Jorna, R.; Jager, W.; van Vliet, T. (2007) Modelling Crowd Dynamics: Influence factors related to the probability of a riot http://www.rug.nl/staff/w.jager/Wijermans_ESSA_2007.pdf

Jager, Popping, van de Sande: Clustering and Fighting in Two-party crowds (2001)
Journal of Artificial Societies and Social Simulation, 2001
http://jasss.soc.surrey.ac.uk/4/3/7.html

Hello, World!

Moved the Journal to this platform. The plan is to keep an up-to-date bibliography here, as well as the regular "done-this-and-that"-style and/or reflective journal entries. I'm still looking for a convenient way to keep an updated version of the program code accessible from this site, but we'll see about that.