Populations class, available in: Global contextManages all Creature objects in the experiment, organized in one or more groups.
You can iterate directly over Population objects in the Populations collection using for(...in...) loops:
    for(var pop in Populations) Simulator.print(pop.name);

Before version 4.0rc4 some operations could only be performed on the "selected" creature (the one pointed to by group/creature fields in Populations). Currently, the more convenient and recommended way is to call Creatures's functions that operate directly on the passed objects.

The old way:
    Populations.group=0;
    Populations.creature=0;
    GenePools.getFromCreature();
    GenePools.copyTo(0);

Doing the same the new way:
    Genotype.newFromCreature(Populations[0][0]).moveTo(GenePools[0]);

See also: Creature, Population.
This class has 15 members:
sdleiF
int creatureselected creatureDeprecated. Pass creature object to functions needing it, instead of the old "first select, then call" approach.
int groupselected groupIndex of the currently selected group (Population).
Deprecated. Pass creature object to functions needing it, instead of the old "first select, then call" approach.
object iterator ROiterator
int size RONumber of groups
snoitcnuF
function addGroup(string name)returns PopulationAdds a new population.
function clear()doesn't return a valueRemoves all populations except the first one.
function clearGroup(int index)doesn't return a valueDeprecated.
Use Populations[pop_index].clear() instead of Populations.clearGroup(pop_index);
function creatBBCollisions(int mask)returns intChecks approximate collisions for the selected creature.
Returns the collision mask calculated as ( creature.selfmask & other_creatures.othermask ).
Passing non-zero argument is equivalent to setting a temporary selfmask for the current creature.

Deprecated. Use Creature.boundingBoxCollisions()
function createFromGenotype()returns CreatureUses the selected Genotype object.
function createFromString(string genotype)returns CreatureUses the supplied string argument.
function deleteGroup(int index)doesn't return a valueRemoves a population.
function deleteSelected()doesn't return a valueApplies to the selected Creature.
function findCreatureAt(Vector point, Vector vector)returns CreatureFind creatureReturns the first Creature object colliding with the line defined by the supplied starting point and the vector. For the purpose of this function, "collision" means "passing closer than 1.0 from any of the Creature's Parts".
Note that a screen point corresponds to a 3D line going through the screen surface; if you want to identify the object under the mouse cursor, you can use this function because finding an object at a given screen coordinates can be a special case of finding the line-with-object collision.
function get(int index)returns Population
function killSelected()doesn't return a valueApplies to the selected Creature.
Global context