This is a follow-up question to this post. In my application, my RL agent needs to pass some information to the environment in order for it to calculate rewards. @mannyv suggested a way that works for me: Using an
on_episode_step callback, I can record the variable inside the model and pass it into the environments.
However, I’m not sure how I scale this to multiple rollout workers: Since each environment shares the same model but has different states, the model needs to keep its internal states for each of these envs. But I don’t think there is a way to give models info about which environment it is interacting with? I might be able to pass this through
info output of the environment, but there doesn’t seem to be a way to assign an ID to the envs?