Skip to main content

OpenAI Gym Environment for qRacing

Project description

PyPI version

Deep Q-Racing

Improving race strategy decision-making in motorsports through self-learning deep neural networks

Deep Q-Racing is a research project into the potential of using Reinforcement Learning for automating race simulations and thus improving the comprehensiveness of results as-well as the possible amount of runs.


🎓 Background

View abstract
One decisive factor in the outcome of races in circuit motorsports is the race strategy. The strategic potential of this strategy hereby stems from the timing of pit stops. These stops become neccessary, as fuel is consumed and tires decrease in performance over the course of a race. Deciding on a pit stop to replace these tires with a new set and refueling the car for the desired stint length contracts these affects. Such a stop also induces drawback in form of time loss, as a speed limit is enforced when traveling through the pit lane. Furthermore, the service conducted on the car might also increase this time loss.

Race strategy is therefore defined as balancing the benefits and costs of pit stops. As of today, race simulations are applied in order to estimate the best possible race strategy beforehand, which reduces the required race time to a minimum. These simulations greatly vary in granularity in prior literature and effects of probabilistic nature have to be considered. Also, manual input of desired inlaps has to be made for each participant.

Such a simulation is implemented in this work and further adapted to the regulations of the NLS race series. The simulation is integrated with OpenAi’s Gym framework, to serve as an environment for reinforcement learning agents to train in. In order to automate the race simulation, an agent is implemented with the TensorFlow framework and the training is stabilized through experience replay. Different hyper-parameter configurations, as well as observation-spaces and reward functions are evaluated.

It was found, that the agent made reasonable decisions regarding pit stop timing and refuel amount. The learning rate and amount of episodes proved to be the most important parameters and using tire degradation in conjunction with the current race position was found to be most fitting for policy development.

Keywords: race simulation, race strategy, Reinforcement Learning


Build

python -m build
twine upload dist/\*

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

gym_qRacing-0.0.12-py2.py3-none-any.whl (17.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file gym_qRacing-0.0.12-py2.py3-none-any.whl.

File metadata

  • Download URL: gym_qRacing-0.0.12-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for gym_qRacing-0.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 90bf717ee307a8f576a20e2dbfa3a927b85e7e89f0273b963c7c9fae9da951f4
MD5 fba30e8672beb5a12f4bc9845826a8c9
BLAKE2b-256 196851aaf0fcfa0eb1d3d6cb4dbe6f06a5376b35d907aa201c5d1ce4a831f056

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