huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
922 stars 186 forks source link

[Feature request] Ensure environment spaces checks pass #2072

Open Gamenot opened 1 year ago

Gamenot commented 1 year ago

Motivation

The "hiway-v1" and RLlibHiWayEnv environments currently do not pass the environment checkers and should to make the configuration easier.

Proposal

Run fixes on the hiway-v0 environment so that the following should pass:

gymnasium.envs.registration.make(HiWayEnvV1, disable_env_checker=False)
ray.rllib.utils.check_env(RLlibHiWayEnv())

The cause of the issue with RLlibHiWayEnv is that the agent observation and action adaptors need to contain spaces and override the observation and action space of the environment. These adaptors should be removed from the agent spec and added as environment parameters.

The cause of the issue with the environments in make is that when using ObservationSpacesFormatter.unformatted or ActionSpacesFormatter.unformatted the generated action space is None.

Alternatives

No response

Additional context

No response