benchmarl.environments.VmasTask

class VmasTask(value)[source]

Bases: Task

Enum for VMAS tasks.

BALANCE = 1
SAMPLING = 2
NAVIGATION = 3
TRANSPORT = 4
REVERSE_TRANSPORT = 5
WHEEL = 6
DISPERSION = 7
MULTI_GIVE_WAY = 8
DROPOUT = 9
GIVE_WAY = 10
WIND_FLOCKING = 11
PASSAGE = 12
JOINT_PASSAGE = 13
JOINT_PASSAGE_SIZE = 14
BALL_PASSAGE = 15
BALL_TRAJECTORY = 16
BUZZ_WIRE = 17
FLOCKING = 18
DISCOVERY = 19
FOOTBALL = 20
SIMPLE_ADVERSARY = 21
SIMPLE_CRYPTO = 22
SIMPLE_PUSH = 23
SIMPLE_REFERENCE = 24
SIMPLE_SPEAKER_LISTENER = 25
SIMPLE_SPREAD = 26
SIMPLE_TAG = 27
SIMPLE_WORLD_COMM = 28
static associated_class()[source]

The associated task class

classmethod env_name() str

The name of the environment in the benchmarl/conf/task folder

get_task(config: Dict[str, Any] | None = None) TaskClass

Get the TaskClass object associated with this enum element by passing it the task name and config.

If no config is given, it will be loaded from benchmarl/conf/task/self.env_name()/self.name using Task.get_from_yaml().

Parameters:
  • config (dict) – Optional configuration of the task.

  • provided (If not)

  • yaml. (the default configuration will be loaded from)

Returns:

The TaskClass object for the task.

get_from_yaml(path: str | None = None) TaskClass

Load the task configuration from yaml

Parameters:

path (str, optional) – The full path of the yaml file to load from. If None, it will default to benchmarl/conf/task/self.env_name()/self.name

Returns:

the TaskClass with the loaded config

property config
update_config(config: Dict[str, Any]) Task
supports_continuous_actions() bool
supports_discrete_actions() bool
max_steps(env: EnvBase) int
has_render(env: EnvBase) bool
group_map(env: EnvBase) Dict[str, List[str]]
observation_spec(env: EnvBase) Composite
info_spec(env: EnvBase) Composite | None
state_spec(env: EnvBase) Composite | None
action_spec(env: EnvBase) Composite
action_mask_spec(env: EnvBase) Composite | None
static log_info(batch: TensorDictBase) Dict[str, float]
get_reward_sum_transform(env: EnvBase) Transform
get_env_transforms(env: EnvBase) List[Transform]
get_replay_buffer_transforms(env: EnvBase, group: str) List[Transform]
static render_callback(experiment, env: EnvBase, data: TensorDictBase)