Indra is an agent-based modeling (ABM) system in Python.
The ultimate goal is to simplify ABM creation so that a model can be specified in only a few lines of code, or by filling in a few parameters on a screen. To that end we are building a Web front-end that will allow non-coders to build models, while at the same time permitting coders to use Python for more flexibility in model creation.
Indra’s structure can be appreciated philosophically. We start by considering the following question, What are the most general features of all population dynamics?
In order to have a population we have to have members of that population, and since these members must *do* something we call them "agents." So these agents act, and action always has a definite character, designed to reach an end. For this reason, all agents are also assigned a goal. For example, sheep are agents that run away from wolves because their goal is to not be eaten. These agents all exist within some world defining the ways they may interact with other agents. For example, wolves are agents limited by distance. They have to reach the sheep before they can eat them! This world in which interaction takes place we call the "environment," env for short.
All agents act, and while respose to the external env is not stricty required, whenever an agent needs to know something about it's external world, it has to peer into its env to see what’s about. For this reason, agents access information about other agents strictly through the env object that it lives in.
The user is of course given control to run the program and to display its data. But the key idea here is that the "user" appears as another node in Indra's net, meaning the agents can conceivably "see" the user and interact with him/her. His primary method of interface is through the menu , but more complicated interacitons are possible.
Agent pop is where we record all the information about the agents in an active model. It supports iterating over the population of agents by type, in order added, in reverse of the order added, and randomly.
One last generality can be noted. Agents have some kind of relation to one another and to the env they act within. Even the user has a relation to these things. He called them into existence and manages everything! To express these connections, nearly everything in the program is a node in an all-encompassing graph. Thus everything is interconnected through Indra's Net. And thus we may record abstract relationships of the kind similar to that which is in our mind.
Universals are a type of node that relate agents to each other. Their use is currently suspended while we work on other aspects of the system.
We currently have fairly extensive graphics capabilities built in to the system through matplotlib. These include plotting changes in agent populations, tracing agent movement (live) on a scatter plot, and examining the object-hierarchy at play in a program at any point in time.
Simulates fires starting and spreading through a forest. Burned out trees are replaced by new growth, which after aging are suseptible to catching and spreading fire.
Simulates wolves chasing sheep and sheep avoiding wolves in a meadow. The animals may reproduce. Once a wolf is near a sheep, it eats him.
In the metropolitan fashion scene, there are the trend-setters and the trend-followers. These we call hipsters and followers. Hipsters do not want to look like followers, and followers do not want to look like hipsters.
Schelling's famous model of neighborhood segrgegation, even if no one has a preference for such neighborhoods.
Schelling's model where parents use genetic engineering with goal only of ensuring their own children are not especially tall. But they achieve the result of making the entire human race get taller and taller.
See description in link above.
A financial market with value investors and trend followers.
Schelling's model of people entering and seating themselves in an auditorium.
Paul Krugman's model of inflation and the babysitting co-op.
Stephen Wolfram's Wolfram code.