Skip to main content

An environment for simulated parking lot tasks.

Project description

parking-env

Code style: black Imports: isort

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

Installation

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 .

Usage

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

import parking_env

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)

Credits

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parking_env-0.0.8.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parking_env-0.0.8-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file parking_env-0.0.8.tar.gz.

File metadata

  • Download URL: parking_env-0.0.8.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for parking_env-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3946265e4226a69ae20b56e08eb9127884c7bceb81ceede53442d37b135ffb4f
MD5 e49d78b6a05d5799d30e274f84d8fbcc
BLAKE2b-256 32d49a00bad4741d377b900496cb800226227a3b644408593276056925222e23

See more details on using hashes here.

File details

Details for the file parking_env-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: parking_env-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for parking_env-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 358cf1614d132e1e32019920b0ff0dd5eb0ba7358fcbc1cbd91771054b421543
MD5 d664777019cfbc15b4f4f376161341bc
BLAKE2b-256 98c84e6c7602ae5ff3c0912988e1bc542c8462fff953a15cfbd0cdb4e6a2a84b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page