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")

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.0.tar.gz (95.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page