Farama-Foundation/HighwayEnv
关于
用于自动驾驶和战术决策任务的一组环境
人工智能与机器学习实测星标增长
- 24小时
- +1
- 7天
- +5
- 15天
- +7
- 1个月
- +9
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文

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 |
![]() |
merge |
![]() |
roundabout |
![]() |
parking |
![]() |
intersection |
![]() |
racetrack |
![]() |
lane-keeping |
![]() |
two-way |
![]() |
exit |
![]() |
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.
探索相关项目
加载中…









