Skip to content

Vehicle behaviour fix, generic merge env, Gymnasium-compliant render behaviour, and docs refresh

Latest

Choose a tag to compare

@Trenza1ore Trenza1ore released this 06 Jul 20:23
82fb3f7

HighwayEnv v1.12.0

This is a big release that brings:

  • a new generic version of the merge environment
  • major documentation updates
  • reduction in startup latency
  • improvements in dependency situation (replacing pygame with pygame-ce, removing scipy)
  • multiple new environment versions due to a bug discovered in neighbouring vehicle detection in environments with multiple road segments (causing non-player vehicles to have a higher likelihood of crashing than they should, as shown here).

Minor breaking change

Previously, HighwayEnv did not implement render mode according to Gymnasium; instead, whether the environments are actually rendered is set with the offscreen_rendering config key. #700 introduced correct behaviour for treating different values of render_mode, while still keeping old config keys as overrides:

  • render_mode="human" -> render to window by default, render() returns None
  • render_mode="rgb_array" -> headless render by default, render() returns image array
  • Keeping offscreen_rendering in config as an override
  • The OFFSCREEN_RENDERING environment variable is now ignored because explicit is better than implicit

So, basically, you can set render_mode="rgb_array" and pass offscreen_rendering=True in the config dict to get both an RGB array returned by render() and pygame rendering in a new window for your viewing pleasure (note that you still need real_time_rendering=True to render at the intended fps).

New environment variant

  • Generic version of the merge environment (merge-generic-v0, merge-generic-v1) by @Minipoloalex (#694)

New environment version

  • With neighbour vehicle detection fix: exit-v1, intersection-v2, intersection-multi-agent-v2, merge-v1, racetrack-v1, racetrack-large-v1, racetrack-oval-v1, roundabout-v1, roundabout-generic-v1, u-turn-v1 by @Lidang-Jiang (#667)

Bug fix

Dependencies

Performance

  • Reduced startup latency by initializing only the needed pygame modules by @Trenza1ore (#687)

Documentation

Community

CI and build

New Contributors

Full Changelog: v1.11...v1.12