Skip to content
DeepForgeby svx
All problems

MADDPG Critic Input

Problem

Build the centralized critic input used by MADDPG: concatenate all agents' observations followed by all agents' actions. Return the flat list.

Hint

The centralized critic sees the full joint state so it can model interactions.

Test cases

case 1
in: [[[1,2],[3]],[[0.5],[1,2]]]
expected: [1,2,3,0.5,1,2]
case 2
in: [[[5]],[[0]]]
expected: [5,0]
case 3
in: [[[1],[2,3]],[[0.5,0.5],[0]]]
expected: [1,2,3,0.5,0.5,0]
Starter codePython
def maddpg_critic_input(observations, actions):
    # Your code here
    pass

3 test cases · run your code against them in the editor