Skip to content

CSV Batch Experiments

JD edited this page Apr 8, 2023 · 5 revisions

CSV Batch Experiments

By generating a CSV-file, via the Python script mentioned below, containing multiple rows of parameters (therefore each of them a different experiment) used in the project, APGG is able to execute this batch of experiments without human supervision. Every row written in the csv results in a separate experiment with different parameters and logic components. This approach, however, also works (and is recommended) when running APGG for a single run. A example of a valid CSV is included in the project files. See the ConfigValues documentation for details.

The current version of the system needs no specific order of config values in the csv file. Every class that is configurable will request the needed values from the current config object on it´s own in every experiment.

After running this script a setup.npy file will be generated. This file can be ignored but not deleted, as it will be used for plotting later on.

Generate a config

APGG has a python script, which allows an easy config CSV-file generation.

Just open the buildConfig.py script in the build folder and edit the parameters. If you want to iterate over a specific value (e.g. synergyFactor), you can use

    addIteration('parameter', from, to, stepsize) #example beloww

If you want to iterate over multiple values, you can combine multiple addIteration calls

    addIteration('synergyFactor', 3.0, 6.0, 0.5) #From, To, StepSize
    addIteration('payoffIndividualism', 0.0, 1.0, 0.2) #From, To, StepSize

This will result in a config, which will look like the following one

  • synergyFactor 3.0
    • payoffIndividualism 0.0
    • payoffIndividualism 0.2
    • payoffIndividualism 0.4
    • ...
    • payoffIndividualism 1.0
  • synergyFactor 3.5
    • payoffIndividualism 0.0
    • payoffIndividualism 0.2
    • payoffIndividualism 0.4
    • ...
    • payoffIndividualism 1.0
  • ...

After editing the file, double click on the script to generate the config