Giter VIP home page Giter VIP logo

rl-racer's Introduction

RL-Racer

A custom environment made using the Godot Engine and written in C# used to train reinforcement learning models to drive a car on a top-down virtual track with semi-realistic physics. Utilizes the Godot RL Agents framework to train agents using the Stable-Baselines3 implementation of the Proximal Policy Optimization algorithm.

Demo - Environment v0.1

Model 1

racer_3_4x_speed.mp4

Demo - Environment v0.2

Model 2

rl-racer-4-cut.mp4

Full Demo Video

Demo - Environment v0.3

Model 3

rl-racer-5-cut.mp4

Full Demo Video

Installation (Windows Only)

Inside of a Python virtual environment, install the Godot RL Agents package:

pip install godot-rl

Download the latest release and run the following command to begin training after activating the virtual environment:

python "sb3.py" --env_path=rl-racer.exe --save_model_path=models\model --n_parallel=4 --speedup=16 --save_checkpoint_frequency=50_000

Or start running inference on the pre-trained model:

python "sb3.py" --env_path=rl-racer.exe --resume_model_path=models\model-3 --viz --inference

Changelog

Environment v0.3:

  • Added training of multiple agents
  • Added multi-target camera tracking

Environment v0.2:

  • Added an angle limit to reach fail state
  • Added a small penalty for driving off-track
  • Increased off-track friction
  • Slightly increased slip speed threshold

Roadmap

  • Time-tracking and checkpoints
  • Human controlled vs. Agent(s) controlled
  • Improved collision avoidance
  • Linux and maybe macOS binaries

rl-racer's People

Contributors

crhexa avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.