beetlelib
The canonical Żuczki battle-royale engine, bot contract and training library. Use it to write a bot, train it locally against the native engine, and submit it to the platform unchanged.
pip install beetlelib
beetlelib init my-bot
cd my-bot
python run_local.py
Quickstart
import math
from beetlelib import Bot, Action, Control, Env
from beetlelib.bot.examples.greedy_bot import GreedyBot
class MyBot(Bot):
def __init__(self) -> None:
self.ready_to_play() # finish slow setup before signalling ready
def act(self, observations):
actions = {}
for beetle_id, obs in observations.items():
# steer toward the nearest food
target = min(obs.points, key=lambda p: (p.x - obs.me.x) ** 2 + (p.y - obs.me.y) ** 2, default=None)
angle = math.atan2(target.y - obs.me.y, target.x - obs.me.x) if target else obs.me.angle
actions[beetle_id] = Action(angle, Control.NONE)
return actions
env = Env(seed=7, opponents=[GreedyBot(), GreedyBot(), GreedyBot()])
obs, done = env.reset(), False
bot = MyBot()
while not done:
obs, rewards, done = env.step(bot.act(obs))
The contract
One method, shared by every controller (your bot, the baselines, the live human):
def act(self, observations: dict[str, Observation]) -> dict[str, Action]
You own a pair of two beetles, so you receive two observations (keyed by beetle id) and
return two actions. An Action is a steering target_angle plus a Control flag. An
Observation is your beetle's vision-bounded view: itself (me), and the nearby beetles,
points, rubys, obstacles and projectiles.
See src/template/task.md (ships with the participant kit) for the full rules, the
observation/action fields, the limits, and how to submit.
Submit from the command line
Log in once. The password is requested without displaying it and is not saved:
beetlelib login --server https://example.com --username your-name
Then upload bot.py and any other Python files it needs:
beetlelib upload bot.py helpers.py --name my-bot
You can pass a directory instead; all .py files directly inside it will be uploaded. If
your class is not MyBot in bot.py, provide its module and class name:
beetlelib upload my-bot/ --name my-bot \
--command "python -m beetlelib.bot.runner agent:SmartBot"
Metadata
Release files for beetlelib 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beetlelib-0.1.1.tar.gz | 326.3 kB | With provenance | Details for beetlelib-0.1.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| beetlelib-0.1.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for beetlelib-0.1.1-py3-none-win_amd64.whl |
| beetlelib-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details for beetlelib-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
| beetlelib-0.1.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for beetlelib-0.1.1-py3-none-macosx_11_0_arm64.whl |
| beetlelib-0.1.1-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details for beetlelib-0.1.1-py3-none-macosx_10_9_x86_64.whl |
Total release size: 688.4 kB
Release files / beetlelib-0.1.1.tar.gz
| Download URL | beetlelib-0.1.1.tar.gz |
|---|---|
| Size | 326.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9351c2ade67c44e2ecda505b35fa31b68af7d351716e77442c8a58fe17490cb
|
|
BLAKE2b-256 checksum How to use checksums |
aee2df10295f3aa4b55ce51cf02efdd74bb9c9c246bca96f9afc3af0fb54e781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logRelease files / beetlelib-0.1.1-py3-none-win_amd64.whl
| Download URL | beetlelib-0.1.1-py3-none-win_amd64.whl |
|---|---|
| Size | 110.3 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f6ffbe7daf2d6e7dff35e43936fa1b669da5c97dcacafc589898458633c3ff89
|
|
BLAKE2b-256 checksum How to use checksums |
f08bd59d90115ceb24febbbeda7bb57d38c9d2ed4f246548a3b0183eac61aaf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logRelease files / beetlelib-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | beetlelib-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 86.8 kB |
| Tags | Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
26c65cdee4af725ff15ceddc4bfce557201cbe55490da72b47ebeda91257fa76
|
|
BLAKE2b-256 checksum How to use checksums |
dcb717ca35728b932d057f1f046009842b8369078c608c429ae5fc3a5b14f3b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logRelease files / beetlelib-0.1.1-py3-none-macosx_11_0_arm64.whl
| Download URL | beetlelib-0.1.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 81.5 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
976cb58488c85747b61f62c45394dfb8aeeeaaffc2003c5ca92fa5cb284b90c9
|
|
BLAKE2b-256 checksum How to use checksums |
c0e3b613fc06191b0ab3f748a8a4959b2b2f6d8512d4cac2f1e1f8c45282499b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logRelease files / beetlelib-0.1.1-py3-none-macosx_10_9_x86_64.whl
| Download URL | beetlelib-0.1.1-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 83.6 kB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
27bea7989e3b3dc96dbed37a1b034aad0ffa8bf3fde4b4318007f1db31e8d4a5
|
|
BLAKE2b-256 checksum How to use checksums |
66b86e1df4084f3b92f63ff6f44dab60790411133e1505fe78235f307f9cb167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logSecurity for beetlelib 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for beetlelib-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.