RL environment for TORCS, an open-source car racing simulator
Top 71.8% on sourcepulse
This repository provides a Python wrapper for the TORCS (The Open Racing Car Simulator) game, offering an OpenAI-Gym-like interface for reinforcement learning experiments. It targets researchers and developers working on autonomous driving and car racing AI, enabling them to train agents within a realistic simulation environment.
How It Works
The environment wraps the TORCS simulator, allowing RL agents to interact with it through a standardized API. It leverages the snakeoil
Python client for TORCS and a modified vtorcs
fork. A key design choice addresses a known TORCS memory leak bug by automatically relaunching and reconfiguring the simulator during environment resets, ensuring stability for extended training sessions.
Quick Start & Requirements
pip
(assuming the package is published, otherwise manual installation from source).xautomation
, OpenAI-Gym, NumPy, and vtorcs-RL-color
(requires separate installation).Highlighted Details
Maintenance & Community
Licensing & Compatibility
vtorcs
, snakeoil
) may have their own licenses.Limitations & Caveats
The implementation is currently limited to single-track races in practice mode. Support for other racing modes or multiple tracks requires manual modification of TORCS configuration files. The vision input is restricted to a 64x64 resolution. The project's reliance on older Ubuntu versions and specific TORCS forks might pose compatibility challenges.
7 years ago
Inactive