Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Nov 24, 2024
1 parent 7a277e6 commit 62bfcb6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ determine the training strategy. Here is a table with the currently implemented
challenge to solve.
They differ based on many aspects, here is a table with the current environments in BenchMARL

| Environment | Tasks | Cooperation | Global state | Reward function | Action space | Vectorized |
|--------------------------------------------------------------------|--------------------------------------|---------------------------|--------------|-------------------------------|-----------------------|:----------------:|
| [VMAS](https://github.com/proroklab/VectorizedMultiAgentSimulator) | [27](benchmarl/conf/task/vmas) | Cooperative + Competitive | No | Shared + Independent + Global | Continuous + Discrete | Yes |
| [SMACv2](https://github.com/oxwhirl/smacv2) | [15](benchmarl/conf/task/smacv2) | Cooperative | Yes | Global | Discrete | No |
| [MPE](https://github.com/openai/multiagent-particle-envs) | [8](benchmarl/conf/task/pettingzoo) | Cooperative + Competitive | Yes | Shared + Independent | Continuous + Discrete | No |
| [SISL](https://github.com/sisl/MADRL) | [2](benchmarl/conf/task/pettingzoo) | Cooperative | No | Shared | Continuous | No |
| [MeltingPot](https://github.com/google-deepmind/meltingpot) | [49](benchmarl/conf/task/meltingpot) | Cooperative + Competitive | Yes | Independent | Discrete | No |
| Environment | Tasks | Cooperation | Global state | Reward function | Action space | Vectorized |
|---------------------------------------------------------------------|--------------------------------------|---------------------------|--------------|-------------------------------|-----------------------|:----------------:|
| [VMAS](https://github.com/proroklab/VectorizedMultiAgentSimulator) | [27](benchmarl/conf/task/vmas) | Cooperative + Competitive | No | Shared + Independent + Global | Continuous + Discrete | Yes |
| [SMACv2](https://github.com/oxwhirl/smacv2) | [15](benchmarl/conf/task/smacv2) | Cooperative | Yes | Global | Discrete | No |
| [MPE](https://github.com/openai/multiagent-particle-envs) | [8](benchmarl/conf/task/pettingzoo) | Cooperative + Competitive | Yes | Shared + Independent | Continuous + Discrete | No |
| [SISL](https://github.com/sisl/MADRL) | [2](benchmarl/conf/task/pettingzoo) | Cooperative | No | Shared | Continuous | No |
| [MeltingPot](https://github.com/google-deepmind/meltingpot) | [49](benchmarl/conf/task/meltingpot) | Cooperative + Competitive | Yes | Independent | Discrete | No |
| [MAgent2](https://github.com/Farama-Foundation/magent2) | [1](benchmarl/conf/task/magent) | Cooperative + Competitive | Yes | Global in groups | Discrete | No |


> [!NOTE]
Expand Down
18 changes: 10 additions & 8 deletions benchmarl/environments/magent/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class MAgentTask(Task):
# TIGER_DEER = None

def get_env_fun(
self,
num_envs: int,
continuous_actions: bool,
seed: Optional[int],
device: DEVICE_TYPING,
self,
num_envs: int,
continuous_actions: bool,
seed: Optional[int],
device: DEVICE_TYPING,
) -> Callable[[], EnvBase]:

return lambda: PettingZooWrapper(
Expand All @@ -38,7 +38,7 @@ def get_env_fun(
seed=seed,
done_on_any=False,
use_mask=False,
device=device
device=device,
)

def __get_env(self) -> EnvBase:
Expand All @@ -51,8 +51,10 @@ def __get_env(self) -> EnvBase:
# gather_v5,
# tiger_deer_v4
)
except ImportError as e:
raise ImportError("Module `magent2` not found, install it using `pip install magent2`")
except ImportError:
raise ImportError(
"Module `magent2` not found, install it using `pip install magent2`"
)

envs = {
"ADVERSARIAL_PURSUIT": adversarial_pursuit_v4,
Expand Down
2 changes: 2 additions & 0 deletions docs/source/concepts/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ They differ based on many aspects, here is a table with the current environments
+-------------------------------------------------+-------+---------------------------+--------------+-------------------------------+-----------------------+------------+
| :class:`~benchmarl.environments.MeltingPotTask` | 49 | Cooperative + Competitive | Yes | Independent | Discrete | No |
+-------------------------------------------------+-------+---------------------------+--------------+-------------------------------+-----------------------+------------+
| :class:`~benchmarl.environments.MAgentTask` | 1 | Cooperative + Competitive | Yes | Global in groups | Discrete | No |
+-------------------------------------------------+-------+---------------------------+--------------+-------------------------------+-----------------------+------------+



Expand Down

0 comments on commit 62bfcb6

Please sign in to comment.