Assign different custom models according to agent_id in multiagent setting

Is it possible to assign different custom network architecture according to agent_id in multiagent setting?
For example, if I use the following to specify custom model in multiagent setting, all the agents will use ‘rnn’ model. I am aware of the ‘policy_mapping_fn’, but is there a way to specify custom model per policy?

    config = {
        "model": {
            "custom_model": "rnn",
        }

Yes, you can specify a different custom model per distinct policy (defined in the policies dict):
Like in this example script here:

1 Like

Check out the policies key with the multiagent config section. Each policy is defined by a 4-tuple: PolicyClass, obs-space, action-space, and extra config (<- this can include a custom model).

Thanks for this advice!

1 Like