Playing the QMIX Two-step game on Ray

QMIX is (unfortunately) a little tricky with respect to the observation- and action spaces it requires (both must be n-Tuples (n=num agents) of the respective single agent spaces).

E.g.: Single agent space=Dict(a=…, b=…) → 2 agents → obs-space=Tuple([Dict(a=, b=), Dict(a=, b=)])
Same for the action space.

Manny is right, you need to make sure the env is created with the [your env].with_agent_groups(grouping, tuple_obs_space, tuple_action) tool. From the error message you provided, it seems like your env is not grouped yet: Both agents are moving separately in the env, requiring separate actions, instead of the env treating both agents as a single one, like QMIX always requires it.

1 Like