User Tools

Site Tools


env-model:classes:first2014:finalproject:flocking

[back]

FLOCKING

WHAT IS IT?

The model represents the behavior of flocks. In general flocking behavior is the behavior exhibited when a group of birds, called a flock, are foraging or in flight. There are parallels with thresholding behavior of fish, the swarming behavior of insects, and herd behavior of land animals.With this model we tried to show the complex flock behavior using simple rules. The first model of flocks was generated in 1986 by Craig Reynolds. As it is described in his work, flock exhibits many contrasts. It is made up of discrete birds yet overall motion seems fluid; it is simple in concept yet is so visually complex, it seems randomly arrayed, but still is synchronized.

Applications

  • Researchers demonstrated a flock like behavior in humans. The group of people exhibited a very similar behavioral pattern to that.
  • Flocking has also been considered as a means of controlling the behavior of Unmanned Air Vehicles (UAVs).
  • Flocking was used in animation.  Batman Returns featured flocking bats,   The Lion King.
  • Flocking behavior has been used to automatically program Internet multi-channel radio stations  .
  • It has also been used for visualizing information and for optimization tasks

HOW IT WORKS

Basic models of flocking behavior are controlled by three simple rules:

  1. Separation - avoid crowding neighbors (short range repulsion)
  2. Alignment - steer towards average heading of neighbors
  3. Cohesion - steer towards average position of neighbors (long range attraction)

Source:red3d.com/cwr/boids

To implement the rules we should defined the SPACE_DIMENSION, SOCIETY_SIZE, VISION.

After that the angles of 8 directions were defined and each of them were assocciated with particular movement.

Counting of majority direction helped to understant the direction to which the bird should move.

In the model separation was implemented by checking the neighboring cells and if it is empty agent can move to that cell.

For alignment the majority of the directions in the neighborhood was counted based on heading.

For the last step agent was moved to cell defined by previous steps.

HOW TO USE IT

When the first running the model, it will show a map with the behavior of flocks.

These parameters should be set at the beginning:

SPACE_DIMENSION = 50

SOCIETY_SIZE = 50

VISION = 10 – 0 to 10

THINGS TO NOTICE

We can see that birds following the direction and thereis clustering shown by different colors.

When running the model it should be noticed that when the cluster close tothe border birds chanhgetheir direction automatically.

THINGS TO TRY

  • try different values for following parameters

SPACE_DIMENSION = 100

SOCIETY_SIZE = 100

VISION = 3 – 0 to 10

EXTENDING THE MODEL

For extending the model and for seing morecomprehensive behavior folowing features can be considered:

  • Adding an obstacle the birds should fly in simulated environments while dodging static objects.
  • Taking into consideration the velocity of birds.

TerraME FEATURES

For implementing the model agent based modelling was used. The main characteristics of agent-based models are:

  • Agents that model intelligent behavior, usually with a simple set of rules.
  • The agents are usually situated in space (or in a network), and interact with each other locally.
  • They usually have imperfect, local information.
  • Often there is variability between agents.
  • Often there are random elements, either among the agents or in the world.

TerraMe supports cellular automata, agent-based models. With Terrame it is easier to create comprehensive models by using build in tools and functions. Especially using features like:

  • CellularSpace
  • Agent
  • Society
  • Timer
  • Environment
  • Legend
  • Observer
  • utilities like forEachNeighbor,? etc.

There are several implementations of this model.

Flocking,by NetLogo Models Library, http://ccl.northwestern.edu/netlogo/models/Flocking

Neat algorithms-Floacking by Btuntage H.http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

Boids,by Craig Reynolds, http://red3d.com/cwr/boids/

CREDITS AND REFERENCES

Wilensky, U. (1998). NetLogo Flocking model. http://ccl.northwestern.edu/netlogo/models/Flocking. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Btuntage H. (2011) Neat algorithms-Floacking http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

Flocking (behavior), http://en.wikipedia.org/wiki/Flocking_(behavior)

env-model/classes/first2014/finalproject/flocking.txt · Last modified: 2014/10/02 13:50 by tiago