## MASON-INTEREST-L@LISTSERV.GMU.EDU

 Options: Use Proportional Font Show HTML Part by Default Show All Mail Headers Message: [<< First] [< Prev] [Next >] [Last >>] Topic: [<< First] [< Prev] [Next >] [Last >>] Author: [<< First] [< Prev] [Next >] [Last >>]

 Subject: Re: Flocking in Non-Toroidal Space From: Russell Thomas <[log in to unmask]> Reply To: MASON Multiagent Simulation Toolkit <[log in to unmask]> Date: Sat, 24 Aug 2013 19:38:35 -0700 Content-Type: multipart/alternative Parts/Attachments: text/plain (2252 bytes) , text/html (2918 bytes)
```I¹ve created a model of foraging over a gradient landscape that is
bounded/flat, not a torus, and I found a workable solution.

Define your 2D space so that it has a ³buffer zone² around the outside.
When ever one of your agents detects that it is in the ³buffer zone², it
should activate a special set of navigation rules ‹ maybe called ³reversal²
-- where it pivots around and returns on the same path (with a loop, or
other curvature, or what ever seems natural).  You could also have a
³reverse-through-reflection² algorithm where the agent returns to the main
area on the same angle that it entered the buffer zone.  This would minimize
edge effects, but not eliminate them completely.  Finally, you could have a
³reverse erratically² where some random combinations of reversing maneuvers
are tried until the agent is no longer in the ³buffer zone².

In these special algorithms, you¹d have collision avoidance, but no other

The advantage of this approach is that you use the normal flocking
algorithms as long as agents are inside the main zone, and outside of the
main zone you no longer attempt to do any flocking but instead focus on
turning around.  This approach is consistent with ³situated cognition², by
the way.

What you should see is normal flocking behavior within the main zone, and
then some algorithm-specific behavior in the ³buffer zone² as agents turn
around and then re-flock.

Hope this helps.

Russ

> Hi,
>
> I am looking at flocking properties in MASON's Flockers implementation
>
> I am interested in Flocking in a bounded, or Non-Toroidal, space.  I coded a
> wall avoidance vector that, once within an agents' neighborhood, repulses with
> the square inverse of the distance to the wall.  This negatively impacts
> flocking - there tend to be more, smaller flocks, and more agents not apart of
> a flock, because flocks break up when they hit the wall
>
> Are there other ways to implement a bounded area, or wall avoidance?  Ways
> that reduce fragmentation or don't effect flocking?
>
> Are Flockers and related BOIDS typically implemented in toroidal space for
> this very reason?
>
> Thanks, Ryan
>

```