-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ed7364
commit ee9c6ad
Showing
4 changed files
with
99 additions
and
13 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
abm/data/metaprotocol/experiments/archive/docker_exp_madrl.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
""" | ||
Experiment file using the MetaRunner interfacing language to define a set of criteria for batch simulations | ||
Title: Experiment 1 | ||
Goal: Understand the balance of social vs individual excitablility in fixed environment | ||
Defined by: mezdahun and DominikDeffner @ github | ||
""" | ||
from abm.metarunner.metarunner import Tunable, Constant, MetaProtocol | ||
|
||
# Defining fixed criteria for all automized simulations/experiments | ||
fixed_criteria = [ | ||
Constant("USE_IFDB_LOGGING", 1), | ||
Constant("SAVE_CSV_FILES", 1), | ||
Constant("WITH_VISUALIZATION", 0), # how does the simulation speed scale with N | ||
Constant("TELEPORT_TO_MIDDLE", 0), | ||
Constant("GHOST_WHILE_EXPLOIT", 1), | ||
Constant("PATCHWISE_SOCIAL_EXCLUSION", 1), | ||
Constant("POOLING_TIME", 0), | ||
Constant("MOV_EXP_VEL_MIN", 1), | ||
Constant("MOV_EXP_VEL_MAX", 1), | ||
Constant("MOV_REL_DES_VEL", 1), | ||
Constant("SHOW_VISUAL_FIELDS", 0), | ||
Constant("SHOW_VISUAL_FIELDS_RETURN", 0), | ||
Constant("SHOW_VISION_RANGE", 0), | ||
Constant("ENV_WIDTH", 600), | ||
Constant("ENV_HEIGHT", 600), | ||
Constant("VISUAL_FIELD_RESOLUTION", 1200), | ||
Constant("VISUAL_EXCLUSION", 1), | ||
Constant("VISION_RANGE", 1000), | ||
Constant("AGENT_FOV", 0.5), # what is in the VR experiment and how we can control this? | ||
Constant("AGENT_CONSUMPTION", 1), | ||
Constant("RADIUS_AGENT", 10), | ||
Constant("RADIUS_RESOURCE", 40), | ||
Constant("MIN_RESOURCE_QUALITY", 0.1), | ||
Constant("MAX_RESOURCE_QUALITY", 0.1), | ||
Constant("MIN_RESOURCE_PER_PATCH", 100), | ||
Constant("MAX_RESOURCE_PER_PATCH", 101), | ||
Constant("MOV_EXP_TH_MIN", -0.25), | ||
Constant("MOV_EXP_TH_MAX", 0.25), | ||
Constant("MOV_REL_TH_MAX", 0.5), | ||
Constant("CONS_STOP_RATIO", 0.1), | ||
Constant("REGENERATE_PATCHES", 1), | ||
Constant("REGENERATE_PATCHES", 5000), | ||
Constant("DEC_FN", 0.5), | ||
Constant("DEC_FR", 0.5), | ||
Constant("DEC_TAU", 10), | ||
Constant("DEC_BW", 0), | ||
Constant("DEC_WMAX", 1), | ||
Constant("DEC_BU", 0), | ||
Constant("DEC_UMAX", 1), | ||
Constant("DEC_GW", 0.085), | ||
Constant("DEC_GU", 0.085), | ||
Constant("DEC_TW", 0.5), | ||
Constant("DEC_TU", 0.5), | ||
Constant("T", 100), | ||
] | ||
|
||
criteria_exp_changing = [ | ||
Constant("N", 3), | ||
Tunable("DEC_EPSW", values_override=[0.25, 0.5]), | ||
Tunable("DEC_EPSU", values_override=[0.5, 0.6]), | ||
Constant("DEC_SWU", 0), | ||
Constant("DEC_SUW", 0), | ||
Constant("N_RESOURCES", 1) | ||
] | ||
|
||
# Creating metaprotocol and add defined criteria | ||
description_text = "Experiment N run with Docker\n" \ | ||
"\n" \ | ||
"In this experiment we would like to see\n" \ | ||
"...\n" \ | ||
"\n" \ | ||
"and how..." | ||
mp = MetaProtocol(experiment_name="DockerTest2", num_batches=1, | ||
parallel=False, description=description_text, | ||
headless=True) | ||
for crit in fixed_criteria: | ||
mp.add_criterion(crit) | ||
for crit in criteria_exp_changing: | ||
mp.add_criterion(crit) | ||
|
||
# Generating temporary env files with criterion combinations. Comment this out if you want to continue simulating due | ||
# to interruption | ||
mp.generate_temp_env_files() | ||
|
||
# Running the simulations | ||
mp.run_protocols() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters