Registry / ai-ml / rlbot
library1.68.0pypypiunverified

RLBot is a Python framework for developing custom AI bots to play Rocket League in offline matches. It provides access to real-time game data, such as car and ball positions, and allows bots to send controller inputs back to the game. The framework reliably supports up to 10 bots and is actively maintained, with version 5 (v5) introducing significant architectural changes for improved reliability and features, including a shift to WebSocket communication.

pip install rlbot
INSTALL
IMPORT
SIG · RLBOT
R
rlbot
ai-mlpythonv1.68.0
Install
7.5s avg
Import
270ms
Disk
75MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.68.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 7.5s · import 0.162s · 75MB
75MB installed
● package 75MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BaseAgent
from rlbot.agents.base_agent import BaseAgent
SimpleControllerState
from rlbot.agents.base_agent import SimpleControllerState
GameTickPacket
from rlbot.utils.structures.game_data_struct import GameTickPacket
RLBotServer.exe
RLBotServer.exe (part of the framework, not a Python import)
RLBotServer.exe is a core component of the RLBot framework that handles communication with the game and is launched separately, not imported into Python code.

This quickstart demonstrates a basic RLBot agent that drives towards the ball. To run an RLBot, developers typically start by cloning the official `RLBot/python-example` repository, creating a Python virtual environment, installing dependencies from `requirements.txt`, and then modifying the `bot.py` file to implement their desired bot logic. The bot's `get_output` method is called every game tick to produce controller inputs.

import os from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket class MyBot(BaseAgent): def initialize_agent(self): # This runs once before the bot starts. self.logger.log("MyBot initialized!") def get_output(self, packet: GameTickPacket) -> SimpleControllerState: # This is called every tick of the game. # Implement your bot's logic here. controller_state = SimpleControllerState() # Example: Drive towards the ball ball_location = packet.game_ball.physics.location my_car = packet.game_cars[self.index] car_location = my_car.physics.location # Simple steer towards the ball if ball_location.y > car_location.y: controller_state.throttle = 1.0 else: controller_state.throttle = -1.0 # Steering logic (very basic) if ball_location.x < car_location.x: controller_state.steer = -1.0 elif ball_location.x > car_location.x: controller_state.steer = 1.0 else: controller_state.steer = 0.0 return controller_state # To run this bot: # 1. Ensure you have Rocket League installed and RLBot setup (pip install rlbot). # 2. Typically, you'd clone an example project (e.g., RLBot/python-example), # place this code in its 'bot.py', and run 'python run.py' from that project's root. # The RLBot framework will launch Rocket League and your bot automatically.
Debug
Known issues
breakingMigration from RLBot v4 to v5 involves breaking changes, primarily moving from `.cfg` configuration files to `.toml` format for bot settings and transitioning bot-to-framework communication from DLLs to WebSockets. Old v4 bots may not be compatible with v5 without modifications.
fix
Consult the official 'RLBot/python-interface/wiki/Migration' guide. Update bot configuration files to `.toml` format and adapt communication logic if custom low-level interactions were used. For most Python bots, updating the example project ensures compatibility.
affects: All versions migrating from v4 to v5 (starting v5.0.0-beta)
gotchaOn Windows 10/11, sometimes `AppData\Local\Microsoft\WindowsApps` is in the system PATH, causing `python.exe` to open the Microsoft Store instead of running your Python installation, leading to unexpected behavior or 'nothing printed' errors.
fix
Check your PATH environment variable using `where.exe python` in the command prompt. If the Microsoft Store python.exe is listed first, modify your PATH to prioritize your actual Python installation's directory or remove the problematic entry.
affects: All versions on affected Windows systems
gotchaRLBot v5 and newer versions require Python 3.12 or later. Using older Python versions will lead to compatibility issues and errors during setup or runtime.
fix
Ensure you have Python 3.12 or a later compatible version installed. Activate a virtual environment created with the correct Python version before installing RLBot dependencies.
affects: RLBot v5.0.0-beta and newer
Upgrade
Version history
1.68.0latest on PyPI · released Jun 2, 2024
Audit
Dependencies
rlbot-action-serveroptionalOptional package for bots that require advanced action server capabilities (e.g., tactical suggestions).
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
rlbot — pip install rlbot · libregistry