Document: SCL: An Artificial Chemistry in Swarm

next 3.3 Reactions
up 3 Overview of the SCL Implementation
gif 3.1 Space and Time

3.2 Motion

Motion for all particle classes follows the same general strategy. In essence, particles undergo random walks in the space. The relative rates of movement for the different particle classes are controlled by user configurable parameters.

Note that, on any given timestep, each particle gets exactly one opportunity to be the primary particle of a movement; but it will also get several (actually four) opportunities to act as the secondary particle of a movement.

In more detail, movement takes place as follows:

  1. Firstly, particles may, at any given time, be either mobile or immobile. The exact circumstances governing this are class specific. However, for all classes, once a particle moves, it then becomes immobile for the remainder of that timestep. That is, no particle may move more than once within a single timestep.

  2. Assuming a given primary particle is mobile, a neighboring cell is chosen at random from the von Neumann neighborhood. The particle in this cell is then the secondary particle--a candidate for swapping with the target particle.[3] The mobility status of this candidate particle is checked.

  3. Assuming that the neighboring particle is also mobile, a bernoulli random variable (biased coin toss) is evaluated to determine whether to proceed with the swap or not. The probability parameter used in this evaluation thus allows control of the relative rates of movement.

    In an earlier implementation of SCL, this probability of movement was simply a parameter of the class of the primary particle. However, this is not completely satisfactory because a particle may move as a result of being a primary particle or as a secondary particle--and, on that original scheme, the probabilities in the two cases, for the same two particles, could be different, which is somewhat counter-intuitive.

    In SCL v0.04 each particle class still has a class specific mobility parameter, called the MobilityFactor. But rather than simply taking the probability to be the MobilityFactor of the primary particle class, it is calculated as the geometric mean of the MobilityFactor parameters for the classes of the primary and secondary particles. This means that the probability is always the same for swapping particles of any two particular classes, regardless of which is primary and which is secondary. Further, by using the geometric (rather than, say, arithmetic) mean, we ensure that if the MobilityFactor is set to zero for either class, then the overall probability is guaranteed to be zero. Finally, of course, if the MobilityFactor for both classes is the same, then this just is the probability of the particular swap.

    Note that the primary reason for introducing the H particle class was so that this movement strategy could be applied uniformly. The alternative would be that holes in the space would be represented by positions with no object present at all (i.e. the Objective-C nil object pointer)--but then there would be no corresponding MobilityFactor and nothing to ``swap'' with either. While using explicit H particles instead presumably involves some performance penalty, I considered this worthwhile in order to keep the implementation simpler and more consistent.

  4. Assuming that the bernoulli random variable evaluates as YES, the two particles swap position. Both then become immobile for the remainder of that timestep.

L particles with one or more bonds are always immobile. This is a very strong restriction on the model. It was present in the original model of Varela et al. and is retained here. The presumed reason for this restriction is to avoid the rather complicated issue of what should happen to a bond (and the L particle at its other end) if a bonded L particle is allowed to move.



next 3.3 Reactions
up 3 Overview of the SCL Implementation
gif 3.1 Space and Time

Document: SCL: An Artificial Chemistry in Swarm

Copyright © 1997 All Rights Reserved.
Timestamp: Tue Dec 31 19:40:38 GMT 1996

mcmullin@eeng.dcu.ie