A lightweight Python driving simulator for reinforcement learning and autonomous driving research, with sensor simulation and Gymnasium-style environments.
Farama-Foundation/HighwayEnv
A Gymnasium-compatible collection of simulated driving environments for training and testing autonomous driving and decision-making agents.
- Stars
- 3,342
- Forks
- 905
- Open issues
- 47
- Last commit
- 8 days ago
What is it?
HighwayEnv provides a set of simulated traffic scenarios for autonomous driving and tactical decision-making research. Each environment, such as highway driving, merging, roundabouts, intersections, parking, racetracks and U-turns, exposes a standard reset/step interface so that reinforcement learning agents can interact with it through Gymnasium.
The environments are configurable, covering options such as the number of lanes, vehicle behaviour and observation or action types. Several scenarios also come in variants with fast, continuous-control, connected-lane, multi-agent or large-scale layouts. Rendering is supported for visual inspection of episodes.
The package is installable from PyPI, and the project offers a documentation site with quickstart examples, including training agents with Stable Baselines3. It is maintained under the Farama Foundation.
Key features
- 01Ten driving scenario families, including highway, merge, roundabout, intersection and parking.
- 02Gymnasium-compatible reset and step interface.
- 03Configurable lane count, traffic and observation settings.
- 04Continuous-control and multi-agent variants for several scenarios.
- 05Built-in rendering of simulated episodes.
- 06Installable with pip or uv.
Use cases
- Benchmarking reinforcement learning algorithms on driving tasks.
- Prototyping decision-making policies for lane changes, merging or intersections.
- Teaching autonomous driving concepts with reproducible simulated scenarios.
- Testing planning methods such as Monte Carlo tree search or value iteration on traffic problems.
Quick start
- 1
Install HighwayEnv from PyPI
pip install highway-env - 2
Create the highway environment and run a random-action loop
Things to know
- Primarily supports Linux and macOS; Windows support is best-effort.
In collections
Topics
FAQ
- What is HighwayEnv?
- A Gymnasium-compatible collection of simulated driving environments for training and testing autonomous driving and decision-making agents. HighwayEnv provides a set of simulated traffic scenarios for autonomous driving and tactical decision-making research. Each environment, such as highway driving, merging, roundabouts, intersections, parking, racetracks and U-turns, exposes a standard reset/step interface so that reinforcement learning agents can interact with it through Gymnasium.
- Is HighwayEnv free to use? What license does it have?
- HighwayEnv is open source under the MIT license. Check the license terms before using it in commercial products.
- Is HighwayEnv still maintained?
- Actively maintained. The last commit to HighwayEnv was on Oct 30, 2026.
- What can I use HighwayEnv for?
- Benchmarking reinforcement learning algorithms on driving tasks. Prototyping decision-making policies for lane changes, merging or intersections. Teaching autonomous driving concepts with reproducible simulated scenarios. Testing planning methods such as Monte Carlo tree search or value iteration on traffic problems.
- How do I install HighwayEnv?
- Install HighwayEnv from PyPI: pip install highway-env Create the highway environment and run a random-action loop
- Where can I get HighwayEnv?
- The source code and installation instructions are on GitHub: https://github.com/Farama-Foundation/HighwayEnv
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python library providing a standard API and reference environments for multi-agent reinforcement learning research, similar to Gymnasium.
PyBullet-based Gymnasium environments for training single and multi-agent reinforcement learning controllers for quadcopters.
A collection of MuJoCo-based robotics reinforcement learning environments built on the Gymnasium API.
Python package for building Gymnasium reinforcement-learning environments for spacecraft tasking and planning, built on the Basilisk simulator.
Open-source simulator for autonomous driving research, providing urban environments, digital assets, and sensor simulation built on Unreal Engine.