Flock Mac

CS 420/527 — Biologically InspiredComputation
NetLogo Simulation

This page was automatically generated by NetLogo 4.1.Questions, problems? Contact feedback@ccl.northwestern.edu.

Flock -sxun -w timeout fd Description. This utility manages flock(2) locks from within shell scripts or the command line. The first and second forms wraps the lock around the executing a command, in a manner similar to su(1) or newgrp(1). It locks a specified file or directory, which is created (assuming appropriate permissions), if it does. Flock is designed to streamline and emphasize how you interface with social networking sites, RSS and media feeds, and blogs. Because it's built on Firefox 3, its behavior will feel familiar.

The applet requires Java 5 or higher.Java must be enabled in your browser settings.Mac users must have Mac OS X 10.4 or higher.Windows and Linux users may obtain the latest Java fromSun'sJava site. If the display appear cut off with Firefox, thentry another browser (Safari works).


powered byNetLogo

view/download model file:Flock.nlogo

WHAT IS IT?

Slack Macros

This project is an attempt to simulate the coordinated motionof a group of individuals such as fish in a school, or birds in aflock. Each bird follows a simple rule, and the flock as a whole moveswithout any leader. A bird adjusts its flight based on the positionand/or heading of its three nearest neighbors; this adjustment ispartitioned into three zones:

1) Repel range. A bird moves away from neighbors that are tooclose.

2) Direction range. A bird aligns with neighbors that are acomfortable distance away (i.e., it attempts to match the neighbor'sheading.)

3) Position range. A bird moves towards neighbors that are faraway.

A bird adjusts its heading towards a vector sum of the'target' headings that these would imply for each neighbor; theinfluences of birds are weighted by the inverse of distance, such thatclose birds are more influential than distant ones.

In addition, a bird will accelerate slightly for each neighborin front of it and in the position range; it will decelerate slightlyfor each neighbor that is behind it and in the position range. Thisallows trailing birds to catch up with the flock and leading birds toslow down without turning around. All birds also have a blind spot (thedefault is 30 degrees) directly behind them, in which they cannot sensethe presence of other birds.

For the sake of simplicity, birds reflect off of obstacles aslight would reflect off of a mirror. Though this is not necessarilyrealistic, it adds variety to the simulation by forcing the birds tocontinually adapt the flocking structure to outside influences.


Flock Machine Map For Build Machine

HOW TO USE IT

The RESET_BOARD button erases all obstacles that have beendrawn and restores the edge boundary.

The RESET_TURTLES button creates the specified number of birdsand places them in black cells on the board.

The GO button executes the flocking rules described above; onebutton executes a step at a time and the other runs continuously.

Machine

The MAKE_OBSTACLES and REMOVE_OBSTACLES buttons allow you tomake obstacles that the birds must avoid, and to remove them.

The OBSTACLES_TRANSPARENT and OBSTACLES_OPAQUE buttons togglethe way birds perceive obstacles in the middle of the screen. Afterselecting obstacles_transparent, birds can still see neighbors that areon the opposite side of an obstruction. Selecting obstacles_opaque(which is done by default in the reset_birds procedure) causesobstacles to block the birds' line of sight and hide neighbors that arebehind obstacles. The step by step go button should be used whenobstacles are opaque, because no attempt is made to synchronize theturtles' execution of commands when they are looking for obstacles.

The NUMBER slider sets the number of birds in the simulation.

The REPEL_RANGE, DIR_RANGE, and POS_RANGE sliders control theouter limits of each of these zones. The relative sizes must bemaintained for the program to function properly (i.e. repel_range< dir_range < pos_range.)

The NOISE slider determines the maximum random adjustment thata bird could make to its heading in a single time step.

The FLEXIBILITY slider controls how completely a bird adjustsits heading to the calculated target. A flexibility of zero would causea bird to maintain straight-line motion (excluding walls and randomturns), while a flexibility of 100 represents instantaneous adjustmentto the influences of the three closest neighbors.


THINGS TO NOTICE

Obstacles can easily be created in the center of the screen byusing the MAKE_OBSTACLE button; the flock remains quite cohesive whenconfronted with various shapes and sizes of obstacles. Cohesiveness isaffected by the parameters, in particular flexibility and noise.


CREDITS

Slack Mac Update

Modified for NetLogo by B.J. MacLennan, October 2007, fromoriginal version by William Thies on Scott Camazine's website.

Based on the Huth and Wissel (1992) model of fish schooling.


PROCEDURES

Return to CS 420/527 home page

Slack Mac App Store


Returnto MacLennan's home page
Sendmail to Bruce MacLennan / MacLennan@utk.edu
Thispage is web.eecs.utk.edu/~mclennan/Classes/420/NetLogo/Flock.html

Flock Machine For Sale

Last updated: 2010-11-17.