Package botroyale

Bot Royale Documentation

A battle royale for bots. Write your own bots in Python and watch them play!

Install

pip install --upgrade botroyale

See the install guide for more details.

Quickstart

It takes as few as 7 lines of code to write your own bot and watch it play:

import botroyale as br

class MyBot(br.BaseBot):
    NAME = 'mybot'

    def poll_action(self, state):
      return br.Idle()  # Add bot logic here

br.register_bot(MyBot)
br.run_gui()

Note: Bot Royale is still in early development and the API is likely to change somewhat when upgrading to newer versions.

Resources

Preview GIF

Expand source code Browse git
""".. include:: ../docs/homepage.md"""  # noqa: D415

# For the sake of a convenient API, we star import the api subpackage, which
# defines __all__ to contain all the names to be available directly.
from botroyale import api
from botroyale.api import *  # noqa: F401,F403


__all__ = api.__all__
__pdoc__ = {
    # The GUI backend requires no documentation (for now)
    "gui": False,
    # The bots subpackage contains the built-in bots
    "bots": False,
    # The run subpackage has arg parsing for help
    "run": False,
    # Filtering out undocumented items raises a warning
    **{n: False for n in api.DOCUMENTED_API},
}

Sub-modules

botroyale.api

Specifications and functions for interfacing different parts of the program …

botroyale.guides

A collection of guides for Bot Royale …

botroyale.logic

Game mechanics …

botroyale.util

Common independent functions and values.