Here are the steps to create a new algorithm.
- Create your
CustomAlgorithmandCustomAlgorithmConfigfollowing the example inalgorithms/customalgorithm.py. These will be the algorithm code and an associated dataclass to validate loaded configs. - Create a
customalgorithm.yamlwith the configuration parameters you defined in your script. Make sure it hascustomalgorithm_configwithin its defaults at the top of the file to let hydra know which python dataclass it is associated to. You can seeconf/algorithm/customalgorithm.yamlfor an example. - Place your algorithm script in
benchmarl/algorithmsand your config inbenchmarl/conf/algorithm(or any other place you want to override from) - Add
{"customalgorithm": CustomAlgorithmConfig}to thebenchmarl.algorithms.algorithm_config_registry - Load it with
python benchmarl/run.py algorithm=customalgorithm task=...