classic-v1: continuous actions, and frames only on request - #10
Merged
Merged
Conversation
ClassicEnv cast every action to an integer, so the continuous classic-control tasks (Pendulum-v1, MountainCarContinuous-v0) could not run. A discrete space still takes an integer; a continuous one now takes a float array of the space's shape and dtype. It also rendered a frame every step and sent it, whether or not anything read it. Rendering is now off by default, as in the MuJoCo family, and --env.render turns it on. tests/test_classic_env.py covers both; it skips where the classic extra is not installed, as CI's default sync is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
classic-v1could not run its continuous tasks.ClassicEnv.stepcast every action to an integer, so Pendulum-v1 and MountainCarContinuous-v0 received truncated torques and forces.--env.renderturns it on. It used to render and send a frame every step, whether or not anything read it.tests/test_classic_env.pyadds five tests:The tests skip where the
classicextra is not installed, which is the case in CI's default sync. Locally, with--extra classic, all five pass, and the full suite gives 134 passed and 14 skipped.PlugRL's E44 needs this change: a Python control run on Pendulum-v1, beside a C++ env client running the same task.