Loop Functions XML Configuration

The following root XML tags are defined under <loop_functions>:

Root XML Tag

Mandatory For?

Description

output

All

See COSM docs.

convergence

None

See COSM docs.

arena_map

All

See COSM docs.

temporal_variance

None

See COSM docs.

visualization

None

See COSM docs.

oracle_manager

None

See COSM docs.

caches

Depth1, depth2 controllers

Parameters for the use of caches in the arena.

Any of the following attributes can be added under the metrics tag in place of one of the <append>,<create>,<truncate> tags, in addition to the ones specified in COSM. Not defining them disables metric collection of the given type.

Extend the temporal variance capabilities in COSM with caches:

temporal_variance/env_dynamics/caches

  • Required by: none.

  • Required child attributes if present: none.

  • Required child tags if present: none.

  • Optional child attributes: none.

  • Optional child tags: [ usage_penalty ].

XML configuration:

<temporal_variance>
    ...
    <caches>
        <usage_penalty>
        ...
        </usage_penalty>
    </caches>
    ...
</temporal_variance>

temporal_variance/caches/usage_penalty

  • Required by: none.

  • Required child attributes if present: none.

  • Required child tags if present: waveform.

  • Optional child attributes: none.

  • Optional child tags: none.

XML configuration:

<caches>
    ...
    <usage_penalty>
    <waveform>
        ...
    </waveform>
    </usage_penalty>
    ...
</caches>
  • waveform - Parameters defining the waveform of cache usage penalty (picking up/dropping).

Extend the arena map capabilities in COSM with caches:

arena_map/caches

  • Required by: [depth1, depth2 controllers].

  • Required child attributes if present: [ dimension, strict_constraints ].

  • Required child tags if present: none.

  • Optional child attributes: none.

  • Optional child tags: [ static, dynamic ].

XML configuration:

<arena_map>
    ...
    <caches
        dimension="FLOAT"
        strict_constraints="true">
        <static>
            ...
        </static>
        <dynamic>
            ...
        </dynamic>
    </caches>
    ...
</arena_map>
  • dimension - The dimension of the cache. Should be greater than the dimension for blocks.

  • strict_constraints - If true, then created caches will not be checked for overlap with block clusters in the arena after creation (this happens in non-error contexts with static caches and RN block distributions, for example). Other sanity checks will still be performed and appropriate error messages issued; however, an “OK” return code will always be returned.

    For dynamic cache creation, if true, cache creation will be strict, meaning that any caches that fail validation after creation will be discarded. This can happen because when robots select cache sites they only consider the distance between the center of existing caches/blocks/nests/etc, and do not take the extent into consideration. Depending on what the values of the various proximity constraints robots use when searching for a cache site, validation can fail after cache creation.

    For dynamic cache creation, if false, then dynamically created caches will be kept regardless if they violate constraints or not, which MIGHT be OK, or MIGHT cause issues/segfaults. Provided as an option so that it will be possible to more precisely duplicate the results of papers run with earlier versions of FORDYCA which had more bugs.

    For static cache creation, caches are never discarded; however if one or more caches fail validation after creation, an assert will be triggered if set to true.

    Default if omitted: true.

arena_map/caches/static

  • Required by: [depth1 controllers].

  • Required child attributes if present: [ enable ].

  • Required child tags if present: none.

  • Optional child attributes: [ size, respawn_scale_factor ].

  • Optional child tags: none.

XML configuration:

<caches>
    ...
    <static
        enable="false"
        size="INTEGER"
        respawn_scale_factor="FLOAT"/>
    ...
</caches>

This tag is required for depth1 loop functions. If the tag is present, only the enable attribute is required; all other attributes are parsed iff enable is true.

  • enable - If true, then a single static cache will be created in the center of the arena. The cache will be replenished by the loop functions if robots deplete it, under certain conditions.

  • size - The number of blocks to use when (re)-creating the static cache. Must be >= 2.

  • respawn_scale_factor - A scale factor controlling how quickly the probability of static cache respawn will grow once the conditions for respawning are met.

arena_map/caches/dynamic

  • Required by: [depth2 controllers].

  • Required child attributes if present: enable.

  • Required child tags if present: none.

  • Optional child attributes: [ min_dist, min_blocks, robot_drop_only ].

  • Optional child tags: none.

XML configuration:

<caches>
    ...
    <dynamic
        enable="false"
        min_dist="FLOAT"
        min_blocks="INTEGER"
        robot_drop_only="false" />
    ...
</caches>
  • enable - If true, then the creation of dynamic caches will be enabled.

  • min_dist - The minimum distance between blocks to be considered for cache creation from said blocks.

  • min_blocks - The minimum # of blocks that need to within min_dist from each other to trigger dynamic cache creation.

  • robot_drop_only - If true, then caches will only be created by intentional robot block drops rather than drops due to abort/block distribution after collection. Default if omitted: false.