Skip to main content

A framework to research MARL agents in various setings.

Project description

EDYS

Tackling emergent dysfunctions (EDYs) in cooperation with Fraunhofer-IKS

Setup

Just install this environment by pip install marl-factory-grid.

First Steps

Quickstart

Most of the env. objects (entites, rules and assets) can be loaded automatically. Just define what your environment needs in a yaml-configfile like:

Example ConfigFile General: level_name: rooms env_seed: 69 verbose: !!bool False pomdp_r: 5 individual_rewards: !!bool True
Entities:
    Defaults: {}
    Doors:
        closed_on_init: True
        auto_close_interval: 10
        indicate_area: False
    Destinations: {}

Agents:
    Wolfgang:
        Actions:
            - Move8
            - Noop
            - DoorUse
            - ItemAction
        Observations:
            - All
            - Placeholder
            - Walls
            - Items
            - Placeholder
            - Doors
            - Doors
    Armin:
        Actions:
            - Move4
            - ItemAction
            - DoorUse
        Observations:
            - Combined:
                - Agent['Wolfgang']
                - Walls
                - Doors
                - Items
Rules:
    Defaults: {}
    WatchCollisions:
        done_at_collisions: !!bool True
    ItemRespawn:
        spawn_freq: 5
    DoorAutoClose: {}

Assets:
- Defaults
- Items
- Doors

Have a look in \quickstart for further configuration examples.

Make it your own

Levels

Varying levels are created by defining Walls, Floor or Doors in .txt-files (see ./environment/levels for examples). Define which level to use in your configfile as:

General:
    level_name: rooms  # 'double', 'large', 'simple', ...

... or create your own , maybe with the help of asciiflow.com. Make sure to use # as Walls, - as free (walkable) Floor-Tiles, D for Walls. Other Entites (define you own) may bring their own Symbols

Entites

Entites, either Objects for tracking stats or env. Entity which can interact. Abstract Entities are provided.

Groups

Groups are entity Sets that provide administrative access to all group members. All Entites are available at runtime as EnvState property.

Rules

Rules define how the environment behaves on microscale. Each of the hookes (on_init, pre_step, on_step, 'post_step', on_done) provide env-access to implement customn logic, calculate rewards, or gather information.

Hooks

Results provide a way to return rule evaluations such as rewards and state reports back to the environment.

Assets

Make sure to bring your own assets for each Entity living in the Gridworld as the Renderer relies on it. PNG-files (transparent background) of square aspect-ratio should do the job, in general.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Marl-Factory-Grid-0.2.3.tar.gz (522.3 kB view details)

Uploaded Source

Built Distribution

Marl_Factory_Grid-0.2.3-py3-none-any.whl (262.5 kB view details)

Uploaded Python 3

File details

Details for the file Marl-Factory-Grid-0.2.3.tar.gz.

File metadata

  • Download URL: Marl-Factory-Grid-0.2.3.tar.gz
  • Upload date:
  • Size: 522.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Marl-Factory-Grid-0.2.3.tar.gz
Algorithm Hash digest
SHA256 13cb4d7bfd04625f07fe82d5783c55eec444b6d7a5c6e3626960fea654cb606f
MD5 2727678b847239994a8aa2b5d98a81a5
BLAKE2b-256 093947bc2199ef100bc2206b235d7901aab8e381575edff7635445279958671a

See more details on using hashes here.

File details

Details for the file Marl_Factory_Grid-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for Marl_Factory_Grid-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f0613859263dcda11f0d4933dd4955c353ad3e163783ff085e19df49e6fe6f0f
MD5 3bd2dd7d0dad3a1b8ba6d46fac62b5de
BLAKE2b-256 40f5037f3f70b75ca489792182236edfbbf4083afd5a6ece0784e3f3884f137e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page