Philipp Altmann

Philipp Altmann

research

Emergence in Multi-Agent Systems

Implementations accompanying research on a safety persepective on emergence in multi-agent systems and mitigation techniques.

Emergence in Multi-Agent Systems: A Safety Perspective

[Expand]
EMAS Conceptual Process Model

This is the code for the experiments of our paper. The experiments are build on top of the EDYS environment, which we developed specifically for studying emergent behaviour in multi-agent systems. This environment is versatile and can be configured in various ways with different degrees of complexity.

Setup

[Expand]
  • Set up a virtualenv with python 3.10 or higher. You can use pyvenv or conda for this.
  • Run pip install -r requirements.txt to get requirements.
  • In case there is no study_out/ folder in the root directory, create one.
  • Results

    [Expand]
    Emergent Behavior Mitigated Emergence
    coin-quadrant Emergent Chasing Cooperative Behavior
    two-rooms Emergent Blocking Coordinated Behavior

    Rerunning the Experiments

    [Expand]

    The respective experiments from our paper can be reenacted in main.py. Just select the method representing the part of our experiments you want to rerun and execute it via the __main__ function.

    Further Remarks

    [Expand]
  • We use config files located in the configs/ and the multi_agent_configs/, single_agent_configs/ folders to configure the environments and the RL algorithm for our experiments, respectively. You don't need to change anything to rerun the experiments, but we provided some additional comments in the configs for an overall better understanding of the functionalities.
  • The results of the experiment runs are stored in study_out.
  • We reuse the coin-quadrant implementation of the RL agent for the two_rooms environment. The coin assets are masked with flags in the visualization. This masking does not affect the RL agents in any way.
  • The code for the cost contortion for preventing the emergent behavior of the TSP agents can be found in algorithms/static/contortions.py.
  • The functionalities that drive the emergence prevention mechanisms for the RL agents is mainly located in the utility methods get_ordered_coin_piles (line 94) (for solving the emergence in the coin-quadrant environment) and distribute_indices (line 171) (mechanism for two_doors), that are part of algorithms/marl/utils.py.
  • algorithms/agent_models/ contains the parameters of the trained models for the RL agents. You can repeat the training by executing the training procedures in main.py. Alternatively, you can use your own trained agents, which you have obtained by modifying the training configurations in algorithms/marl/single_agent_configs/, for the evaluation experiments by inserting the names of the run folders, e.g. run9 and run 12, into the list in the methods coin_quadrant_multi_agent_rl_eval and two_rooms_multi_agent_rl_eval in algorithms/marl/RL_runner.py.
  • Acknowledgments

    [Expand]

    This work was funded by the Bavarian Ministry for Economic Affairs, Regional Development and Energy as part of a project to support the thematic development of the Institute for Cognitive Systems.

    Citation

    [Expand]

    When using this repository you can cite it as:

    @inproceedings{altmann2024emergence,
      title = {Emergence in Multi-Agent Systems: A Safety Perspective},
      author = {Philipp Altmann and Julian Schönberger and Steffen Illium and Maximilian Zorn and Fabian Ritz and Tom Haider and Simon Burton and Thomas Gabor},
      booktitle = {Leveraging Applications of Formal Methods, Verification and Validation. Rigorous Engineering of Collective Adaptive Systems},
      series = {ISoLA '24},
      year = {2024},
      pages = {104--120},
      publisher = {Springer Nature},
      doi = {10.1007/978-3-031-75107-3_7},
    }
    
    , ,, in , , in vol. no. , pp. , . . [Code] [PDF] [Preprint]