Page last edited 1,804 days 23 hours ago
From COG Docs
Jump to: navigation, search

A distribution Setting defines a range of possible values for some numerical parameter. A random value is chosen from the range each time the parameter is used.

Shorthand for a setting is

avg ± range (type)

For example: 32 ± 16 (uniform). The range and type can be omitted if they are 0 and uniform, respectively.

A <Setting> element defines a setting, and has four attributes:

Attribute Description
name The setting name. Each algorithm has a different list of valid setting names.
avg The average value for the setting.
range The maximum deviation from the average (up or down). A range of zero means that the average value will always be used.
type The statistical distribution to use.
  • uniform setting values are picked evenly throughout the range.
  • normal setting, values are picked using a gaussian bell-curve, so that values close to the average are more likely to be chosen than values near the extremes.

The name attribute is required. The other attributes are optional and default to the inherited value. For example:

<Veins name="A">  
  <!-- This 'MotherlodeHeight' setting will have a random value between 24 - 40 -->
  <Setting name='MotherlodeHeight' avg='32' range='8' type='uniform'/>

<Veins inherits="A">
  <!-- This 'MotherlodeHeight' setting inherits the range and type from "A" -->
  <!-- It will have a random value between 56 - 72 -->
  <Setting name='MotherloadHeight' avg='64'/>