Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: have access to terminal_observation in the infos. #233

Merged
merged 8 commits into from
Nov 28, 2023
7 changes: 6 additions & 1 deletion supersuit/vector/markov_vector_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,14 @@ def step(self, actions):
infs = [infos.get(agent, {}) for agent in self.par_env.possible_agents]

if env_done:
observations, infs = self.reset()
observations, reset_infs = self.reset()
else:
observations = self.concat_obs(observations)
# empty infos for reset infs
reset_infs = [{} for _ in range(len(self.par_env.possible_agents))]
# combine standard infos and reset infos
infs = infs + reset_infs
elliottower marked this conversation as resolved.
Show resolved Hide resolved

assert (
self.black_death or self.par_env.agents == self.par_env.possible_agents
), "MarkovVectorEnv does not support environments with varying numbers of active agents unless black_death is set to True"
Expand Down
Loading