{"id":25740015,"url":"https://github.com/levitation-opensource/zoo_to_gym_multiagent_adapter","last_synced_at":"2025-02-26T08:32:41.552Z","repository":{"id":279125535,"uuid":"937765935","full_name":"levitation-opensource/zoo_to_gym_multiagent_adapter","owner":"levitation-opensource","description":"Enables you to convert a PettingZoo environment to a Gym environment while supporting multiple agents. Gym's default setup doesn't easily support multi-agent environments, but this wrapper resolves that by running each agent in its own process and sharing the environment across those processes.","archived":false,"fork":false,"pushed_at":"2025-02-23T22:50:40.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T23:24:49.124Z","etag":null,"topics":["adapter","ai","artificial-intelligence","gridworld","gym","gymnasium","marl","multi-agent","multi-agent-reinforcement-learning","multi-processing","pettingzoo","reinforement-learning","rl","wrapper"],"latest_commit_sha":null,"homepage":"https://www.simplify.ee/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levitation-opensource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-23T20:53:59.000Z","updated_at":"2025-02-23T23:20:15.000Z","dependencies_parsed_at":"2025-02-23T23:25:24.968Z","dependency_job_id":null,"html_url":"https://github.com/levitation-opensource/zoo_to_gym_multiagent_adapter","commit_stats":null,"previous_names":["levitation-opensource/zoo_to_gym_multiagent_adapter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levitation-opensource%2Fzoo_to_gym_multiagent_adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levitation-opensource%2Fzoo_to_gym_multiagent_adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levitation-opensource%2Fzoo_to_gym_multiagent_adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levitation-opensource%2Fzoo_to_gym_multiagent_adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levitation-opensource","download_url":"https://codeload.github.com/levitation-opensource/zoo_to_gym_multiagent_adapter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240818591,"owners_count":19862733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter","ai","artificial-intelligence","gridworld","gym","gymnasium","marl","multi-agent","multi-agent-reinforcement-learning","multi-processing","pettingzoo","reinforement-learning","rl","wrapper"],"created_at":"2025-02-26T08:32:18.823Z","updated_at":"2025-02-26T08:32:41.513Z","avatar_url":"https://github.com/levitation-opensource.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Zoo to Gym Multi-Agent Adapter\n\n\n## Overview\n\nThis wrapper allows you to convert a **PettingZoo** environment to a **Gym** environment while supporting multiple agents. Gym's default setup doesn't easily support multi-agent environments, but this wrapper resolves that by running each agent in its own process and sharing the environment across those processes.\n\n\n## Features\n\n* Converts a **PettingZoo** environment to a **Gym**-compatible environment.\n* **Multi-agent** support by running agents in separate processes.\n* Thus enables using Gym-based RL algorithms with **PettingZoo** environments. \n* There are two adapters:\n    * Single-agent adapter - Runs in the same process.\n\t* Multi-agent adapter - Runs each agents in a separate subprocess.\n\n\n## Installation\n\nCurrently you can install the wrapper from the source:\n\n\n### From Source:\n\n```\npip install git+https://github.com/levitation-opensource/zoo_to_gym_multiagent_adapter@main#egg=zoo_to_gym_multiagent_adapter\n```\n\n\n## Usage\n\nTODO\n\nFor an example, see \n\u003cbr\u003e https://github.com/aintelope/biological-compatibility-benchmarks/tree/main/aintelope/agents/dqn_agent.py\n\u003cbr\u003eand\n\u003cbr\u003e https://github.com/aintelope/biological-compatibility-benchmarks/tree/main/aintelope/agents/sb3_base_agent.py\n\n\n## How It Works\n\n* The wrapper handles the conversion of the PettingZoo environment API into a Gym-compatible API.\n* When there are multiple agents, each agent runs in its own process, and the wrapper ensures synchronization and data sharing between them, allowing you to train multi-agent RL scenarios using Gym.\n* This solves the issue of Gym's default lack of native support for multiple agents in a single environment.\n\n\n## Contributions\n\nContributions are welcome! Feel free to fork the repository, open issues, and submit pull requests.\n\n\n## License\n\nThis project is licensed under the Mozilla Public License Version 2.0 - see the [LICENSE.txt](LICENSE.txt) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevitation-opensource%2Fzoo_to_gym_multiagent_adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevitation-opensource%2Fzoo_to_gym_multiagent_adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevitation-opensource%2Fzoo_to_gym_multiagent_adapter/lists"}