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

Comments
  • 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
  • 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
  • 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
  • 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 11
  • 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
  • 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
  • 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
  • Human players not properly added to game tick packet

    Human players not properly added to game tick packet

    [PYTHON] In the new Psyonix API, whenever a human player joins the match, the player is not properly added to the game tick packet. The packet.num_cars value is not updated to reflect the number of players, and even though a new car appears to be added to packet.game_cars, values such as location and velocity are not updated.

    opened by DaCoolOne 7
  • Fix GUI preset load and relative path problems

    Fix GUI preset load and relative path problems

    This fixes GUI loading to not discard preset configuration files that share the same name but are located in different directories. The GUI would correctly save the rlbot.cfg file when multiple agents were added with the same name, but the loading code would overwrite all presets loaded after the initial due to matching on preset name alone.

    opened by ima9rd 7
  • Rendering manager sends `bad status BufferOverfilled` when moving the RL window around.

    Rendering manager sends `bad status BufferOverfilled` when moving the RL window around.

    When you move the Rocket League window while a bot is trying to render, the console will be spammed with ERROR:Renderer[rendering_manager.py:49 - send_group() ] bad status BufferOverfilled.

    image

    bug 
    opened by ViliamVadocz 6
  • Rendering strings (text) no longer works if scale_x or scale_y is set to 1

    Rendering strings (text) no longer works if scale_x or scale_y is set to 1

    Hi there. Sometime in the past few months rendering strings (both 2D and 3D) stopped working in my own bots as well as all the other bots I had been playing against that also print out their own debug information (e.g. Self-Driving Car). This applies to bots written in different languages (e.g. mine is in Go, while Self-Driving Car is written in Python I believe).

    By pure luck I just happened to try changing scale_x and scale_y parameters in my code, and lo and behold, it turned out that with values 2 or higher the string rendering works normally, but changing them back to 1 disables the rendering of those strings again.

    What is strange though, is that the issue started months ago if I recall correctly (at minimum it's been many weeks), yet I haven't heard of anyone else being affected by it even after asking on Discord. Has anyone else here seen this same issue, or able to reproduce it?

    opened by goteppo 2
  • Bots don't spawn in LAN matches

    Bots don't spawn in LAN matches

    Have followed all tutorial and everything is correct and working for solo play, but when I quit to main menu and start a LAN match with Rocket Plugin, the bots do not spawn. Any ideas?

    opened by StressDad 0
  • Game Crash

    Game Crash

    Hi, my problem is that i have already done everything, I am playing on epic and if I try to start the game with rlbot it just opens the game and then just crash. it saying on epic that game is running but it not. idk what I supposed to do.

    opened by SmoloW 0
  • RLBot seems to be corrupting my game install - loss of audio and freezing game

    RLBot seems to be corrupting my game install - loss of audio and freezing game

    Since I've started playing with RLBot, which I love by the way, a couple times I have had my game start acting strand and taking a long time to load, there is no audio, and it freezes for a second or so every few seconds. I have tried removing save data, stop syncing with Steam cloud, and generating new save files but this does not work. The only thing that has worked is to uninstall and reinstall the game, which I'm sure is not the easiest way to fix this. This has happened several times. I'd like to provide more information if you want to look into this.

    opened by jefeyay 2
Owner
null
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 8 May 22, 2022
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.4k Jan 5, 2023
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
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 2.4k Dec 31, 2022
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 202 Jan 3, 2023
Diabet Feature Engineering - Predict whether people have diabetes when their characteristics are specified

Diabet Feature Engineering - Predict whether people have diabetes when their characteristics are specified

Şebnem 6 Jan 18, 2022
Özlem Taşkın 0 Feb 23, 2022
Code for Private Recommender Systems: How Can Users Build Their Own Fair Recommender Systems without Log Data? (SDM 2022)

Private Recommender Systems: How Can Users Build Their Own Fair Recommender Systems without Log Data? (SDM 2022) We consider how a user of a web servi

joisino 20 Aug 21, 2022
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 8.7k Jan 5, 2023
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 8.7k Dec 31, 2022
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 7 Nov 29, 2022
Character-Input - Create a program that asks the user to enter their name and their age

Character-Input Create a program that asks the user to enter their name and thei

PyLaboratory 0 Feb 6, 2022
Monify: an Expense tracker Program implemented in a Graphical User Interface that allows users to keep track of their expenses

?? MONIFY (EXPENSE TRACKER PRO) ?? Description Monify is an Expense tracker Program implemented in a Graphical User Interface allows users to add inco

Moyosore Weke 1 Dec 14, 2021
A python interface for training Reinforcement Learning bots to battle on pokemon showdown

The pokemon showdown Python environment A Python interface to create battling pokemon agents. poke-env offers an easy-to-use interface for creating ru

Haris Sahovic 184 Dec 30, 2022
null 113 Nov 28, 2022
Using LSTM write Tang poetry

本教程将通过一个示例对LSTM进行介绍。通过搭建训练LSTM网络,我们将训练一个模型来生成唐诗。本文将对该实现进行详尽的解释,并阐明此模型的工作方式和原因。并不需要过多专业知识,但是可能需要新手花一些时间来理解的模型训练的实际情况。为了节省时间,请尽量选择GPU进行训练。

null 56 Dec 15, 2022