Skip to main content

A python API that can be used to treat the game Rocket League as an Openai Gym-like environment for Reinforcement Learning projects.

Project description

The Rocket League Gym

This is a python API that can be used to treat the game Rocket League as though it were an Openai Gym-style environment for Reinforcement Learning projects. This API must be used with the accompanying Bakkesmod plugin.

Requirements

  • A Windows 10 PC
  • The Steam version of Rocket League (Epic version might be supported but hasn't been tested)
  • Bakkesmod
  • The RLGym plugin for Bakkesmod (It's installed automatically by pip)
  • Python >= 3.7

Installation

Install the library via pip:

pip3 install rlgym

Then simply run example.py from our repo to ensure everything works.

Usage

To run a premade environment, call rlgym.make with the name of the environment you would like to create. For example, the following code will create an instance of the Duels environment:

import rlgym
env = rlgym.make("Duel")

If you would like to build any environment with self-play enabled, include the keyword "self" (not case sensitive) in the name of the environment, like so:

import rlgym
env = rlgym.make("DuelSelf")

You can take a look at example_self.py to see how to handle observations and actions when dealing with more than one agent.


RLGym comes with 3 pre-made environments:

  • Duel
  • Doubles
  • Standard

Each can be instantiated by calling rlgym.make with the name of the environment you would like to create.

RLGym also provides you the ability to create your own environments with a number of potential configurations through optional parameters:

env = rlgym.make("Duel", 
                 ep_len_minutes: float,
                 game_speed: int,
                 tick_skip: int,
                 spawn_opponents: bool,
                 random_resets: bool,
                 team_size: int,
                 terminal_conditions: List[rlgym.utils.TerminalCondition],
                 reward_fn: rlgym.utils.RewardFunction,
                 obs_builder: rlgym.utils.ObsBuilder)

For more information on how to build a custom RLGym environment, please visit our Wiki.

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

rlgym-0.2.0.tar.gz (97.9 kB view details)

Uploaded Source

File details

Details for the file rlgym-0.2.0.tar.gz.

File metadata

  • Download URL: rlgym-0.2.0.tar.gz
  • Upload date:
  • Size: 97.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.8

File hashes

Hashes for rlgym-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9d4c18c6b02c7cf957057e59d3cbd0c8bb620ea23740926a32acf4a9ff0bfce6
MD5 ba95ba74d5a0ebc1c66949ca8e293fdf
BLAKE2b-256 55824ea326634b73fe6fb30290a35ce9d45be26a657884a708bc7f321d7a9d8a

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