{"id":7679,"library":"rlbot","title":"RLBot","description":"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.","status":"active","version":"1.68.0","language":"en","source_language":"en","source_url":"https://github.com/RLBot/RLBot","tags":["rocket-league","game-ai","bot-framework","offline"],"install":[{"cmd":"pip install rlbot","lang":"bash","label":"Install core RLBot package"}],"dependencies":[{"reason":"Optional package for bots that require advanced action server capabilities (e.g., tactical suggestions).","package":"rlbot-action-server","optional":true}],"imports":[{"symbol":"BaseAgent","correct":"from rlbot.agents.base_agent import BaseAgent"},{"symbol":"SimpleControllerState","correct":"from rlbot.agents.base_agent import SimpleControllerState"},{"symbol":"GameTickPacket","correct":"from rlbot.utils.structures.game_data_struct import GameTickPacket"},{"note":"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.","symbol":"RLBotServer.exe","correct":"RLBotServer.exe (part of the framework, not a Python import)"}],"quickstart":{"code":"import os\nfrom rlbot.agents.base_agent import BaseAgent, SimpleControllerState\nfrom rlbot.utils.structures.game_data_struct import GameTickPacket\n\n\nclass MyBot(BaseAgent):\n\n    def initialize_agent(self):\n        # This runs once before the bot starts.\n        self.logger.log(\"MyBot initialized!\")\n\n    def get_output(self, packet: GameTickPacket) -> SimpleControllerState:\n        # This is called every tick of the game.\n        # Implement your bot's logic here.\n\n        controller_state = SimpleControllerState()\n\n        # Example: Drive towards the ball\n        ball_location = packet.game_ball.physics.location\n        my_car = packet.game_cars[self.index]\n        car_location = my_car.physics.location\n\n        # Simple steer towards the ball\n        if ball_location.y > car_location.y:\n            controller_state.throttle = 1.0\n        else:\n            controller_state.throttle = -1.0\n\n        # Steering logic (very basic)\n        if ball_location.x < car_location.x:\n            controller_state.steer = -1.0\n        elif ball_location.x > car_location.x:\n            controller_state.steer = 1.0\n        else:\n            controller_state.steer = 0.0\n\n        return controller_state\n\n\n# To run this bot:\n# 1. Ensure you have Rocket League installed and RLBot setup (pip install rlbot).\n# 2. Typically, you'd clone an example project (e.g., RLBot/python-example),\n#    place this code in its 'bot.py', and run 'python run.py' from that project's root.\n#    The RLBot framework will launch Rocket League and your bot automatically.\n","lang":"python","description":"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."},"warnings":[{"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.","message":"Migration 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.","severity":"breaking","affected_versions":"All versions migrating from v4 to v5 (starting v5.0.0-beta)"},{"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.","message":"On 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.","severity":"gotcha","affected_versions":"All versions on affected Windows systems"},{"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.","message":"RLBot 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.","severity":"gotcha","affected_versions":"RLBot v5.0.0-beta and newer"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"During Python installation, ensure 'Add Python to PATH' is selected. If using a virtual environment, activate it with `.\\venv\\Scripts\\activate` (Windows) or `source venv/bin/activate` (Linux/macOS) before running pip commands. You might also need to delete and recreate the virtual environment if an initial setup failed.","cause":"Python or pip is not correctly added to the system's PATH environment variable, or a virtual environment containing pip is not activated.","error":"'pip' is not recognized as an internal or external command, operable program or batch file."},{"fix":"Add the RLBot installation directory and your bot project directories to your antivirus software's exclusion list. Also, check if any RLBot-related `.dll` or `.exe` files have been quarantined or deleted by the antivirus. Restart your computer if issues persist.","cause":"This error, along with 'Access is denied' or other WinError messages, often indicates that antivirus software is interfering with RLBot's files or processes.","error":"FileNotFoundError: [WinError 2] The system cannot find the file specified"},{"fix":"Verify your active Python version with `python --version` or `py -3 --version`. Ensure Python 3 is correctly installed and its path is prioritized in your system's environment variables. If using a virtual environment, ensure it's created with Python 3.","cause":"This error often occurs when the system attempts to use Python 2 instead of Python 3, or when the Python environment is corrupted, and PyQt5 (or other Python 3-specific packages) cannot be found.","error":"Could not find a version that satisfies the requirement PyQt5 (from versions: none)"}]}