Saturday, February 21, 2009

The problem with words…

The WorldWatch Institute recently published the article “Our Panarchic Future” by Thomas Homer-Dixon, adapted from his book “The Upside of Down: Catastrophe, Creativity and the Renewal of Civilization”. The article primarily discusses the work and thinking of the eminent ecologist Crawford Stanley (Buzz) Holling, specifically his concept of “panarchy theory”.

The article gives a cogent description of the panarchy theory; here’s a synopsis: As a complex system like a forest develops, it self-optimizes to minimize redundancy (e.g. fewer species occupying each specific niche) and maximize efficiency (increasing percentages of the total water and nutrient flow are used). The resulting forest is a highly interconnected supply chain (food web), with decreasing ability to handle a disruption (the loss of a species), because each species is playing a unique and essential role.

The efficient, but decreasingly resilient, system can be severely impacted by an external shock, like a wildfire. While disrupting the system to the extent that its original structure (e.g. species) may not be able to reestablish itself, these shocks also clear out space for new species and a new structure to emerge. In the less common case of several simultaneous shocks, such as a wildfire during a drought, the system might never recover.

The article draws the parallel between ecosystems and societies, suggesting that as societies become more complex, they become less resilient and more likely to be disrupted by external shocks (like climate change), or permanently snuffed out by multiple simultaneous shocks. An argument is then made that this is likely the reason that Rome fell.

Holling’s experience in ecology is strong and deep, and his views on the evolution of forest systems are drawn from a lifetime of work and probably some of the best understanding we have. And Homer-Dixon’s attempt to draw the parallel to civilizations is thought provoking, and possibly scary. But how can we tell if this is an accurate application of the analogy? Civilizations are self-aware and can diagnose problems and take proactive steps to fix them. Yes, Rome did decline, but how much of their situation and its potential progression into the future were they able to understand at the time?

Hopefully the article and the book will stimulate a good discussion, but words can only take us so far. Suppose we could build models of ecosystems and civilizations, and compare and contrast them to see where the analogy holds and where it doesn’t; see each other’s assumptions in the light of day, put them into motion, find out where they break down, revise them and try again. Yes, these models are complex and limited in accuracy because the world is so much more complex and unmeasured in so many ways, but discussing in models can take us so much further than discussing in words.

Thursday, February 19, 2009

The Power of Agent-Based Modeling

This post briefly describes several different approaches to software modeling. My specialty is in Agent-Based Modeling (ABM), where systems are described from the “bottom up.” This means looking at the system from the perspective of the individual actors in it—it might be consumers in a product category, cars on a road network, or plants and animals in an ecosystem. ABM stands in contrast to top-down modeling, where one looks at a system as a whole and describes its behavior with equations.

The top down approach can work when
  1. You know the behavior patterns for the system and
  2. You can write (and solve) equations for the system
For a real-world system like a container of oxygen molecules, this approach works. There are laws in chemistry such as the ideal gas law that enables any high school student to calculate what happens to the gas when you compress or heat up the container.

However, many systems of interest are not that simple. Sometimes you don’t know the behavior patterns that might occur. Take the banking industry for example. When the regulations were put in place (or removed) regarding how home loans were made, no one anticipated the sub-prime meltdown. Even allowing that those responsible for the regulations were expert and responsible, it appears they were not aware of all the possible patterns of behavior in the system.

Suppose you built a model at the level of individual home buyers and banks, imposed the regulations upon them, gave these “agents” the motivation to buy houses and make money, and enabled them to explore any strategy that was legal (or they could get away with because of inability to enforce regulations). Wind this up and set it in motion.

I would bet that if you ran it a thousand times, under different initial conditions and external factors, you would find some scenarios in which things play out like they have in the real world. These results could be used to refine the regulations (or determine the amount of regulatory oversight necessary) to keep the system operating in a zone where we get to keep our jobs, our homes and our 401Ks.

This is power of agent-based modeling.

Wednesday, February 18, 2009

Why Simulate?

Simulation is one of the things that makes us human. Thinking is what happens when our brains host virtual objects acting and interacting via behavioral “rules”. Computer simulation brings those mental models into the light of day, infuses them with real world data, and allows us to explore the envelope of the future. When done right, simulation brings the best of both worlds together to helps us make smarter decisions in complex situations—as individuals and as a society.

Computers have done a lot to help us deal with digital data, from mundane accounting to viral YouTube videos. Most of these applications involve moving, transforming, and/or displaying data, all of which could be done before computers, though far less efficiently. There is one thing though, that only computers can do, and that is to host a dynamic process that responds when we interact with it. And the biggest computer of all that does this is the real world.

This is a rather information-centric point of view, and I’m making a several rather strong assertions I can’t easily back up—but I think it is a worthwhile perspective to try on.

Computer games of course lead the way in exploiting simulation, and provide increasingly realistic and immersive experiences. They entertain and increasingly train, allowing us to learn by doing in a safe environment. Less holistic and more accurate are industrial simulations used in areas such as mechanical modeling and integrated circuit design. But games don’t have to be accurate and industrial simulators can stick to well characterized physical systems.

There are other domains that are much less well characterized, more broad in their reach, and moving forward in a much more uncertain environment—traffic, markets, economies, societies. Despite our best efforts to manage these, we have traffic jams, failed products, recessions and non-sustainable lifestyles. We can do better, and simulation can help.

Tuesday, February 17, 2009

Simulations augment, don't replace, thinking

This article by Irving Wladawsky Berger discusses the promise and pitfalls of simulations of large complex systems. Starting with the vision of Psychohistory from Asimov's Foundation trilogy, the author notes that a highly unexpected event ("the Mule" for Asimov, fashionably called the "Black Swan" today) can violate the key assumptions of a model and generate an unanticipated outcome, such as the current financial crisis. The solution Berger proposes is to keep humans in the loop to provide the insight, broader experience and sanity checking that can't be built into any model.

This is a very important point for those who build and use simulations. A model is a tool that augments, but does not replace, the human ability to think. There are models for lay persons and models for experts; models for everyday work flow and models for the exploration of the posible and the very unlikely. You need the right tool for the right use (and user).

But don't throw the black swan out with the pond water-- even though one can't anticiate the unanticipatabe, it is still possible to use models to test systems for robustness:
  • Identify the weak spots and strengthen them.
  • Identify the early warning signs that the model is going off track and build alarm systems.
  • Give your model to someone else to drive. They will do something you didn't anticipate.

Sunday, February 15, 2009

What is Simulation?

Simulation, as used in this blog, is a dynamic model of a real-world system, implemented in software. Let's look at each of the important words in this definition:

Dynamic: There is an element of time.
  • The model receives inputs at specific points in time.
  • These inputs might affect the outputs of the model at the time the inputs are received, or at a later time.
  • If the inputs affect the outputs at a later time, then the model must be able to store inputs for later use.
  • The way that inputs affect the model is via behaviors, which are rules.
  • The outputs of a model at a certain time point may be used as inputs to the model in the next time point. This is called feedback.
  • The delayed effect of inputs via feedback allows simulations to exhibit behavior that is not explicitly described by the model. This is known as emergent behavior.

Model: A simplified description of behavior. There are many ways to create models. The dominant approaches are
  • Equations, which try to capture some fundamental truth about the universe, such as the way two objects attract each other via gravity.
  • Top-down system-dynamic models implement behavior in terms of boxes that implement some kind of behavior (usually storing a quantity) and arrows which allow the quantity to flow between the boxes.
  • Regression is a technique that compares inputs to outputs and looks for correlations among the two. Unlike equations and system dynamics, regression does not assume any sort of behavior beyond correlation.
  • Bottom-up agent-based models create the individual objects that comprise a system, give these objects behaviors, and allow the objects to interact.
This blog deals with agent based models (ABM) specifically. In another post I will discuss why I feel these are the most effective way to model complex, real-world systems.

Real-World: The physical world in which we exist.

System: An set of interacting objects.

Software: A dynamic model could be implemented in three ways:
  1. In a tangible physical system like an orrey (mechanial model of the solar system).
  2. In a purely information-based model hosted in a computer.
  3. In a purely information-based model hosted in a human mind