Interactive Swarm Space

About ISO Flock

Most of our implementation efforts have been put into the development of a generic swarm simulation library (ISO Flock). In this introduction, we will give you a brief overview of implemented concepts which will help you gain a basic understanding of how ISO swarms are created and how the agents interact with each other.

A swarm is obviously much more than just a bunch of entities that randomly and blindly move around. Naturalistic swarms show complex interaction behaviors that are triggered by individuals and then emerge in complex and more often than not beautiful group appearances. Swarming behaviors are not limited to motion, but can as well be applied to social or emotional factors of a group. You could go as far as to say: Human economy, i.e. the financial market, is nothing more but a complex swarm of decision maker agents that follow certain rules.

Our goal was to create a framework that let's you create versatile swarming behavior using your own concepts and interaction designs. These swarms are consequently used to control other ISO tools (like ISO Synth) and can vice versa be controlled and even created (e.g. by the ISO Tracker) via a UDP/IP, a TCP/IP or an OSC protocol. For complex external control interfaces we recommend using OSC. A graphical front-end will show you a visual representation of your swarm at runtime. At the moment this visualisation is limited to reproduce only the swarming motion in 3D, all other parameters like mass, velocity as well as your own custom social/emotional parameters are not visualised yet. This is a subject of our current development cycle. More about it on the bottom of this page.

So let's abstract these swarms a little and look what building blocks we can derive from them in order to build artificals flocks. At the lowest level we will find the entity we call agent. Agents are labeled containers for parameters and behaviors. Please refer to the glossary section for an overview of the terminology we employ.

Parameters represent labeled vectors of arbitrary dimension and manage relationships (euclidian distance and direction) with other parameters organized in neighbor groups.

Behaviors define functional relationships among parameters. Behaviors distinguish between input parameters, internal parameters and output parameters. Internal parameters are specific to a particular behavior and are created when the behavior is instantiated for the first time. Whenever a behavior is executed, it reads from its input and internal parameters as well as neighbor groups and writes into its output parameters. These changes are buffered within the output parameters. This helps to avoid that the simulation output is affected by the particular sequence in which behaviors are executed.

All parameters are normal agent parameters and their distinction into different types (internal, input, output) applies only for a particular instantiation of a behavior. Whenever a new behavior is created, the supplied parameters can have entirely different types.

A swarm is a collection of agents with a constant structure of parameters and behaviors, but of course the actual values of these parameters differ from each other. Swarms however are not only containers for these agents, but can actually have parameters and behaviors as well! In fact a swarm can be treated as if it were an individual agent!

Agent param vs. Swarm param

This is to assure that the agent-to-agent interaction is as easy to implement as a swarm-to-swarm or even a swarm-to-agent interaction - think of an ant colony and their ant queen. Furthermore this concept allows for arbitrary nesting of agent hierarchies (agent A belongs to swarm B, and swarm B along with other swarms belong to a master swarm C).

In addition to these agents/swarms we have recently introduced Environments (or environmental agents) that are organized in an n-dimensional grid. These environmental grids are well suited to define separate spaces with distinct properties that interact with "normal" agents in different ways. As a simple example let's imagine a simple "Lawn" environment, a 2-dimensional grid with a single parameter that represents the amount of grass for each grid point. A separate environmental behavior could be in charge of the growth process for each blade of grass. Finally a "normal" swarm of agents could be grasing on this lawn, hence reducing the amount of grass per gridpoint. This is of course just a simple example, but it can give you an idea of where to use environments (which under the hood share most characteristics of agents themselves)

It is important to note that parameters cannot only be changed by behaviors but also by an event-based system. The event system provides the same functionality as in ISO Synth and permits the score-like choreographing of agent parameters. Events can also be created on the fly such as for example when certain conditions are observed by the camera tracking software. As of 2009, we extended the possibilites of the event system beyond parameter control. Presently, events can also be used to create, modify and destroy swarms, agents, parameters, behaviors and spaces. This will be covered more in-depth in the "Networking" chapter.

The last fundamental ISO Flock class deals with spatial calculations. This space class makes use of a separate set of spatial partition/neighborhood calculation algorithms (short SpaceAlgorithms) for the calculation of euclidian distances among parameters and thereby manages their neighborhood relationships. A parameters can simultaneously exist in an arbitrary number of spaces, and each space is in charge of updating its own neighborgroup within the parameter. One of the consequences of the generic nature of agents, parameters and spaces is the somewhat counterintuitive fact, that it is not the agents that exist in a particular space but rather their parameters. It is not necessary to take this peculiarity into account when designing fairly standard types of agents (i.e. agents that possess the properties of position, velocity and acceleration and that only map their position into a space that would conceptually correspond to the classical agent world).

In its current implementation, the ISO Flock library provides a group of specialized SpaceAlgorithms to be chosen of when creating a Space object, hence redefining the way this Space handles the relationships between its contained (agent's) parameters. To mention only the most basic ones: NTreeAlg, AnnAlg, KDTreeAlg build the group of PointSpace algorithms, RTreeAlg for ShapeShape algorithms and finally GridAlg for GridSpace algorithms. Of course you have probably no clue at this point of when to use which one - the dedicated section "Spaces, Shapes and Structures" will hopefully provide you with all necessary information, along with a handy decision tree to define precisely which space algorithm suits your scenario the best.

As promised, let's look a little closer at the currently introduced visualisation capabilities. Agents as well as Spaces can easily be visualised using OpenGL. It's flexibility is very limited however and serves mainly debugging purposes. The upcoming ISO Vis library will fill this gap and provide for actual artistic visualisation. Here's a list of features you are to expect in ISO Vis: setting the camera position, view port orientation and zoom, agents are represented either by an orientable shape (e.g. a pyramid) or a simple sphere, agent color and scale, agent trail: length, color and dimming, and last but no least specific visualsation strategies used to depict spacial relationships between agents (i.e. their neighborhood relations).

We have created a series of simulation applications that are based on the functionality of the ISO Flock library. In all these applications, the agents’ positions have been drawn as trajectories in three dimensional space.

Examples of flocks

Last updated: May 15, 2024