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

Not handling time limits #70

Open
carlos-UPC-AI opened this issue Nov 23, 2023 · 0 comments
Open

Not handling time limits #70

carlos-UPC-AI opened this issue Nov 23, 2023 · 0 comments

Comments

@carlos-UPC-AI
Copy link

In the DQNAgent, particularly in the step method, there seems to be a potential issue in properly distinguishing between termination and truncation, as suggested by the Gymnasium documentation available at https://gymnasium.farama.org/tutorials/gymnasium_basics/handling_time_limits/.

The following line of code, done = terminated or truncated, treats both termination and truncation equally.

Furthermore, in the _compute_dqn_loss method, the code lines:
mask = 1 - done target = (reward + self.gamma * next_q_value * mask).to(self.device)

do not seem to account specifically for truncation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant