Git Product home page Git Product logo

autoleague's Introduction

AutoLeague for League Play

DomNomNom's Autoleague modified to play RLBot's Official League Play.

How to use:

Recommended: Use Bakkesmod and have 'Automatically save all replays' enabled.

Installation:

  • To install, clone this repo and run pip install -e . in the directory containing setup.py.
  • This should give you access to the autoleagueplay command line tool. Try autoleague --help.

Usage:

autoleagueplay (odd | even) <path/to/current/ladder.txt>  | Plays an odd or even week from the given ladder
autoleagueplay fetch <week_num> <league_dir>              | Fetches the given ladder from the Google Sheets
autoleagueplay (-h | --help)                              | Show commands and options
autoleagueplay --version                                  | Show version

Options:

--replays=R          What to do with the replays of the match. Valid values are 'save', and 'calculated_gg'. [default: calculated_gg]
--list               Instead of playing the matches, the list of matches is printed.
--results            Like --list but also shows the result of matches that has been played.
-h --help            Show this screen.
--version            Show version.

The ladder is described by a text file, e.g. ladder.txt. This should contain the bot names separated by newlines (it can be copy-pasted directly from the sheet). A bots/ directory with all the bots and their files must be located next to the ladder file.

When running the script you point it to the ladder file and give it either odd or even as argument to set what type of week it should play:

  • Odd: Overclocked, Circuit, Transitor, ect plays.
  • Even: Quantum, Processor, Abacus, etc plays.

Results are stored in a matches directory next to the ladder file. Each match will get a json file with all the relevant data, and they are named something like quantum_reliefbot_vs_atlas_result.json. When all results are found, a new ladder ladder_new.txt is created next to the original ladder file.

Advanced Usage:

Match Config

Change autoleague/default_match_config.cfg for other game modes and mutators.

Psyonix Bots

AutoLeaguePlay can handle Psyonix bots, but their names must be: Psyonix Allstar, Psyonix Pro, and Psyonix Rookie. You don't have to give them config files in the bots/ directory. AutoLeaguePlay has its own config files for Psyonix bots. If you really want to give them different names, change them there.

Fetching ladder from Google Sheets

You can fetch the ladder from the Google Sheets with the autopleagueplay fetch <week_num> <league_dir> command. Before you can use this you must get a credentials.json file which you can get by enabling Google Sheets API and then download the client configurations. Put the credentials.json in autopleagueplay/cred/. Next time you run the command, Google wants your permission, and then it should work.

Current Match and Overlay

AutoLeaguePlay creates a current_match.json next to the ladder file whenever a match is about to begin. This file contains the division, and the paths to the bots currently playing. E.g.:

{
    "division": 0,
    "blue_config_path": "C:\\User\\RLBot\\League\\bots\\Self-driving car\\self-driving-car.cfg",
    "orange_config_path": "C:\\User\\RLBot\\League\\bots\\Beast from the East\\beastbot.cfg"
}

The information in the file can be used for an overlay. When the new ladder is complete the current_match.json is removed.

autoleague's People

Contributors

domnomnom avatar martmists-gh avatar niceastvillage avatar tarehart avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.