gym_torcs  by ugo-nama-kun

RL environment for TORCS, an open-source car racing simulator

Created 9 years ago
413 stars

Top 70.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

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

  • Install via pip (assuming the package is published, otherwise manual installation from source).
  • Prerequisites: Python 3, xautomation, OpenAI-Gym, NumPy, and vtorcs-RL-color (requires separate installation).
  • Assumed OS: Ubuntu 14.04 LTS/16.04 LTS.
  • Vision input requires specific TORCS configuration for 64x64 resolution.
  • Official TORCS documentation: https://arxiv.org/pdf/1304.1672.pdf

Highlighted Details

  • Supports both vision-based (steering only) and sensor-based (steering and throttle) action spaces.
  • Includes example code for agent implementation and experimentation.
  • Can optionally add noise to low-dimensional sensor inputs for robustness testing.
  • Previously utilized in a DDPG experiment with Keras.

Maintenance & Community

  • Developed during a 2016 internship at Preferred Networks.
  • No explicit links to community channels or active development status are provided in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The underlying dependencies (vtorcs, snakeoil) may have their own licenses.
  • Compatibility with commercial or closed-source applications is not specified.

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.

Health Check
Last Commit

7 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Deepak Pathak Deepak Pathak(Cofounder of Skild AI; Professor at CMU), Anastasis Germanidis Anastasis Germanidis(Cofounder of Runway), and
1 more.

deer by VinF

0%
489
Deep reinforcement learning framework
Created 9 years ago
Updated 3 months ago
Feedback? Help us improve.