I’m wondering how to alter the default policy in the PPOConfig. I’m aware it can be set up like so for a multiagent environment:
def policy_map_fn(agent_id: str, _episode=None, _worker=None, **_kwargs) -> str:
"""
Maps agent_id to policy_id
"""
return 'policy'
algo = (
ppo.PPOConfig()
.environment(MyEnv)
.multi_agent(
policies={
"policy": (
CustomPolicy,
observation_space,
ActionSpace(),
ppo.PPOConfig.overrides(gamma=0.9),
),
},
policy_mapping_fn=policy_map_fn,
)
.framework("torch")
.build()
)
I can’t see anywhere in the API or documentation though how to use your own custom policy in a non multiagent setup?