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

[Bug Report] Possible bug with bootstrapping when environment is truncated in CleanRL mutli-agent Atari example #1126

Open
1 task done
KaleabTessera opened this issue Nov 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@KaleabTessera
Copy link

Describe the bug

I think there is possibly a bug with the clean rl examples or any examples using pettingzoo_env_to_vec_env_v1. Truncation should be treated differently to termination when bootstrapping - as done in stable baselines (DLR-RM/stable-baselines3#633).

I have also made comments on the clean rl PR - vwxyzjn/cleanrl#408.

In short, we should still bootstrap when our environment is truncated, where in the examples we treat truncation and termination the same

next_done = torch.maximum(next_termination, next_truncation)
and
dones = torch.maximum(terminations, truncations)
.

This also means we need this PR to be merged in to get the correct terminal obs and then implement something similar to how sb3 do it.

Code example

No response

System info

No response

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@KaleabTessera KaleabTessera added the bug Something isn't working label Nov 2, 2023
@KaleabTessera KaleabTessera changed the title [Bug Report] Possinle bug with bootstrapping when environment is truncated in CleanRL mutli-agent Atari example [Bug Report] Possible bug with bootstrapping when environment is truncated in CleanRL mutli-agent Atari example Nov 2, 2023
@elliottower
Copy link
Member

I and Costa commented on that other issue and PR but I think we're going to be best off using his rewritten version of the tutorial when that is finished, but this issue can stay up until then so I don't forget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants