Config Specification

Last modification on 2019-02-09

Introduction

This document explains the structure and usage of config files used in Ecosim, specifies the parameters required for a valid config file, and provides an example file.

Key Terms and Concepts

TermDescription
AttributesCharacteristics which affect behaviours of agents
BreedA group of agents which share similar attributes
DummyAn agent group that is only spawned to provide food to others
MemberAn agent belonging to a specific breed or group
ParameterValues provided from the config file which represent attributes
PlaintextA simple ASCII file
SpawnCreation of an agent

Overview

Ecosim needs a config file to be able to load the initial agents when the simulation is first ran. This file specifies the various agent groups and their attributes, as well as how many members of each group to spawn.

The file itself should be written in plaintext, with each value separated by a comma, then a space. Each agent group should be on a new line, and every parameter should be satisfied with the correct datatype.

Config File Structure

Config ParameterTypeRangeDescription
agent_idint0 to 512Id number of agent group
g_confidencefloat-1 to 1Confidence/fear of the agent group
g_metabolismfloat-1 to 1Metabolism rate of the agent group
d_livingfloat0 to 1Living entity food preference of the agent group
d_nonlivingfloat0 to 1Non-living entity food preference of the agent group
f_masterfloat0 to 1How much influence flocking has on the agent group
f_influencefloat0 to 1How much pull a flock has on an agent of the group
f_proximityfloat0 to 1The distance maintained between this group's agents in a flock
f_velocityfloat0 to 1The amount of effect the flock's velocity has on an agent of the group
s_countint0 - 512How many agents from this group are spawned when the simulation is loaded
s_stateint0 to 1The state of the agent group once spawned
For more information on how these parameters affect agent behaviour, please see the agent specification.

Sample Config File

Below is a sample config file:
# Sample ecosimrc config file for Ecosim
# Ensure a single space is used between attributes
# agent_id, g_confidence, g_metabolism, d_living, d_nonliving, f_master, f_influence, f_proximity, f_velocity, s_count, s_state
0, 0.8, 0.3, 0.7, 0.1, 0.0, 0.0, 0.0, 0.0, 100, 1
1, 0.2, 0.5, 0.0, 0.9, 0.5, 0.6, 0.3, 0.6, 200, 1
3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100, 0
This config creates three entity groups:
  1. A confident slow moving breed, which consumes other living entities. 100 of these agents are spawned
  2. A fast moving, flocking breed which only consumes non-living agents. 200 of these agents are spawned
  3. A dummy agent group. These "agents" spawn as non-living entities, as food for group 2. 100 of these agents are spawned