Showing posts with label Agent Based Modelling. Show all posts
Showing posts with label Agent Based Modelling. Show all posts

Thursday, November 15, 2012

Examination of the SimZombie system and the sample scenarios

http://www2.docm.mmu.ac.uk/STAFF/M.Crossley/sims/

http://www2.docm.mmu.ac.uk/STAFF/M.Amos/Docs/simzombie.pdf

http://code.google.com/p/simzombie/

This is a straight forward 2d sandbox model world with interacting agents.  There is no physical collision between models so there is visual overlap and no deflection of paths.   There are no obvious "edge" effects around the walls of the sandbox, so make of that what you will. The walls are simply movement constraints.
The number of agents seems fixed and the state transitions are pretty obvious.  Its just a complex way to do deterministic modelling with a basic visualisation engine.  The scenarios seem to be straight forward SIR models (although one has four states just for variety. It's a short transition state so doesn't fundamentally change the model except cosmetically.)

The environment is Java, so while its all cross platform and stuff, it carries the curse of installing Java and suffering all the security side effects that come with it.  Yuck.

Zombie Scenario (Successful Defensive)

http://code.google.com/p/simzombie/downloads/detail?name=zombieretract.gif&can=2&q=

Zombie (Successful Defensive) Scenario Description

A sample zombie simulation where the susceptibles are capable of fighting back the zombies once awareness is raised.

Thoughts on the Zombie (Successful Defensive) Scenario

This scenario uses  Suceptable (S) as green, Infected (I) as red and something else as light blue.  I guess this is "dead" as a Zombie or a green can transform into a blue. We will call this the (R) state.

Movement - The I seem to move at a slower rate than the S.  The blue seem to not move at all.

Lifetime -  The green are infinite again, the blue are infinite and the red are probably infinite except for the attrition from getting killed.

Infection Rate -  Seems to be about medium.  An I can easily infect an S but at the same time the S can easily kill the I... so its probably fairly balanced simply because of the equilibirum between these two variables.
 

Zombie Scenario (Apocalyse)

http://code.google.com/p/simzombie/downloads/detail?name=zombiewin.gif&can=2&q=

Zombie Apocalyse) Scenario Description

A sample simulation where the zombies successfully eradicate all life.

Thoughts on the Zombie (Apocalyse ) Scenario

Similar to the above this uses green for the Succeptable(S), red for the Infected (I) and grey for the dead or (R) state.

Movement - The movement of the red and the green seem fairly similar.  About "medium" when compared to all the other scenarios.  One of the big issues is "Jumping" where the infection seems to spontaniously jump like a spot-fire ahead of the interface between the two groups. This causes a much faster spread as its not restricted to the infection "front".

Lifetime -The green is infinite until transformed. The Red appears to be fairly infinite and the grey is permanent.  The I seem to "kill" about 25-30% of the S that they encounter, while there does not appear to be much "killing" by the S of the I.

Infection rate - This seems pretty virulent.  The infection rate is pretty high and the speed of infection is also high.  This creates the "contageon" style apocalypse.


Vampires Scenario

http://code.google.com/p/simzombie/downloads/detail?name=vampires.gif&can=2&q=

Vampire Scenario Description

These vampires are more selective than the zombies; They only kill what they need - and turn fewer victims into vampires. This gives us a simulation in which a large proportion of the population end up deceased, rather than converted into vampires.

Thoughts on the Vampire Scenario

Watching the scenario, its hard to see many of the rules. If this is based on the SIR model again then we only have Succeptable(S), Infected(I) and Recovered(R).  What is a recovered Vampire?   In the Gif movie of the model run it looks like the infected are red, the succeptable are green and the R are grey. There seems to be an intermediate state of yellow, which I guess is a temporary transitional state between uninfected and infectious.

Movement - S are slow.  I are fast, and R are stationary.  Yellow move at the same pace as S.
They all seem to use a similar movement(mixing) algorithm of moving in a straight line for a random amount of time before randomly turning 90 degrees.

Lifetime - The I seem to have a finite lifespan. Either this is because they are modelled to die or they turn into the grey "Recovered"? The green state seems to have an infinite lifespan.  The yellow state seems to be fairly short.. maybe about 5 time steps.

Infection Rate - This seems to be quite high as the red agents really plow through the greens once they get going with an infection/kill rate of about 1red -> 15 grey. However the reds are only reproducing very slowly.


Werewolves Scenario

http://code.google.com/p/simzombie/downloads/detail?name=werewolves.gif&can=2&q=

Werewolf Scenario Description

Werewolves obviously only get the chance to strike for a short period of time each month - and in many cases, when infected, go about their normal life for the rest of the month. 
This gives us an interesting scenario in which the werewolves are able to spread, unhindered, throughout the population. When the phase of the moon is right, each werewolf has an ample collection of nearby individuals to attack - creating many 'pocket' locations from which the infection speads.
 

Thoughts on the Werewolf Scenario

In comparison, this has a slower start-up period and a higher kill rate.  Again S are Green. I are Red and the R are grey.  Again there is a transitional yellow state.

Movement - The reds move very quickly and do not change direction as frequently. Green and yellow are slow and grey are stationary.

Lifetime - The green and grey are infinite.  The reds are much more resiliant in this scenario. They seem to last almost indefinitly.  The yellow state is again quite brief.

Infection rate - This seems slower than the vampire scenario but has a very obvious tipping point.  However, there are some very long lived greens that seem to have multiple contacts with reds and remain un-infected.  So it seems that the infection rate is lower than the Vampire scenario, but is similarly effective as the agents move more quickly and have more "chances" to infect resulting in a similar infection rate over the whole population but a lower infection rate for individuals.

Final Thoughts

These scenarios seem to be fairly simple models with only a couple of variables which results in fairly simple outcome results.  It's not far from Conways game of life.  So whats the value of this system?  Hmm... nothing much comes to mind. Its a fun way to visualise simple 2 dimensional models with limited variables. That being said, I have not dug into the capacity for extension.  But then again, if I have to extend it...it's just me making it do things that it doesn't currently do, so it could be turned into anything with enough resources.  The point is that its currently just a basic system.

You can use it to model some complex systems and play around with some numerical models, but anything more complex with hidden states, environment effects, communication layers or resource models are probably way beyond what it is intended to do.


Emergent Results - Perfect for exploring the results of  deterministic models.
Emergent Behaviour - Zero.  This sucker seems to be deterministic and uses generic agent classes.


Thursday, October 4, 2012

Shelling Tipping Game Extensions

I have been playing with the Shelling Tipping Game Demo.

My first through is that there are lots of fun little permutations on this rule set...

* Add breeding. ( A happy agent can reproduce after a given period) This increases competition for the availible squares and grows neighbourhoods via numbers.

* Add renting/owning ( Moving to a new square is "renting", once happy, the agent can "buy" the square.  But an unhappy renter can be pushed out by an agent who will be happier in that square.) This allows the neighbourhoods to displace nearby "unhappy" agents and push them out)

* Add attrition ( kinda sim city-esq)  Where random squares are "vacated" no matter their happiness. (Simulate death, relocation etc)

* Add reputation - Certain squares and areas become "on the nose" and add misery to an agent who lands next to them. This simulates the perception of a bad neibourhood.  This will only work where there is low population density that allows space to "avoid" the bad neighbourhood. ( Simulate the "problem tenant" in a block of flats.  )

* Obstacles - The board already has edges which do serve the same purpose, but the rules have been constructed to be impervious to their effects in a way.  But this still causes the corner blocks to be the prefereable location to build a neigbourhood around as its harder to be displaced from the corner. 

The next idea is simply about the nature of the agents. 

The agents are nice and simple and are only motivated to make a "move" decision and the following square selection when they are distubed by their happiness threshold.

Happiness Theshold trigger > Move Decision.

This makes for an elegantly simple model but a fairly predictable outcome.  This is barely a step above conways game of life.  From my reading of the rules of the game, the Agents State triggers the move, and its then only an issue of making a move to another square.  Thats why we end up with agenst in high population densities who ossciate between two equally poor squares.

The thought that occured to me is firstly that an agent with a number of triggers is going to be more complex but is still blindly reacting.  I.e

Happiness Trigger |
Sadness Trigger    |  -> Move Decision
Hunger Trigger      |

The next stage in complexity is to have a feedback loop between and the Agents Internal State and the Decision that it makes.  This then should prevent moves to equal or worse positions.  (Which may generate gridlock in congested worlds)  but prevents the agents simply randomly fluttering. Keep in mind we are not trying to model grains of sand... we are trying to describe people in social environments.

So where you have multiple drivers, the decision made should be influenced by the state of all the drivers... This makes for a more complex simulation and explanation model.

The next extension is to use the activation/supression model to select among the drivers to see which one drives the decision making ( either that or a weight and filter model... both have similar outcomes) This level of complexity should be adequate to model a fairly large range of social processes.  (My guess is that we could cook most social processes down to under half a dozen drivers for most practical purposes)  (Must get around to testing this hypothesis at some point in all my free time....)

Wednesday, October 3, 2012

More Agent Based Modelling Links

http://www2.econ.iastate.edu/tesfatsi/abmread.htm#Readings

http://www.nd.edu/~gmadey/sim06/Resources/resources.html

http://www.openabm.org/journals

http://www2.econ.iastate.edu/tesfatsi/ace.htm