sierra.plugins.platform.argos.variables.constant_density

  • ConstantDensity: Defines common functionality for all constant-density classes.

class sierra.plugins.platform.argos.variables.constant_density.ConstantDensity(cli_arg: str, main_config: Dict[str, Any], batch_input_root: Path, target_density: float, dimensions: List[ArenaExtent], scenario_tag: str)[source]

Defines common functionality for all constant-density classes.

Constant density = SOMETHING/arena size is held constant as arena size is increased. This class is a base class which should NEVER be used on its own.

target_density

The target density.

dimensions

List of (X,Y) dimensions to use (creates rectangular arenas).

scenario_tag

A scenario tag (presumably part of –scenario) to use to generate scenario names.

changes

List of sets of changes to apply to generate the specified arena sizes.

Inheritance

Inheritance diagram of ConstantDensity
__doc__ = 'Defines common functionality for all constant-density classes.\n\n    Constant density = SOMETHING/arena size is held constant as arena size is\n    increased. This class is a base class which should NEVER be used on its own.\n\n    Attributes:\n\n        target_density: The target density.\n\n        dimensions: List of (X,Y) dimensions to use (creates rectangular\n                    arenas).\n\n        scenario_tag: A scenario tag (presumably part of `--scenario`) to use to\n                      generate scenario names.\n\n        changes: List of sets of changes to apply to generate the specified\n                 arena sizes.\n\n    '
__init__(cli_arg: str, main_config: Dict[str, Any], batch_input_root: Path, target_density: float, dimensions: List[ArenaExtent], scenario_tag: str) None[source]
__module__ = 'sierra.plugins.platform.argos.variables.constant_density'
exp_scenario_name(exp_num: int) str[source]

Given the exp number in the batch, compute a parsable scenario name.

It is necessary to query this criteria after generating the changelist in order to create generator classes for each experiment in the batch with the correct name and definition in some cases.

Normally controller+scenario are used to look up all necessary changes for the specified arena size, but for this criteria the specified scenario is the base scenario (i.e., the starting arena dimensions), and the correct arena dimensions for a given exp must be found via lookup with THIS function).