mettagrid


Namemettagrid JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://daveey.github.io
SummaryA fast grid-based open-ended MARL environment
upload_time2024-09-17 17:38:45
maintainerNone
docs_urlNone
authorDavid Bloomin
requires_python<4.0,>=3.10
licenseMIT
keywords puffergrid gridworld minigrid rl reinforcement-learning environment gym
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MettaGrid Environment

MettaGrid is a multi-agent gridworld environment for studying the emergence of cooperation and social behaviors in reinforcement learning agents. The environment features a variety of objects and actions that agents can interact with to manage resources, engage in combat, share with others, and optimize their rewards.

## Overview

In MettaGrid, agents navigate a gridworld and interact with various objects to manage their energy, harvest resources, engage in combat, and cooperate with other agents. The key dynamics include:

- **Energy Management**: Agents must efficiently manage their energy, which is required for all actions. They can harvest resources and convert them to energy at charger stations.
- **Resource Gathering**: Agents can gather resources from generator objects scattered throughout the environment.
- **Cooperation and Sharing**: Agents have the ability to share resources with other agents and use energy to power the heart altar, which provides rewards.
- **Combat**: Agents can attack other agents to temporarily freeze them and steal their resources. They can also use shields to defend against attacks.

The environment is highly configurable, allowing for experimentation with different world layouts, object placements, and agent capabilities.

## Objects

### Agent

<img src="https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_monsters/tg_monsters_astronaut_u1.png?raw=true" width="32"/>

The `Agent` object represents an individual agent in the environment. Agents can move, rotate, attack, and interact with other objects. Each agent has energy, resources, and shield properties that govern its abilities and interactions.

### Altar

<img src="https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_items/tg_items_heart_full.png?raw=true" width="32"/>

The `Altar` object allows agents to spend energy to gain rewards. Agents can power the altar by using the `use` action when near it. The altar has a cooldown period between uses.

### Converter

<img src="https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_items/tg_items_pda_A.png?raw=true" width="32"/>

The `Converter` object allows agents to convert their harvested resources into energy. Agents can use converters by moving to them and taking the `use` action. Each use of a converter provides a specified amount of energy and has a cooldown period.

### Generator

<img src="https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_fantasy/ore-0.png?raw=true" width="32"/>

The `Generator` object produces resources that agents can harvest. Agents can gather resources from generators by moving to them and taking the `use` action. Generators have a specified capacity and replenish resources over time.

### Wall

<img src="https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_fantasy/wall2-0.png?raw=true" width="32"/>

The `Wall` object acts as an impassable barrier in the environment, restricting agent movement.

## Actions

### Move / Rotate

The `move` action allows agents to move to an adjacent cell in the gridworld. The action has two modes: moving forward and moving backward relative to the agent's current orientation.

The `rotate` action enables agents to change their orientation within the gridworld. Agents can rotate to face in four directions: down, left, right, and up.

### Attack

The `attack` action allows agents to attack other agents or objects within their attack range. Successful attacks temporarily freeze the target and may allow the attacker to steal resources.

### Shield (Toggle)

The `shield` action turns on a shield. When the shield is active, the agent is protected from attacks by other agents. The shield consumes energy while active. Attack damage is subtracted from the agent's energy, rather than freezing the agent.

### Transfer

The `transfer` action enables agents to share resources with other agents. Agents can choose to transfer specific resources to another agent in an adjacent cell.

### Use

The `use` action allows agents to interact with objects such as altars, converters, and generators. The specific effects of the `use` action depend on the target object and can include converting resources to energy, powering the altar for rewards, or harvesting resources from generators.

## Configuration

The MettaGrid environment is highly configurable through the use of YAML configuration files. These files specify the layout of the gridworld, the placement of objects, and various properties of the objects and agents.


            

Raw data

            {
    "_id": null,
    "home_page": "https://daveey.github.io",
    "name": "mettagrid",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "puffergrid, gridworld, minigrid, rl, reinforcement-learning, environment, gym",
    "author": "David Bloomin",
    "author_email": "daveey@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/1b/74faa0fcf31853bc5f394063e8cb5aef920b04be7b4ee1dce426824a2526/mettagrid-0.0.3.tar.gz",
    "platform": null,
    "description": "# MettaGrid Environment\n\nMettaGrid is a multi-agent gridworld environment for studying the emergence of cooperation and social behaviors in reinforcement learning agents. The environment features a variety of objects and actions that agents can interact with to manage resources, engage in combat, share with others, and optimize their rewards.\n\n## Overview\n\nIn MettaGrid, agents navigate a gridworld and interact with various objects to manage their energy, harvest resources, engage in combat, and cooperate with other agents. The key dynamics include:\n\n- **Energy Management**: Agents must efficiently manage their energy, which is required for all actions. They can harvest resources and convert them to energy at charger stations.\n- **Resource Gathering**: Agents can gather resources from generator objects scattered throughout the environment.\n- **Cooperation and Sharing**: Agents have the ability to share resources with other agents and use energy to power the heart altar, which provides rewards.\n- **Combat**: Agents can attack other agents to temporarily freeze them and steal their resources. They can also use shields to defend against attacks.\n\nThe environment is highly configurable, allowing for experimentation with different world layouts, object placements, and agent capabilities.\n\n## Objects\n\n### Agent\n\n<img src=\"https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_monsters/tg_monsters_astronaut_u1.png?raw=true\" width=\"32\"/>\n\nThe `Agent` object represents an individual agent in the environment. Agents can move, rotate, attack, and interact with other objects. Each agent has energy, resources, and shield properties that govern its abilities and interactions.\n\n### Altar\n\n<img src=\"https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_items/tg_items_heart_full.png?raw=true\" width=\"32\"/>\n\nThe `Altar` object allows agents to spend energy to gain rewards. Agents can power the altar by using the `use` action when near it. The altar has a cooldown period between uses.\n\n### Converter\n\n<img src=\"https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_tiny_galaxy/tg_sliced/tg_items/tg_items_pda_A.png?raw=true\" width=\"32\"/>\n\nThe `Converter` object allows agents to convert their harvested resources into energy. Agents can use converters by moving to them and taking the `use` action. Each use of a converter provides a specified amount of energy and has a cooldown period.\n\n### Generator\n\n<img src=\"https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_fantasy/ore-0.png?raw=true\" width=\"32\"/>\n\nThe `Generator` object produces resources that agents can harvest. Agents can gather resources from generators by moving to them and taking the `use` action. Generators have a specified capacity and replenish resources over time.\n\n### Wall\n\n<img src=\"https://github.com/daveey/Griddly/blob/develop/resources/images/oryx/oryx_fantasy/wall2-0.png?raw=true\" width=\"32\"/>\n\nThe `Wall` object acts as an impassable barrier in the environment, restricting agent movement.\n\n## Actions\n\n### Move / Rotate\n\nThe `move` action allows agents to move to an adjacent cell in the gridworld. The action has two modes: moving forward and moving backward relative to the agent's current orientation.\n\nThe `rotate` action enables agents to change their orientation within the gridworld. Agents can rotate to face in four directions: down, left, right, and up.\n\n### Attack\n\nThe `attack` action allows agents to attack other agents or objects within their attack range. Successful attacks temporarily freeze the target and may allow the attacker to steal resources.\n\n### Shield (Toggle)\n\nThe `shield` action turns on a shield. When the shield is active, the agent is protected from attacks by other agents. The shield consumes energy while active. Attack damage is subtracted from the agent's energy, rather than freezing the agent.\n\n### Transfer\n\nThe `transfer` action enables agents to share resources with other agents. Agents can choose to transfer specific resources to another agent in an adjacent cell.\n\n### Use\n\nThe `use` action allows agents to interact with objects such as altars, converters, and generators. The specific effects of the `use` action depend on the target object and can include converting resources to energy, powering the altar for rewards, or harvesting resources from generators.\n\n## Configuration\n\nThe MettaGrid environment is highly configurable through the use of YAML configuration files. These files specify the layout of the gridworld, the placement of objects, and various properties of the objects and agents.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A fast grid-based open-ended MARL environment",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://daveey.github.io",
        "Repository": "https://github.com/Metta-AI/mettagrid"
    },
    "split_keywords": [
        "puffergrid",
        " gridworld",
        " minigrid",
        " rl",
        " reinforcement-learning",
        " environment",
        " gym"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f12a3c48d5fa4aab6000aa57bee2a37d76f9be3b4bd4c22af55e4361b61ac55",
                "md5": "a0c5527b1e237e2de05a803ebbc34642",
                "sha256": "e1d58d7b442abbd81fe3064fc5a98fabe79b428778bb547a9802ae35e5aaa95b"
            },
            "downloads": -1,
            "filename": "mettagrid-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a0c5527b1e237e2de05a803ebbc34642",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 3531068,
            "upload_time": "2024-09-17T17:38:42",
            "upload_time_iso_8601": "2024-09-17T17:38:42.525212Z",
            "url": "https://files.pythonhosted.org/packages/3f/12/a3c48d5fa4aab6000aa57bee2a37d76f9be3b4bd4c22af55e4361b61ac55/mettagrid-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a1b74faa0fcf31853bc5f394063e8cb5aef920b04be7b4ee1dce426824a2526",
                "md5": "3129ab1d60d4f61a663065b1b09cedf7",
                "sha256": "c3e1e2cdb4123786f75651c6091ee464c243bbb01031f760c0040465e0ae66b8"
            },
            "downloads": -1,
            "filename": "mettagrid-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3129ab1d60d4f61a663065b1b09cedf7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 3478434,
            "upload_time": "2024-09-17T17:38:45",
            "upload_time_iso_8601": "2024-09-17T17:38:45.545381Z",
            "url": "https://files.pythonhosted.org/packages/2a/1b/74faa0fcf31853bc5f394063e8cb5aef920b04be7b4ee1dce426824a2526/mettagrid-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-17 17:38:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Metta-AI",
    "github_project": "mettagrid",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mettagrid"
}
        
Elapsed time: 4.34367s