Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python PyPI build pre-commit Code style: black


An episode of one of the environments available in HighwayEnv.

A collection of environments for autonomous driving and tactical decision-making tasks. Originally developed by Edouard Leurent and currently maintained by Jin Huang.

The documentation website is at highway-env.farama.org, and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6

Installation

To install HighwayEnv, use:

pip install highway-env

or with uv:

uv add highway-env          # adds to project dependencies and installs (preferred)
uv pip install highway-env  # or install without adding to a project (pip install)

We support Linux and macOS primarily, with Windows support maintained on a best-effort basis.

Environments

HighwayEnv includes 10 driving scenario families: highway, intersection, exit, lane-keeping, merge, parking, racetrack, roundabout, two-way, and u-turn, with several environments also offering fast, continuous-control, connected-lane, multi-agent, generic, large, or oval variants. The full list with descriptions and configuration options is available in the documentation.

Previews
highway highway
merge merge
roundabout roundabout
parking parking
intersection intersection
racetrack racetrack
lane-keeping lane-keeping
two-way two-way
exit exit
u-turn u-turn

Usage

import gymnasium as gym
import highway_env

gym.register_envs(highway_env)

# Initialise the environment
env = gym.make("highway-v0", config={"lanes_count": 3}, render_mode="human")

# Reset the environment to generate the first observation
obs, info = env.reset()
for _ in range(1000):
    # this is where you would insert your policy
    action = env.action_space.sample()

    # step (transition) through the environment with the action
    # receiving the next observation, reward and if the episode has terminated or truncated
    obs, reward, terminated, truncated, info = env.step(action)

    # If the episode has ended then we can reset to start a new episode
    if terminated or truncated:
        obs, info = env.reset()

env.close()

See the documentation for more examples including how to train agents with Stable Baselines3 and Google Colab notebooks. For examples of trained agents (DQN, DDPG, Value Iteration, MCTS), see the Agent Examples page.

Documentation

Read the documentation online.

Development Roadmap

Here is the roadmap for future development work.

Citating

If you use HighwayEnv in your work, please consider citing it with:

@misc{highway-env,
  author = {Leurent, Edouard},
  title = {An Environment for Autonomous Driving Decision-Making},
  year = {2018},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Farama-Foundation/HighwayEnv}},
}

Publications

A list of publications using HighwayEnv can be found in the documentation.

Metadata

Release files for highway-env 1.12.2.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for highway-env 1.12.2.dev0
File Size Uploaded Provenance Actions
highway_env-1.12.2.dev0.tar.gz 122.6 kB With provenance Details for highway_env-1.12.2.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for highway-env 1.12.2.dev0
File Interpreter ABI Platform Actions
highway_env-1.12.2.dev0-py3-none-any.whl Python 3 none any Details for highway_env-1.12.2.dev0-py3-none-any.whl

Total release size: 267.8 kB

Release files / highway_env-1.12.2.dev0.tar.gz

Download URL highway_env-1.12.2.dev0.tar.gz
Size 122.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8f8015dcf3b5a44aa354fe55d720081135aecc4afb3ce6dc81d469d03ad4ecf9
BLAKE2b-256 checksum
How to use checksums
5b38d68d612b86e2f8f7223de1491319e0b911b2c46066931222912092bfc3dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / highway_env-1.12.2.dev0-py3-none-any.whl

Download URL highway_env-1.12.2.dev0-py3-none-any.whl
Size 145.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5c358400f4f73aa4bfdb532c75f8f776270c5e17a65d757017f4427518d6d3b
BLAKE2b-256 checksum
How to use checksums
90ac048bba35c658f5ae7736ef12078b31de6b20185025e9595d2a56fbb8b20a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for highway-env 1.12.2.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for highway_env-1.12.2.dev0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page