Simple Formation

This environment is part of the MPE environments. Please read that page first for general information.

Import

from mpe2 import simple_formation_v1

Actions

Discrete/Continuous

Parallel API

Yes

Manual Control

No

Agents

agents= [agent_0, ..., agent_N-1]

Action Shape

(5)

Action Values

Discrete(5)/Box(0.0, 1.0, (5))

Observation Shape

(6)

Observation Values

(-inf, inf)

N agents must arrange themselves in a circle of radius 0.5 around a central landmark. At each step the ideal circular positions are anchored to the agent with the smallest angle from horizontal, and agents are assigned to positions via bipartite matching (Hungarian algorithm). The shared reward is the negative mean distance from assigned target positions, clipped to [0, 2].

Agent observations: [self_vel, self_pos, landmark_rel_pos]

Agent action space: [no_action, move_left, move_right, move_down, move_up]

Arguments

simple_formation_v1.env(N=4, max_cycles=25, continuous_actions=False, terminate_on_success=False)

N: number of agents

max_cycles: number of frames until the episode terminates

continuous_actions: whether action spaces are discrete (default) or continuous

terminate_on_success: when True, the episode ends as soon as every agent is within 0.05 units of its assigned target position.

API

class mpe2.simple_formation.simple_formation.env(**kwargs)
class mpe2.simple_formation.simple_formation.raw_env(N=4, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False, benchmark_data=False, terminate_on_success=False)