A framework that allows people to write their own Rocket League bots.

Overview

YOU PROBABLY SHOULDN'T PULL THIS REPO

Bot Makers Read This!

If you just want to make a bot, you don't need to be here. Instead, start with one of these:

If you just want to play with some bots, you can go to RLBotGUI to easily start matches with bots

Framework Contributors

This repository is currently incomplete to meet the legal needs of the Psyonix API. It is missing the source code behind RLBot.exe, and a few other files. If you want to make a code change that involves RLBot.exe (or the interface dll since it's closely related), you'll need some help from someone with access to the closed repo.

We expect we'll be able to open-source everything eventually, and then this repo will be back in business.

NOTICE: We intend to cherry-pick any commits you make here into the closed repo. At a later date, when we have permission to open-source everything, we will force push the closed repo to this master branch. Your commits will still be there with proper attribution, but if you have any work in progress, it will need to be rebased at that time.

RLBot

Framework Info

The RLBot framework helps people create bots for use in Rocket League's offline modes, just for fun. It provides values from the game like car and ball position, and carries back button presses. RLBot works for up to 10 bots reliably; it can be used up to 64, but can result in issues (bots disappearing after goals, spawning inside one another, etc).

Requirements

Rocket League, Python 3.6+

Quick Start

  1. Run setup.bat (or equivalent if you're on Linux or Mac)
  2. Open a terminal and execute python runner.py

Development Workflow

The first thing you'll want to do is run setup.bat. This does a lot of important things:

  • Sets up your rlbot installation in pip to link to your local files in this folder. Once you've done this, running rlbot from anywhere on your computer will reference these local files, including the dlls, etc.
  • Generates important code based on the .fbs message spec. Therefore it's a prerequisite for running anything.
  • Installs python package dependencies.

If you're doing work that affects our .dll or .exe files, you should also be aware of:

  • copy-dlls.bat - This copies the debug versions any built dlls from visual studio into the correct subdirectory in the python source folder.
  • copy-dlls-release.bat - This copies the release versions any built dlls from visual studio into the correct subdirectory in the python source folder.

For deploying changes, please see https://github.com/RLBot/RLBot/wiki/Deploying-Changes

When you're done with development and want to get back to the official rlbot version vended from https://pypi.org/project/rlbot/, the easiest way to do that is simply pip uninstall rlbot. Then the next time you execute a bat file from one of the RLBot*Example repos, a fresh copy will be installed from pip.

Wikis

There's tons of good information at https://github.com/RLBot/RLBot/wiki

Extras

Community Info

Video Example

Video

Tournament History

Tournament results are recorded in our braacket league.

Videos:

The best part

Psyonix Cone gave us a thumbs up! Thumbs up

Issues
  • Addresses probably off (mega issue thread)

    Addresses probably off (mega issue thread)

    Since rocket league has updated several times I'm pretty sure the addresses for most variables have changed.

    When attempting to train I would the error: "OverflowError Python int too large for c Long" when trying to read the z axis height of the ball and another variable

    I verified in cheatengine that the current address for the ball z height no longer existed, or maybe I mistyped the offset.

    Would love if you kept this updated, I wrote a mod for xbox.py so that I can take regular keyboard inputs again for training since I play on a keyboard.

    opened by ddthj 31
  • rlbot not running with required arguments

    rlbot not running with required arguments

    It isn't running with required arguments? I have no access to discord, please help me here. I tried adding the launch arguments manually, it worked before, but then the update changed the launch arguments. Thanks! Capture Captu1re

    opened by EshanTahir 14
  • Porting to linux

    Porting to linux

    Since rocket league is available for linux, most AI developers use linux and this package is gaining a lot of traction. It only makes sense to port it to linux (I am willing to help with this)

    The reason I am interested is that I want to develop some bots using machine learning and my environment is set up in linux. What all needs to be changed and ported for using this with linux.

    enhancement help wanted 
    opened by Ridhwanluthra 13
  • PythonHivemind.initialize_hive(packet) called with invalid GameTickPacket (after updating from RLBot 1.48 to 1.54)

    PythonHivemind.initialize_hive(packet) called with invalid GameTickPacket (after updating from RLBot 1.48 to 1.54)

    We are running into a nasty issue after updating our (pipenv) virtual environment from Rlbot 1.48 to the newest release (1.54).

    Context

    For testing purposes, we use

    from rlbot import runner
    runner.main() 
    

    as well as some custom functionality build around it.

    • Our bot is a PythonHivemind (launched as a helper process).
    • This issue does not occur when launching our code via the GUI.
    • We do not have support_early_start enabled.

    The Issue

    Since the update, the packet that is passed to self.initialize_hive(packet) during bot startup is no longer valid. For instance, it has values:

    num_boost:0
    num_cars:0
    num_teams:0
    num_tiles:0
    

    ...instead of the expected values as read from the MatchConfig.
    This call results in incorrect initialization of our bot and finally in fatal errors during calls to get_output()

    We have attempted to debug the SetupManager/PythonHivemind/GameInterface, but it's hard.

    The only workaround that we have found so far is:

    • check in initialize_hive "if packet.num_cars == 0: then skip initialize_hive's functionality".
    • During calls to get_outputs, return {index: PlayerInput() for index in self.drone_indices} until the input packet in the get_outputs call is finally a valid one (packet.num_cars != 0)
    • Then we retry a call to self.initialize_hive(packet).

    Notes

    This seems to be a bug somewhere in the game interface. We have also noticed, since the RLBot update, this change in the implementation of PythonHivemind. This bit of code is new:

    # Line 67:
    # Wait for legitimate field info
            while True:
                self.game_interface.update_field_info_packet(self._field_info)
                if self._field_info.num_goals > 0:
                    break
                time.sleep(0.2)
    

    Deleting this part doesn't solve our issue (as expected), but maybe this was an attempt to prevent it?

    Conclusion

    It definitely doesn't seem like intended behaviour. Why would you have to tell the game interface what your bot wants to do before the game's match is even properly populated?

    bug 
    opened by Trezorro 13
  • RLBot_Injector flagged as virus.

    RLBot_Injector flagged as virus.

    Looked through the source for the RLBot injector and am not concerned about it actually being a virus, but wanted to highlight the fact it's being flagged as a false-positive by several virus scanning vendor. My reproduction steps are as follows with my experience using python.

    1. Install rlbot via pip.
    2. Upload the site-packages/rlbot/dll/RLBot_Injector.exe to virustotal.com (or it'll already be flagged by the virus scanner).
    3. You'll see the vendors which currently flag the executable.
    4. With my virus scanning vendor, flagging the file as safe doesn't seem to fix the issue unfortunately.

    Possible mitigation is to sign the executable with a certificate via sign-tool.exe. A self-signed cert may be enough to stop the false positives but I know some virus scanning vendors do not recognize self signed certs.

    opened by nuvious 10
  • Score info not working

    Score info not working

    When trying to run this, Im printing out all the values that are sent in the get_output()

    This seems to work except for the score info. All values inside that table stay at 0 and do not change.

    Below is the output of all the print statements, at the time the bot itself had around a score of 600 and scored twice.

    Vector3<x: -2631.56005859375, y: 3886.969970703125, z: 17.059999465942383> Rotator<pitch: -0.009587380103766918, yaw: 1.436381220817566, roll: 0.0> Vector3<x: 190.51100158691406, y: 1014.8909301757812, z: -0.5509999990463257> Vector3<x: 0.0, y: 0.0, z: 2.338209867477417> ScoreInfo<score: 0, goals: 0, own_goals: 0, assists: 0, saves: 0, shots: 0, demolitions: 0> False True False True False False PythonExampleBot 0 100

    bug 
    opened by gjossep 10
  • Add Team Score.

    Add Team Score.

    This adds number of goals scored by each team. Potential fix for #323 & #324

    opened by RLMarvin 9
  •  Give each game_ticket_packet to the agent exactly once

    Give each game_ticket_packet to the agent exactly once

    See commit messages for details.

    opened by DomNomNom 8
  • Why using made up units when actual meters can be reconstructed?

    Why using made up units when actual meters can be reconstructed?

    Hi, I know the usage of the uu unit was already a standard in the jargon, but I wonder why not just deriving (at least roughly) meters from the known relationship between ball travel length and known velocity value at the explosion.

    Given km/h speed we can obtain the speed in m/s. From a shot at a known speed at a known given distance one could derive how many meters it traveled, and make a uu-to-m relationship :D

    Important stuff, I mean.

    question 
    opened by raggot 8
  • Get Latest driver error

    Get Latest driver error

    image Um i was making a scratch bot, but the console is showing that i need to get drivers for chrome, i was told that it's supposed to install automatically but it just tell to get the latest drivers (as shown in the image) this has been happening for about two days, and i cant even run the bot manually (i think so that i cant). Please someone help me i want my bot to go into League Play

    opened by nethsukethsu 0
  • Installation: ModuleNotFoundError: No module named 'rlbot_gui'

    Installation: ModuleNotFoundError: No module named 'rlbot_gui'

    Hello, total noob over here (i'm sorry)

    It's been two days, I'm not able to launch RLBot.

    First time it worked (i saw the interface and installed the bot packages) but the game did not run - think it was a problem with my antivirus so I added an exception as the troubleshooting says. I tried again and I got this message from the rlbotgui.exe :

    cmd-rlgui

    Already followed the troubleshooting page and the "installation errors" guide as well as the "'pip 'is not recognized as an internal or external command" guide. Same message each time. I've deleted Rlbot and reinstalled it several times.

    Couldn't find the issue elsewhere. Does anyone know how to fix this ? I'm very frustrated that it worked partially at the start and now I can't even get to the GUI.

    Thanks in advance ! (Sorry if it's a stupid issue)

    opened by CoffeeArmor 2
  • Running 3+ Scratch bots

    Running 3+ Scratch bots

    Hello!

    I'm organizing a 2v2 bot event between friends, and since most are non-coders I am hoping to get them building in Scratch. I was testing everything out and tried running 4 Scratch bots simultaneously (2 blue, 2 orange). However, only 2 chrome windows opened and only 2 bots were being controlled.

    Is this a known issue? I dug through the scratch_manager.py file to see if there were any clear limitations but I didn't see anything that would cause that, to my knowledge. I'll dig more, but wondering if it's a known issue.

    Thanks!

    opened by brandoshizzle 10
  • Retrieving Image instead of coordinates

    Retrieving Image instead of coordinates

    Hi, I want to ask if it is possible to retrieve the image/screen instead of coordinate information.

    opened by NaxAlpha 4
  • Add team-only matchcomms (and catch an exception in process_configuration.py)

    Add team-only matchcomms (and catch an exception in process_configuration.py)

    How team-only matchcomms work:

    • NOTE: This only works in Python.
    • rlbot.matchcomms.client.MatchcommsClient automatically adds team to the sent packets.
    • This doesn't break anything, unless you are sending a packet where team is the team you are not on, in which case the client will silently change it to your own team.
    • If you would like to send a team-only matchcomm, add 'team_only': True to your packet. If it is False or ommitted everybody can see it.
    • Scripts can see all matchcomms, even team-only ones, and the ones they send are visible to everybody.
    • It is possible to spoof this by bypassing the client entirely. See this Discord conversation for more information on this.

    I also added a catch in process_configuration.py that came up while I was working on this.

    I'm sure I forgot something. Tell me if I did and I will fix it.

    opened by rivques 10
  • Rendering should be on by default for new RLBotGUI installations.

    Rendering should be on by default for new RLBotGUI installations.

    We get a lot of confusion from new botmakers about why their rendering isn't working, since it's off by default.

    Previously we got a lot of questions from casual users wanting to disable it. Render instructions for turning it off with PgDown during the beginning of the match.

    opened by tarehart 4
  • Instant Start doesn't work unless you launch Rocket League with it enabled

    Instant Start doesn't work unless you launch Rocket League with it enabled

    To reproduce:

    • start RLBotGUI
    • launch a match with Instant Start disabled
    • enable Instant Start
    • start another match

    https://discord.com/channels/348658686962696195/348658686962696196/809193212706553867

    bug 
    opened by ViliamVadocz 0
  • Hot reload has issues with isinstance and Enum

    Hot reload has issues with isinstance and Enum

    Some python features seems to cause problems for the hot reloading. The features in question are the use of isinstance and using an Enum in dictionary. The specific patterns I had to remove from my bots were:

    if isinstance(right, Vec3):
        # ...
    

    and

    obj_bonus = {
        Objective.ATTACK: 1,
        Objective.DEFEND 0,
        Objective.ASSIST: 0.5,
    }[bot.current_objective]
    
    # where Objective is
    class Objective(Enum):
        ATTACK = 1
        DEFEND = 2
        ASSIST = 3
    

    There might be other features. These are just the ones found so far.

    As temporary solutions:

    • isinstance can often be replaced with hasattr and
    • Enum can be omitted
    bug 
    opened by NicEastvillage 0
  • Ghost boost on Salty Shores

    Ghost boost on Salty Shores

    I don't know much about it except that it's large, and near (0, 0) on both the X and Y axis, although it's much closer to 0 on the Y axis.

    opened by VirxEC 0
  • Ghost boost on BeckwithPark_Midnight

    Ghost boost on BeckwithPark_Midnight

    There is an actual ghost boost on BeckwithPark_Midnight. I made a simple script to loop through all the standard maps and print the boost count, and confirmed that this is truly the only map. All standard maps have 34 boost pads, while BeckwithPark_Midnight has 35.

    This boostpad is on index 12 and is positioned very far from the actual map, on coords Vector3<x: -187561.703125, y: -0.004880812019109726, z: 8.980125427246094>.

    • this completely breaks Self-driving car on that map, because it infers game mode from the boost pad count
    • this may break other bots who find boost pads based on indexes (we have those listed on the wiki), because the boost pad is in index 12 and all following pads are shifted by 1!
    opened by Darxeal 0
This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their coordinates and detected labels.

This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their

Liron Bdolah 7 Oct 19, 2021
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!

Serpent.AI - Game Agent Framework (Python) Update: Revival (May 2020) Development work has resumed on the framework with the aim of bringing it into 2

Serpent.AI 6.1k Dec 3, 2021
Using this codebase as a tool for my own research. Making some modifications to the original repo for my own purposes.

For SwapNet Create a list.txt file containing all the images to process. This can be done with the GNU find command: find path/to/input/folder -name '

Andrew Jong 2 Nov 10, 2021
Ludwig is a toolbox that allows to train and evaluate deep learning models without the need to write code.

Translated in ???? Korean/ Ludwig is a toolbox that allows users to train and test deep learning models without the need to write code. It is built on

Ludwig 8k Nov 27, 2021
Ludwig is a toolbox that allows to train and evaluate deep learning models without the need to write code.

Translated in ???? Korean/ Ludwig is a toolbox that allows users to train and test deep learning models without the need to write code. It is built on

Ludwig 8k Nov 26, 2021
Automates Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning :rocket:

MLJAR Automated Machine Learning Documentation: https://supervised.mljar.com/ Source Code: https://github.com/mljar/mljar-supervised Table of Contents

MLJAR 1.7k Dec 4, 2021
Rocket-recycling with Reinforcement Learning

Rocket-recycling with Reinforcement Learning Developed by: Zhengxia Zou I have long been fascinated by the recovery process of SpaceX rockets. In this

Zhengxia Zou 163 Nov 28, 2021
TLoL (Python Module) - League of Legends Deep Learning AI (Research and Development)

TLoL-py - League of Legends Deep Learning Library TLoL-py is the Python component of the TLoL League of Legends deep learning library. It provides a s

null 1 Nov 28, 2021
Code for "Layered Neural Rendering for Retiming People in Video."

Layered Neural Rendering in PyTorch This repository contains training code for the examples in the SIGGRAPH Asia 2020 paper "Layered Neural Rendering

Google 137 Oct 21, 2021
A simple python library for fast image generation of people who do not exist.

Random Face A simple python library for fast image generation of people who do not exist. For more details, please refer to the [paper](https://arxiv.

Sergei Belousov 152 Nov 30, 2021
Implementation for the paper SMPLicit: Topology-aware Generative Model for Clothed People (CVPR 2021)

SMPLicit: Topology-aware Generative Model for Clothed People [Project] [arXiv] License Software Copyright License for non-commercial scientific resear

Enric Corona 162 Nov 29, 2021
People movement type classifier with YOLOv4 detection and SORT tracking.

Movement classification The goal of this project would be movement classification of people, in other words, walking (normal and fast) and running. Yo

null 4 Sep 21, 2021
Neural network for recognizing the gender of people in photos

Neural Network For Gender Recognition How to test it? Install requirements.txt file using pip install -r requirements.txt command Run nn.py using pyth

Valery Chapman 3 Oct 10, 2021
Code for ICCV2021 paper SPEC: Seeing People in the Wild with an Estimated Camera

SPEC: Seeing People in the Wild with an Estimated Camera [ICCV 2021] SPEC: Seeing People in the Wild with an Estimated Camera, Muhammed Kocabas, Chun-

Muhammed Kocabas 95 Nov 24, 2021
A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding his way.

GuidEye A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding h

Munal Jain 1 Oct 17, 2021
a dnn ai project to classify which food people are eating on audio recordings

Deep Learning - EAT Challenge About This project is part of an AI challenge of the DeepLearning course 2021 at the University of Augsburg. The objecti

Marco Tröster 1 Oct 24, 2021
Starter code for the ICCV 2021 paper, 'Detecting Invisible People'

Detecting Invisible People [ICCV 2021 Paper] [Website] Tarasha Khurana, Achal Dave, Deva Ramanan Introduction This repository contains code for Detect

Tarasha Khurana 7 Nov 17, 2021