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:

  • Duels
  • 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 the custom_args parameter:

env = rlgym.make("Duel", custom_args={
        ep_len_minutes: float,
        game_speed: int,
        tick_skip: int,
        spawn_opponents: bool,
        random_resets: bool,
        team_size: int,
        terminal_conditions: list(rlgym.utils.terminal_conditions.TerminalCondition),
        reward_fn: rlgym.utils.reward_functions.RewardFunction,
        obs_builder: rlgym.utils.obs_builders.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.1.2.tar.gz (96.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rlgym-0.1.2.tar.gz
  • Upload date:
  • Size: 96.2 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.1.2.tar.gz
Algorithm Hash digest
SHA256 f914eae312ad440b0a1321c2d4f27f395cf887f582360445cdb3dc72efa4801c
MD5 1e97d4d85876b6c77c52e8c011cbd8f5
BLAKE2b-256 c27024402d7e50ba7df859ef6778deaa94e8a5b6c5b4903ad26545f40aa16180

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