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

Thursday, January 23, 2014

Creative Cities

Over the last year I have been working with Ammar Malik and Hilton Root on a small project which explores the relationship between human creativity and urban development via an agent-based model. We have recently just completed a working paper for this project entitled: "Can Pakistan have creative cities? An agent based modeling approach with preliminary application to Karachi" which was published by the International Food Policy Research Institute (IFPRI). For interested readers, below is the abstract to the paper:
Scholars and urban planners have suggested that the key characteristic of leading world cities is that they attract the best and brightest minds. As home to the creative classes, which consist of professionals working in knowledge-based industries, they are the bedrocks of prosperity and drivers of innovation. They not only provide unrivaled educational and professional opportunities, but also the best entertainment facilities such as art galleries, theaters and restaurants. Both through hard and soft infrastructure, residents of these cities enjoy seamless connectivity which fosters human creativity. When combined with population density, socio-economic diversity and societal tolerance, the elevated interaction intensity diffuses creativity and boosts economic productivity. However, rapidly urbanizing cities in the developing world are struggling to maintain adequate service delivery standards. The form and function of many cities are increasingly marred by congestion, sprawl and socioeconomic segregation, preventing them from experiencing expected productivity gains associated with urbanization. We operationalize these insights by creating a stylized agent-based model of a theoretical city, inspired by social complexity theory and the new urban literature. A virtual environment is designed where heterogeneous and independent decision-making agents interact under various policy scenarios, such as greater urban transportation investments and altered land-use regulations. By creating typical urban conditions, we conclude that the combination of mixed land-use, improved access to urban mobility and high societal tolerance levels foster creativity led urban economic growth.
For more details see:
Malik, A.A., Crooks, A.T. and Root, H.L. (2013), Can Pakistan have Creative Cities? An Agent Based Modeling Approach with Preliminary Application to Karachi. Pakistan Strategy Support Program Working Paper 13, International Food Policy Research Institute (IFPRI), Washington, DC. (pdf)

 

Tuesday, August 27, 2013

Modeling the outbreak, spread, and containment of tuberculosis

It seems my interest into disease models is growing. While the development of the cholera model is still underway, over the summer I have had been working with a very talented high school student looking at the outbreak, spread and containment of tuberculosis (TB). Why might you ask? TB is a global problem with 1.8 billion people having a TB Infection, 8.8 million people infected with the TB disease, and around 1.5 million annual deaths. It is the second most common form of death from an infectious disease with the majority of cases in developing countries.


So we have been developing a model that explores how TB might manifest itself, spread within an urban setting and the potential to contain the disease. We have chosen as our test case the Kibera slum within Nairobi, Kenya. Agents in this model represent the residents of the Kibera slum. They are mobile and goal-orientated, seeking to fulfill one goal before moving on to the next. Goals are determined based on the agent’s characteristics (age, sex, etc.) as well as their needs (water, food, health etc.). The exact location they choose to go to is also affected by the distance. When agents interact with one another, they can be infected with TB. Infection is determined upon the amount of bacilli absorbed by agents and their immune response. The transition from infection to disease for HIV positive patients is also dependent on the patient’s CD4 cell count.  What you see below is a poster we presented at Krasnow Institute Retreat.


To give a sense of the dynamics of the model, the movie below shows agents moving around the slum and how their health status changes as time progresses.



Monday, February 4, 2013

Modeling Human Behavior

I have recently been thinking about how do people go about implementing human behavior within agent-based models. There are several good papers out their including Bill Kennedy's (2012) paper entitled 'Modelling Human Behavior in Agent-Based Models'. I thought I would attempt to sum up some of these readings in a blog post but also add to how it links to the main properties of agent-based models.

The reason I do this is that modeling human behavior is not as simple as it sounds. This is because, humans do not just make random decisions, but base their actions upon their knowledge and their abilities. Moreover, it might be nice to think that human behavior is rationale but this is not always the case, decisions can also be based on emotions (e.g. interest, happiness anger, and fear; see Izard, 2007). Moreover, emotions can influence ones decision making by altering our perceptions about the environment and future evaluations (Loewenstein and Lerner, 2003). The question therefore is how do we model human behavior? Over the last decade, one of the dominant ways of modeling human behavior in its many shapes and forms is through agent-based modeling (ABM). ABM allows us to focus on individuals or groups of individuals and give them diverse knowledge and abilities which is not possible in other modeling methodologies (see Crooks and Heppenstall, 2012). This is possible through the unique properties one can endow upon the agents (e.g. people) within such models (see Wooldridge and Jennings, 1995; Franklin and Graesser, 1996; Castle and Crooks, 2006). These properties include:
    • Autonomy: In sense that we can model individual autonomous units which are not centrally governed. Through this property agents are able to process and exchange information with other agents in order to make independent decisions.
    • Heterogeneity: Through using autonomous agents the notion of the average individual is redundant. Each agent can have their own properties and it’s these unique properties of individuals that cause more aggregate phenomena to develop.
    • Activity: As agents are autonomous individuals with heterogeneous properties, they can exert active independent influence within a simulation. There are several ways agents can do this from being proactive (goal directed) for example trying to solve a specific problem. Or they can be reactive, in the sense agents can be designed to perceive their surroundings and given prior knowledge based on experiences (e.g. learning) or observation and take actions accordingly.
      The primary strength of ABMs is as a testing ground for a variety of theoretical assumptions and concepts about human behavior (Stanilov, 2012) within the safe environment of a computer simulation. For example, we know humans process sensory information about the environment, their own current state, and their remembered history to decide what actions to take (Kennedy, 2012) all of which can be incorporated within ABMs. Through the ability to model heterogeneity within ABMs we can capture the uniqueness that makes us human, in the sense that all humans have diverse personality traits (e.g. motivation, emotion, risk avoidance) and complex psychology (Bonabeau, 2002). We also know that human behavior is influenced by others (Friedkin and Johnsen, 1999) say via their social networks which can introduce positive and negative feedbacks into the system and when people form groups, results from such groups can be greater than the sum of the group (Hong and Page, 2004). These properties again can be captured through the agent’s heterogeneity and active status. However, what drives humans? What motivates us to take certain actions? By agents being active we can test ideas and theories (e.g. Maslow’s “Hierarchy of Needs” (Maslow, 1943)) on what motivates people and why do they do certain things.

      Maslow's Hierarchy of Needs (Source: Wikipedia)
      The question of how to model decision-making within an agent-based model is another important consideration. Kennedy lists three main approaches to capturing such cognitive processes within ABMs (Kennedy, 2012). The first, being a mathematical approach such as the use of ad hoc direct and custom coding of behaviors within the simulation such as using random number generators to select a predefined possible choice (e.g. to buy or sell) (Gode and Sunder, 1993). But, as noted above, people are not random which has lead researchers to develop other methods such as directly incorporating threshold-based rules, i.e. when an environment parameter passes a certain threshold a specific agent behavior will result (e.g. move to a new location when the neighborhood composition reaches a certain percentage) (Crooks, 2010). One could argue that these approaches of modeling are appropriate when behavior can be well specified. The second approach to modeling human behavior uses conceptual cognitive frameworks. Within such models, instead of using thresholds, more abstract concepts such as beliefs, desires, and intentions (BDI, (Rao and Georgeff, 1991)) or physical, emotional, cognitive, and social factors (PECS, (Schmidt, 2002)) are given to individual agents. Both the BDI and PECS frameworks have been successively applied to modeling human behavior in a number of applications such as what drives people to crime (see (Brantingham et al., 2005) and (Malleson, 2012) respectively). These conceptual cognitive frameworks and mathematical approaches for representing behavior can both be considered as rule based systems and are often applied to tens to millions of agents. The third approach, that of cognitive architectures, (e.g. Soar (Laird, 2012) and ACT-R (Anderson and Lebiere, 1998)) focus on abstract or theoretical cognition of one agent at a time with a strong emphasis on artificial intelligence compared to the other two approaches.
      Determining the strongest motive before planing an action (Source: Malleson, 2012).
      ABM offers a new lens to explore human behavior allowing us to move away from more traditional methods such as rational choice theory (Coleman, 1990), where it is assumed that humans behave in ways to maximize their benefits or minimize their costs. However, people rarely meet the requirements of rational choice models (Axelrod, 1997) in the sense that most, if not all people have limited cognitive abilities and limited time to make decisions (Simon, 1996). The incorporation of this bounded rationality (e.g. limited access to information) within agent-based models addresses this issue and can be used to explore many application domains where human behavior is important.

      Any thoughts or comments on what I have written here would be most appreciated.

      References
      • Anderson, J.R. and Lebiere, C. (1998), The Atomic Components of Thought, Mahwah, NJ.
      • Axelrod, R. (1997), 'Advancing the Art of Simulation in the Social Sciences', in Conte, R., Hegselmann, R. and Terno, P. (eds.), Simulating Social Phenomena, Springer, Berlin, Germany, pp. 21-40.
      • Bonabeau, E. (2002), 'Agent-Based Modelling: Methods and Techniques for Simulating Human Systems', Proceedings of the National Academy of Sciences of the United States of America, 99(3): 7280-7287.
      • Brantingham, P., Glasser, U., Kinney, B., Singh, K. and Vajihollahi, M. (2005), 'A Computational Model for Simulating Spatial Aspects of Crime in Urban Environments.' 2005 IEEE International Conference on Systems, Man and Cybernetics (Vol. 4), pp. 3667-3674.
      • Coleman, J.S. (1990), Foundations of Social Theory, Harvard University Press, Cambridge, MA.
      • Crooks, A.T. (2010), 'Constructing and Implementing an Agent-Based Model of Residential Segregation through Vector GIS', International Journal of GIS, 24(5): 661-675.
      • Friedkin, N.E. and Johnsen, E.C. (1999), 'Social Influence Networks and Opinion Change', Advances in Group Processes, 16(1-29).
      • Gode, D.K. and Sunder, S. (1993), 'Allocative Efficiency of Markets with Zero-Intelligence Traders: Market as a Partial Substitute for Individual Rationality', The Journal of Political Economy, 101: 119-137.
      • Hong, L. and Page, S.E. (2004), 'Groups of Diverse Problem Solvers Can Outperform Groups of High-ability Problem Solvers', Proceedings of the National Academic Sciences, 101(46): 16385-16389.
      • Kennedy, W. (2012), 'Modelling Human Behaviour in Agent-Based Models', in Heppenstall, A., Crooks, A.T., See, L.M. and Batty, M. (eds.), Agent-based Models of Geographical Systems, Springer, New York, NY, pp. 167-180.
      • Laird, J.E. (2012), The Soar Cognitive Architecture, The MIT Press, Cambridge, MA.
      • Malleson, N. (2012), 'Using Agent-Based Models to Simulate Crime', in Heppenstall, A., Crooks, A.T., See, L.M. and Batty, M. (eds.), Agent-based Models of Geographical Systems, Springer, New York, NY, pp. 411-434.
      • Maslow, A.H. (1943), 'A Theory of Human Motivation', Psychological Review, 50(4): 370-396.
      • Rao, A.S. and Georgeff, M.P. (1991), 'Modeling Rational Agents within a BDI-architecture', in Allen, J., Fikes, R. and Sandewall, E. (eds.), Proceedings of the Second International Conference on Principles of Knowledge Representation and Reasoning, San Mateo, CA.
      • Schmidt, B. (2002), 'The Modelling of Human Behaviour: The PECS Reference Model', Proceedings 14th European Simulation Symposium, Dresden, Germany.
      • Simon, H.A. (1996), The Sciences of the Artificial (3rd Edition), MIT Press, Cambridge, M. A.
      • Stanilov, K. (2012), 'Space in Agent-Based Models', in Heppenstall, A., Crooks, A.T., See, L.M. and Batty, M. (eds.), Agent-based Models of Geographical Systems, Springer, New York, NY, pp. 253-271.


        Friday, April 29, 2011

        Using agents to explore traffic: Part Two-Micro to Macro

        Following on from a previous post on traffic modeling with agent-based models, I have been thinking of other work in this area and came across the following movies on Youtube. The first is a traffic simulator from Martin Treiber. What is interesting is the "coffeemeter" that gives an impression of the accelerations and jerks in the traffic. You can investigate this model further here: http://www.traffic-simulation.de/ or watch the movie below.




        The question you might be asking in yourselves is, do such models work in reality? The mathematical theory behind these so-called "shockwave" jams was developed more than 15 years ago using models that show jams appear from nowhere on roads carrying their maximum capacity of free-flowing traffic – typically triggered by a single driver slowing down. Below is a movie of the NetLogo Traffic Basic Model exploring this principle.


        Hopefully the movie above helps add something to your question. But if not check out the next movie (make sure the sound is on). In which a team of Japanese researchers recreated the phenomenon on a test-track by putting 22 vehicles on a 230-meter single-lane circuit. Drivers were asked to cruise steadily at 30 kilometers per hour, and at first the traffic moved freely. But small fluctuations soon appeared in distances between cars, breaking down the free flow, until finally a cluster of several vehicles was forced to stop completely for a moment. That cluster spread backwards through the traffic like a shockwave. Every time a vehicle at the front of the cluster was able to escape at up to 40 km/h, another vehicle joined the back of the jam. The full article can be read in New Scientist (click here).


        Moving away from traffic jams, as the previous post highlighted we can also use agent-based models to look at traffic intersections. The movie shows a more complicated intersection than in the last post and shows how different intersections can be visualized and modeled.



        But while the above movie is rather simplistic, agent-based models can be developed from such simple situations to more complex one. For example, if you can model one type of intersection what is stopping you for modeling more? The movie below shows a more complex set of intersections using Paramics (however, this is noted to be a microsimulation model, if you are interested in finding out the difference between microsimulation and ABM see here).



        From a local scene we can also turn to exploring more larger scenes such as entire metropolitan regions. The movie below is of that of TRANSIMS microsimulation-agent based model applied to downtown Chicago:



        What I find so interesting about such traffic models is how one can go from basic models at the micro level and scale up such models (and of adding more complexity) to explore more macro phenomena such as traffic jams at metropolitan scales.

        Tuesday, May 19, 2009

        Update: Agent-based models in Second Life

        We just finished another part of Agent-Street where agents and avatars can interact with each other. The idea here is to merge iconic and symbolic urban models in a multi-user real time environment.

        The movie below shows Agent-Street and how one can download the models we have created by clicking on the model vending machines. By clicking on the vending machines, models can be downloaded and saved. Such vending machines are common features in Second Life and allow users to store objects and scripts in their personal inventory for later use such as rebuilding the models on their own Land or in free sand-boxes. We have been using the Mauve Land for this (SLURL).



        In our previous models avatars could only visualise and initiate the models. For example, in the pedestrian evacuation model users could only observe how agents exited the building (in a similar way to professionally developed 3D pedestrian modelling software packages such as STEPS). In this new model, we extend the basic pedestrian evacuation model, so that agents not only consider their environments but also other avatars. In this sense we are not only incorporating iconic and symbolic modelling styles but also adding a further human dimension, moving towards an augmented reality (i.e. as if the agents and the humans were in the same crowd). The movie below shows how pedestrian paths change when avoiding an avatar. The movie shows a how an avatar stationed near the exit impacts on pedestrian egress as agents have to move around it.


        Previous posts on our and others work on Second Life can be found by clicking here. We have also set up a website outlining the work in detail (click here) or alternatively if you have a Second Life account this SLurl will take you to the Land, once you teleport to the area, follow the red arrow (beam of red light) into the sky to find Agent-Street. If the models are running slow let us know as we having problems with fish entering our land from a neighbouring island.

        Tuesday, March 31, 2009

        Work update

        Currently at CASA we are exploring ways to simulate various aspects of city life and visualize such models taking advantage of our London database which we are developing along with the advances in graphic card technology and networked communication. We presented some of this work at the AAG last week (click here to download the presentation and here to see the abstract).

        Some of this includes modeling traffic. Following on from an earlier post by Andrew-Hudson Smith of Digital Urban about CityScape, the movie below shows our first attempts with the software.


        CityScape: by PixelActive - Real-time Traffic Modeling.

        Tuesday, March 17, 2009

        AAG Agent Talk

        Next week, I will be attending the AAG annual meeting in Las Vegas, which I am quite looking forward to. There seems to be a good selection of agent-based modelling talks along with others relating to GIS, urban planning etc. I will be presenting a paper with Andrew Hudson-Smith in the Modeling Geographic Complexity 2 session entitled "Agents in the City: Modeling and Visualizing Emergent Phenomena."


        The abstract for the talk is:

        Agent-based modeling (ABM) is increasingly being used as a tool for the spatial simulation of a wide variety of urban phenomena. As ABM moves into the spatial domain, we need new ways to visualize and communicate such models especially to those who we seek to influence and who we believe that such modeling will inform their activities. Coupled with the above challenge is how we represent agents in space. The use of ABM for geospatial simulation has traditionally been dominated by the 2D view of the world with the third dimension rarely ventured into. We would argue that this is due to the nature of the discipline where the focus is on theory rather than outreach and end user visualization; and that model builders are not taking advantage in improvements in computer technology. We will illustrate our attempts to visualize, share and communicate geospatial agent-based models specifically focusing on the third dimension with several examples utilizing 3D Studio Max and Second Life, a virtual online world. These examples range through the movement of cars and pedestrians in a cityscape to evacuation of pedestrians from buildings and residential segregation. These models demonstrate how through the interaction of individual agents complex phenomena emerges over time and in space. Furthermore they demonstrate how different theories and concepts can be incorporated into 3D environments. Additionally these models provide outputs to which non-expert users can easily relate to, thus allowing them to come under greater scrutiny than was possible in the past.

        Agents in the City: building cityscapes

        Hope to see you there.

        Thursday, March 5, 2009

        Simulating Crime with Agent-Based Models

        Crime is seen in all cities but understanding crime is extremely complex as it is highly diverse and has many causes. A greater understanding of such phenomena is crucial for improving polices and developing effective crime prevention strategies. The use of agent-based modelling allows one to study individuals who are involved in each crime event and how these individuals interact with each other and their environment.

        Nick Malleson of the CrimeSim Blog has had some good posts recently on his recent research regarding crime and agent-based modelling. He has released a new working paper entitled "Simulating Burglary with an Agent-Based Model" (click here) which focuses on the inclusion of the PECS (Physical conditions, Emotional states, Cognitive capabilities and Social status) framework for simulating human behaviour within agent-based models and how this differs from previous approaches to crime modelling. Nick also has some excellent posts/tutorials on using GIS and Repast Simphony (Click here to see them).


        Simulating Burglary with an Agent-Based Model prototype using NetLogo by Nick Malleson.

        Monday, February 23, 2009

        Agent-based models for Latin American Cities


        Latin American cities are characterised by high speeds of urban growth and the development of spontaneous settlements. Such change has produced many problems especially in relation to urbanisation and housing.

        The other day I came across the work of Guilherme Ressul who maintains the tzero site. One of his projects is to model the growth and development of Favelas in Brazil. For the project he has created an agent-based model using Maya to explore the growth of such developments. If you are interested in such 3D visualisation and agent-based modelling it is worth exploring his Favela micro-site, which includes movies, scripts and further information about the project.

        Another interesting agent-based model specifically developed for the study of Latin American cities, in relation to urban growth is that by Joana Barros. Her model focuses on a specific kind of urban growth that happens in Latin American cities, called “peripherisation”. This is characterised by the formation of low income residential areas in the peripheral ring of the city.

        More information on Joana's work can be found here.

        Sunday, February 22, 2009

        Virtual cities for simulating movment in public spaces

        While reading Urban Informatics (Foth, 2009) I came across an interesting article by Nakanishi et al. (2009) entitled “Virtual Cities for Simulating Smart Urban Public Spaces” which explores the use of virtual cities as a test bed for examining the design of urban public spaces. Specifically the authors combine an agent-based model with a virtual city model (in this case a platform at the Kyoto subway station) and used augmented reality to allow humans to interact with the agents (as if the agents and the humans where in the same crowd) through the use of positioning sensors around the station and then simulated an emergency.

        Further information about the project, including the software Freewalk where humans and agents can socially interact with one another in a virtual city space can be found here.

        References:

        Foth, M. (2009), Handbook of Research on Urban Informatics: The Practice and Promise of the Real-Time City, IGI Global, Hershey, PA.

        Nakanishi, H., Ishida, T. and Koizumi, S. (2009), 'Virtual Cities for Simulating Smart Urban Public Spaces', in Foth, M. (ed.) Handbook of Research on Urban Informatics: The Practice and Promise of the Real-Time City, IGI Global, Hershey, PA, pp. 257-269.

        Wednesday, January 14, 2009

        Kvintus Model

        Hans Skov-Petersen and his team from the Forest and Landscape Centre at the University of Copenhagen has created the Kvintus model. An agent-based model implemented in Repast and visualised on Google Maps at runtime. Within the model recreationalists (walkers, runners, mountain bikers etc.) can be simulated along with animals (e.g. roe deer). Such a style of model has similarities with the RBSim model (click here to see a previous blog post).

        In the YouTube movie below; the yellow squares are joggers (which run at 10 km/h, and prefers marked trails), the circles are Roe deer (the green and blue are deer at various stages in eating and searching for food, red is when they are scared by a jogger, white is when they are searching for a hiding place and black when the deer is hiding.





        For more information about the model, readers may be interested in a presentation entitled “Kvintus - an agent-based model of recreational behaviour” on slideshare.

        If you like these sorts of models it may be worth reading “Monitoring, simulation and management of visitor landscapes” by Randy Gimblett and Hans Skov-Petersen (eds.). University of Arizona Press. 2008.


        Thursday, October 30, 2008

        Work Update

        Readers of the blog might have been wondering why I been interested in Second Life (click here to see blog posts on Second Life), and why I been exploring fine scale modelling of the London housing market and what this has to do with GIS and ABM. As part of the CASA seminar series, I was asked to give a talk about some of my work from the last year. The talk was entitled "Modelling Cities: An Approach using Agent-Based Models and GIS' which pulled together these topics. The abstract or the talk is below:

        The Agent-based modelling (ABM) paradigm is becoming an increasingly used technique to study cities. It allows us to grow social structures in artificial worlds specifically how a set of micro-specifications are sufficient to generate the macro-phenomena of interest. Until recently many applications of agent-based models exploring urban phenomena have used a regular partition of space (cells) to represent space. While these models have provided valuable insights into urban phenomena especially as they can capture geographic detail, they miss geometric detail. This area is critical to good applications but is barely touched upon in the literature. Geometry (points, lines and polygons), forms the skeleton of cities from streets and buildings, through to parks, rivers, etc. The ability to represent the urban environment as a series of points, lines, and polygons allows for different size features such as houses and roads to be directly incorporated into the modelling process onto which other physical and social attributes can be added. Additionally the inclusion of geometry allows us to make agent-based models more realistic compared to representing the urban environment as a series of discrete regular cells. This presentation introduces ABM, explore how agent-based models coupled loosely with geographic information systems (GIS) can be created through illustrated examples focusing on residential location. These applications directly consider geometry when building these artificial worlds and running the simulations. Furthermore, these models highlight how the inclusion of geometry impacts on simulation results. Problems and challenges with this approach and ABM in general will be identified. To conclude we will argue the need for fine scale and extensive datasets of the built and socio-economic environments to ground such models, along with the need to communicate and visualise agent-based models. To this extent we introduce our detailed housing and built environment database for London, which will be used as a building block for agent-based models associated with London. We then explore how such models might be communicated and shared with others using advances in technology, specifically Web 2.0 and Second Life.

        Some people have asked for the slides of the talk, so I have made them available, they can be downloaded from here (28MB). Accompanying these I have also made a movie of the talk which give a sense of dynamics from such models.




        Any thoughts or comments most welcome.

        Monday, October 27, 2008

        New Paper: Key challenges in agent-based modelling for geo-spatial simulation

        Just found out we (Christian Castle, Mike Batty and myself) have a new article inpress within Computers, Environment and Urban Systems, entitled "Key challenges in agent-based modelling for geo-spatial simulation" Below is the abstract.

        Agent-based modelling (ABM) is becoming the dominant paradigm in social simulation due primarily to a worldview that suggests that complex systems emerge from the bottom-up, are highly decentralised, and are composed of a multitude of heterogeneous objects called agents. These agents act with some purpose and their interaction, usually through time and space, generates emergent order, often at higher levels than those at which such agents operate. ABM however raises as many challenges as it seeks to resolve. It is the purpose of this paper to catalogue these challenges and to illustrate them using three somewhat different agent-based models applied to city systems. The seven challenges we pose involve: the purpose for which the model is built, the extent to which the model is rooted in independent theory, the extent to which the model can be replicated, the ways the model might be verified, calibrated and validated, the way model dynamics are represented in terms of agent interactions, the extent to which the model is operational, and the way the model can be communicated and shared with others. Once catalogued, we then illustrate these challenges with a pedestrian model for emergency evacuation in central London, a hypothetical model of residential segregation model tuned to London data, and an agent-based residential location model, for Greater London. The ambiguities posed by this new style of modelling are drawn out as conclusions, and the relative arbitrariness of such modelling highlighted.

        Anyone wishing to give us feedback on the article is most welcome.

        Tuesday, October 7, 2008

        Agent-based models in Second Life

        Just a quick update on our work with agent-based modelling (ABM) in Second Life. Below are a series of models that we have created in Second Life as proofs of concept and a test for how well Second Life copes with different types of agent-based models. We have created three models which we demonstrate below.

        Our first model is chosen Conway’s Game of Life. The movie below details its inner workings:


        Game of Life from Andrew Crooks.


        The sound track is 'A Lonely Place without You' by New Inception.

        Our second model is Schelling’s (1978) Segregation model. Where through mild tastes and preferences to locate with like groups segregation arises. The above models were chosen as they highlight how classical automata styles of models which have inspired a generation of modellers can be created and explored in Second Life.


        Schelling's Segregation Model from Andrew Crooks.


        Our third model is a prototype pedestrian evacuation model which is more complex than the previous two and highlights at the variety of models that can be potentially created in Second Life. We first started off with agents randomly walking around a room avoiding each other and walls as the movie below demonstrates.


        Random Walking from Andrew Crooks.


        Then we took the model further were agents exit the building once an alarm is sounded. Within this model we have designed three different room configurations, from a simple square room, a more complex room with internal walls and tables as obstacles, and a multi-floor building were the agents have to walk down the stairs towards the exit (all of which are shown below). From these three scenarios one can explore how room configurations, obstacles and density of surrounding pedestrians impact on pedestrian egress.

        Pedestrian Evacuation Model: simple layout from Andrew Crooks .

        To further help understand we record the paths the pedestrians walk when exiting the building. The movie below shows the paths travelled of pedestrians exiting the simple room from the movie above.



        Pedestrian Evacuation Model: simple layout-trace movie from Andrew Crooks on Vimeo.



        Pedestrian Evacuation Model: complex layout from Andrew Crooks.



        Pedestrian Evacuation Model: Multi-floor layout from Andrew Crooks.


        All the models where written using the Linden Scripting Language (see Rymaszewski et al., 2007) rather than following a loose coupling approach. Further details (including code and model descriptions) and movies of simulations from the models can be found here. If you use Second Life, you can visit our agent street (The SLURL to go there directly is here). In agent street you can experiment with the models and there are also vending machines which allow you to download the model.



        Any thoughts or comments or most welcome.

        Tuesday, September 16, 2008

        Update: Agents in Second Life

        At CASA we use Second Life as a online urban laboratory -which could be termed collaboratories, to explore issues pertaining to urban planning and public debate in a visually 3D collaborative environment (click here to see some of CASA's previous work from Digital Urban)


        One of the aspects I am working on with others at CASA is exploring Second Life's potential for 3D agent-based modelling for social scientists. To this end we have created three agent-based models using the Linden Scripting Language (see Rymaszewski et al., 2007). It is the purpose of these models to act as pedagogic demonstrators and as a “proof-of-concept”, thus we have chosen Conway’s Game of Life, Schelling’s (1971, 1978) Segregation model. These models were chosen as they highlight how classical automata styles of models which have inspired a generation of modellers can be created and explored in Second Life. The third model we present is a prototype pedestrian evacuation model which is more complex than the previous two and highlights at the variety of models that can be potentially created in Second Life. This model relates to the genus of such models of which the social forces model developed and popularised by Helbing and Molnár (1995) is typical.

        While being work in progress we thought its worth showing a short movie of our work to date.



        Agent-Based Modelling in Second Life

        The sound track for the movie is 'Just a Memory' from ANDYF.

        Potentially this environment demonstrates how experts, model builders and the non specialist can view, interact and discuss agent-based models in a 3D collaborative environment. Any thoughts or comments are most welcome.

        References:

        Helbing, D. and Molnár, P. (1995), 'Social Force Model for Pedestrian Dynamics', Physical Review E, 51(5): 4282-4286.

        Rymaszewski, M., Au, W.J., Wallace, M., Winters, C., Ondrejka, C. and Batstone-Cunningham, B. (2007), Second Life: The Official Guide, John Wiley & Sons, Inc, Hoboken, NJ.

        Schelling, T.C. (1971), 'Dynamic Models of Segregation', Journal of Mathematical Sociology, 1(1): 143-186.

        Schelling, T.C. (1978), Micromotives and Macrobehavior, WW Norton and Company, New York, NY.

        Tuesday, August 26, 2008

        The Building Blocks of the City: Points, Lines and Polygons


        This week I will be attending the RGS-IBG Annual International Conference in London, and giving a paper entitled "The Building Blocks of the City: Points, Lines and Polygons" in a duel session called "Enhancing Complex Social Simulations with Automata Systems" on Thursday, organised by Geographical Information Science Research Group and Quantitative Methods Research Group of the RGS. The abstract for the talk is below, if you are around the conference come and say hello.

        Talk outline:

        "The Agent-based modelling (ABM) paradigm is becoming an increasingly used technique to study cities. It allows us to grow social structures ‘in silico’ specifically how a set of micro-specifications are sufficient to generate the macro-phenomena of interest. Until recently many applications of agent-based models exploring urban phenomena have used a regular partition of space (cells) to represent space. While these models have provided valuable insights into urban phenomena especially as they can capture geographic detail, they miss geometric detail. This area is critical to good applications but is barely touched upon in the literature.

        Geometry (points, lines and polygons), forms the skeleton of cities from streets and buildings, through to parks, rivers, etc. The ability to represent the urban environment as a series of points, lines, and polygons allows for different size features such as houses and roads to be directly incorporated into the modelling process onto which other physical and social attributes can be added. Additionally the inclusion of geometry allows us to make agent-based models more realistic compared to representing the urban environment as a series of discrete regular cells.

        This paper will explore how agent-based models coupled loosely with geographic information systems (GIS) can be created through illustrated examples focusing on residential location. These applications directly consider geometry when building these artificial worlds and running the simulation and highlight how the inclusion of geometry impacts on simulation results. Furthermore problems and challenges with this approach and ABM in general will be identified along with further work."

        The talk can be downloaded from here (5.8MB). A previous post and a paper related to this talk can be found here.

        Thursday, August 14, 2008

        Agent-based model that mimics drunken crowds

        While agent-based models are used for many applications, I just came across an article in New Scientist and found quite interesting. A team of researchers from the University of Cardiff have used agents to mimic the movements of drunken crowds. Specifically how the staggering gait and loss of balance associated with being drunk would affect the behaviour of crowds be it a mix of sober, drunk or somewhere in-between.

        The model was based on primary data as the team made 24 visits to Cardiff city centre between 11pm and 3am on Friday and Saturday nights, breathalysing people and monitoring their gait and then factoring this information into their simulation.


        Find out more:

        • The New Scientist Article
        • Moore, S. C., FlajÅ¡lik, M., Rosin, P. L. & Marshall, D. (in press). A particle model of crowd behavior: Exploring the relationship between alcohol, crowd dynamics and violence. Aggression and Violent Behavior.

        Thursday, May 22, 2008

        Agent-Based Models of Crowd Behaviuor

        Agent-based modelling allows us to model individuals and how these individuals interact to form emergent phenomena. A great example of this is crowds. Recently we (people at CASA) have been exploring ways to carryout pedestrian agent-based models in 3D and I just came across this short presentation by Paul Torrens entitled “Modelling Crowd Behaviour” from the O'Reilly Where 2.0 Conference. It is worth watching the talk (15min) as it shows how GIS and ABM can be coupled together and why studying crowd movement is important.

        The talk can be watched here.

        If you interested in pedestrian modelling and software the papers by Christian Castle might be of interest:

        Castle, C.J.E. (2007), Guidelines for Assessing Pedestrian Evacuation Software Applications, Centre for Advanced Spatial Analysis (University College London): Working Paper 115, London.

        Castle, C.J.E. and Longley, P.A. (2008), 'Emergency Pedestrian Evacuation Analysis: A Review and Interpretation of Software Applications', in Sui, D.Z. and Cutter, S.L. (eds.), Geospatial Technologies and Homeland Security: Research Frontiers and Challenges, Springer, Berlin.


        Thursday, April 17, 2008

        Geographically Explicit Agents

        A quick post for anyone interested following on from a presentation that I gave Association of American Geographers (AAG) Annual Meeting in Boston entitled “Using geographically explicit agents to explain and explore urban phenomena” given in the Agent Based Modeling II session

        The Abstract of the talk was as follows:

        "Agent-based modelling is at the forefront of computer modelling research focusing on the individual or groups of individuals, and how these individuals interact to form emergent structures. In particular, the ABM paradigm is becoming an increasingly used technique to study cities and regions. However, this new paradigm poses many challenges with regard to modelling. These include but are not limited to: the purpose for which the model is built, the extent to which the model is rooted in independent theory, the extent to which the model can be replicated, the way the model might be verified, calibrated and validated, the way model dynamics are represented in terms of agent interactions, the extent to which the model is operational, and the way the model can be communicated and shared with others.

        This paper will explore how we are addressing these issues with illustrated examples (applications) specifically focusing on residential segregation dimensioned upon London, which the author has developed and is currently developing. Furthermore, the models address other major problems with respect to agent-based modelling specifically integrating GIS within such models via a loose coupling approach. This integration of spatial data adds extra levels of complexity when studying urban phenomena, specifically that of segregation within agent-based models which is hardly touched upon in the literature. Furthermore, this integration allows the models to be grounded in actual places where geometrical features restrict agent interactions and how such places change over time. The paper will conclude with highlighting future avenues of research."

        The presentation can be downloaded from here and a new working paper entitled “Constructing and Implementing an Agent-Based Model of Residential Segregation through Vector GIS” which slightly mirrors the talk can be found here. The full reference for this paper is:

        Crooks, A. T. (2008), Constructing and Implementing an Agent-Based Model of Residential Segregation through Vector GIS, Centre for Advanced Spatial Analysis (University College London), Working Paper 133, London.

        While the presentation focuses mainly on the second half of the abstract due to time constraints, further information about the challenges agent-based modelling poses with regard to modelling can be found in the following working paper:

        Crooks, A. T., Castle, C. J .E. and Batty, M. (2007), Key Challenges in Agent-Based Modelling for Geo-Spatial Simulation, Centre for Advanced Spatial Analysis (University College London), Working Paper 121, London.

        As always any thoughts or comments about the work or presentation are more than welcome.

        Wednesday, April 16, 2008

        New Working Paper: ABM of Residential Segregation

        We just finished a new working paper entitled “Constructing and Implementing an Agent-Based Model of Residential Segregation through Vector GIS”

        The abstract is as follows:

        In this paper, we present a geographically explicit agent-based model, loosely coupled with vector GIS, which explicitly captures and uses geometrical data and socio economic attributes in the simulation process. The ability to represent the urban environment as a series of points, line and polygons not only allows one to represent a range of different sized features such as houses or larger areas portrayed as the urban environment but is a move away from many agent-based models utilising GIS which are rooted in grid-based structures. We apply this model to the study of residential segregation, specifically creating a Schelling (1971, 1978) type of model within a hypothetical cityscape, thus demonstrating how this approach can be used for linking vector-based GIS and agent-based modelling. A selection of simulation experiments are presented, highlighting the inner workings of the model and how aggregate patterns of segregation can emerge from the mild tastes and preferences of individual agents interacting locally over time. Furthermore, the paper suggests how this model could be extended and demonstrates the importance of explicit geographical space in the modelling process.

        Keywords: Agent-Based Modelling, GIS, Residential Segregation, Repast

        The full reference is:

        Crooks, A. T. (2008), Constructing and Implementing an Agent-Based Model of Residential Segregation through Vector GIS, Centre for Advanced Spatial Analysis (University College London), Working Paper 133, London.

        The paper can be downloaded from here. As always, any thoughts or comments about the paper are more than welcome.