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

[Feature Request] Support for Truncated Gym API from Gym>= 0.25 #1053

Closed
tlpss opened this issue Sep 7, 2022 · 1 comment
Closed

[Feature Request] Support for Truncated Gym API from Gym>= 0.25 #1053

tlpss opened this issue Sep 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@tlpss
Copy link
Contributor

tlpss commented Sep 7, 2022

🚀 Feature

Support Gym's new Truncation API from release 0.25 to disambiguate between true terminal states and truncated terminations.

Motivation

In the Bellman Equation, we have to backup with ( reward + value function of the next state ) for all but the terminal states of the MDP, as discussed in the release notes of Gym here and in section 3 of this paper.
image

However many environments (and hence learning algorithms) do not distinguish between truncations of an infinite-MDP to increase exploration and true terminations, and both are currently passed through the done signal.

To mitigate this, starting from Gym 0.25 the step function returns a terminated and truncated bool, which allows to distinguish between the two cases. This has been found to both increase asymptotic performance and stability with respect to the chosen episode truncation length, both of which seem valid reasons to include it in this repo.

For backward compatibility, one could check the number of return variables in the step function and map the termination to done during rollout collections. I would be willing to assist under the guidance of someone more experienced to help with this.

More information can be found in this issue in the gym repo

@tlpss tlpss added the enhancement New feature or request label Sep 7, 2022
@tlpss
Copy link
Contributor Author

tlpss commented Sep 7, 2022

ah, it seems I'm far too late with my request -> #780.

@tlpss tlpss closed this as completed Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant