Congestion¶
CongestionMatrix is a repeated routing game implemented in masa.envs.multiagent.matrix.congestion.
Overview¶
Class:
CongestionMatrixMetadata name:
congestion_matrix_v0Agents:
player_0toplayer_{N-1}withN=6by defaultActions:
RoadA=0,RoadB=1Default parameters:
base_A=1,base_B=1,slope_A=1,slope_B=1,jam_threshold=5,jam_penalty=5
Each agent picks one of two roads. Rewards are the negative congestion costs of the chosen road, with an extra penalty when a road load reaches the jam threshold.
Safety Semantics¶
The environment labels jammed rounds with jam and unsafe. The default cost_fn returns binary cost 1 whenever a jam occurs.
Observation Channels¶
The binary observation layout contains:
one pair of channels per agent for the last chosen road,
a one-hot encoding of the previous Road A load,
a one-hot encoding of the previous Road B load,
a final
jamflag.
Its label_fn also emits derived labels such as loadA_k, loadB_k, roadA_empty, roadB_empty, and balanced_load.