Parking-env is a gymnasium-based environment for reinforcement learning, written in a single Python file and accelerated by Numba. The environment is designed to simulate the task of parking a vehicle in a parking lot, where the agent controls the steering angle and the speed to park the vehicle successfully.
PPO agent with discrete actions
PPO agent with multidiscrete actions
PPO agent with continuous actions
To install the stable version,
pip install parking-env
To install the current version with additional scripts in editable mode,
git clone https://github.com/KexianShen/parking-env.git
cd parking-env
pip install -e .
Pre-trained models are uploaded to Hugging Face Hub with detailed notes.
To use parking-env, you can code as follows:
import gymnasium as gym
env = gym.make(
"Parking-v0", render_mode="human", observation_type="vector", action_type="discrete"
)
env.reset()
terminated = False
truncated = False
while not terminated and not truncated:
action = 2
obs, reward, terminated, truncated, info = env.step(action)
Parking-env is heavily inspired by the HighwayEnv environment, and some of its code was adapted for use in parking-env.
Additionally, parking-env uses the algorithms provided in CleanRL, a collection of clean implementations of popular RL algorithms.
This project is licensed under the MIT License - see the LICENSE file for details.