next up previous contents
Next: Collection of Energy Tokens Up: The Environment Previous: The Grid

   
Distribution of Energy Tokens

At the start of each time slice sweep across all of the cells in the population (in the routine DistributeEnergyTokens, described in Section 4.7), the Cosmos operating system releases a certain number of energy tokens into the environment. These tokens are then available to be collected by cells, by the use of the et_collect instruction. At the end of each time slice sweep (in the routine AttenuateEnvironmentalEnergy, also described in Section 4.7), the operating system takes a number of energy tokens away from each grid position. In the current implementation, different grid positions may receive different numbers of energy tokens at the beginning of each time slice sweep (determined by the various distribution schemes described below), but all positions have the same number of energy tokens removed at the end of each time slice sweep (specified by the parameter number_of_energy_tokens_per_grid_pos_per_sweep, if they have that number available). If the number of energy tokens received by a grid position in a time slice sweep exceeds the number removed from it, and they are not collected by cells during that sweep, the excess tokens remain there for future collection. A grid position may therefore sometimes accumulate a relatively large number of energy tokens (up to a maximum limit defined by the global parameter max_energy_tokens_per_grid_pos) if there is not much demand for them by cells in the locality.

The distribution of energy tokens across the grid may follow a number of different patterns, defined by the global parameter energy_distribution_scheme. At present, four such patterns are defined: land, sea, mixed and random. Note that the total number of energy tokens distributed to the environment at each time slice sweep is always specified by the product of the parameter number_of_energy_tokens_per_grid_pos_per_sweep with the number of squares in the grid. The different distribution schemes determine how many of these tokens are distributed to individual squares. The different schemes work as follows:

Land
 Each grid position receives a constant number of energy tokens from one time slice to the next. In the current implementation, there is one extra parameter, x_delta, associated with this sort of energy distribution, which defines the gradient of the distribution from the left-hand side of the grid to the right-hand side. See Figures 4.5(a) and 4.5(b) for examples of this type of distribution.
Sea
In contrast to land distribution, for sea distribution each grid position receives a varying number of energy tokens from one time slice to the next. During each time slice, energy tokens are distributed to grid positions which are located under a `wave'--a vertical band which moves one position to the right after each time slice: see Figure 4.5(c). Grid positions which are not located under a wave in the current time slice receive no energy tokens for that time slice. In the present implementation there are two parameters associated with this method; wave_width and number_of_waves. The former specifies the width, in grid positions, of a single wave, and the latter specifies how many waves are to be fitted in to the grid from left to right (the waves are evenly spaced across the grid).
Mixed
This is a mixture of land and sea distributions, with the top portion of the grid receiving energy according to the land distribution, and the bottom portion according to the sea distribution. The relative sizes of these top and bottom portions of the grid are determined by the global parameter land_fraction. An example is shown in Figure 4.5(d).
Random
Energy tokens are distributed in packets with size determined by the global parameter energy_distribution_random_chunk_size to randomly chosen grid positions, until the correct total number of energy tokens have been distributed. An example is shown in Figure 4.5(e).


  
Figure 4.5: Different Patterns of Energy Token Distribution.
\resizebox{0.9\textwidth}{!}{\includegraphics{graphs/cosmosdesc/distrib.eps}}

A multicellular organism may also pass energy tokens between its cells (using the et_transfer instruction), leading to the possibility of some of the cells specialising in energy token collection and distribution of these tokens to the other cells in the organism.

With such a system of CPU-time allocation, programs may potentially evolve which operate on a wide variety of time-scales. For example, very short programs may exist which quickly grab just enough energy tokens to make a copy of themselves, while much more complicated programs may coexist which gather large numbers of tokens over long periods of time, and reproduce at a much slower rate.

When a cell dies, any unused energy tokens are passed back to the local environment (where they may be collected by other organisms). This mechanism provides potential selection pressure for the evolution of organisms that kill other organisms in order to collect the energy tokens thus released into the environment. This could happen if, for example, an organism transmitted EnvironmentalInfoStrings containing the kill instruction, which another organism subsequently received and executed (see Sections 4.3.7 and 4.6.1 for further details of how this would work).


next up previous contents
Next: Collection of Energy Tokens Up: The Environment Previous: The Grid
Tim Taylor
1999-05-29