Repository navigation
feat: Give bots character: a cast, moves and company around riders - #67
Merged
Merged
Conversation
Contributor
|
Whats with this 48 cap? Isn't there an env for it? Currently we have 75 in prod |
Every bot is now a made-up character ("Gus Tailwind", rarely Goldie
Lemon) whose name fixes a riding type and a team kit. Bots make moves
within a W' energy budget: they pull and swing off, attack near climb
tops, answer riders who come past and sprint for lines. They spawn in
groups out of sight around every human, and a route keeps more bots
the more humans ride it. Clients tint bots' jerseys by team, name the
type in the rider list and call out moves nearby in the ticker.
Closes #64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RalfLeonFasler
force-pushed
the
feat/bots
branch
from
November 10, 2026 19:37
d2444f6 to
ae171ac
Compare
Drop the growth with humans and its fixed cap of 48: a route keeps target_riders riders as before, and company around each human comes out of that count (far bots make room). One setting, no change in load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Good catch, thanks. The 48 had no env var, and with 75 it never did anything anyway. The formula was
I've updated the spec, the ADR, the CHANGELOG and the PR description to match. |
RalfLeonFasler
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64.
Why
Bots never reacted to anyone. They rode a fixed share of their FTP, spawned wherever the route was emptiest and were called "Swift Badger". On longer routes you rode mostly alone, and meeting a bot changed nothing. This gives every ride someone to chase, someone to ride with, and now and then someone who attacks you.
What changed
Who bots are (
sim/names.rs,sim/bot.rs)How they ride: moves within an energy budget
Where they appear and how many (
sim/world.rs)Groups: bots spawn in groups of 2–5, in rows at about one level. A bot that gets ahead of its group waits for it, and a bot 300 m from the rest rides alone.
Company: every human riding freely keeps at least 6 bots within 1.5 km ahead or 400 m behind. Missing company spawns out of sight (≥ 350 m away):
When the route is full, bots far from everyone make room.
Count: unchanged. A route keeps
OPENRADLR_TARGET_RIDERSriders, humans plus bots, as on main. Company comes out of that count: far bots make room, and nothing is added.0(the OpenBikeNet velodrome) still means no bots. A first draft grew the count with the humans, up to a fixed 48 that had no env var; that's gone after review.Protocol (additive, no version bump): bots' rider entries gain
team,styleandmove. Humans never have them.Client
Docs: spec and plan in
docs/superpowers/, ADR 0022,protocol.md,architecture.mdand the CHANGELOG.Tuning
I simulated one hour per route with one rider at 75% of a 3.0 W/kg FTP:
The first version spawned groups 350–1,200 m ahead and counted bots up to 1.5 km behind as company. On Col de la Forge that left the rider alone for 1,696 s of the hour, with one move nearby.
Then with
OPENRADLR_TARGET_RIDERSas the only count, on Col de la Forge (the other riders start with the first):Screenshots
Ridden on a local server built from this branch, in headless Chromium with the simulated trainer.
A climber in Team Moos green takes up the chase when you come past (TV side camera), and the ticker calls it out:
The rider list names each bot's type. Long names are shortened, and the badges are never cut off:
Goldie Lemon in lemon yellow, then taking up the chase. For these two frames only, I ran a throwaway local build with Goldie's odds raised from 1 in 200 to 1 in 2. The branch has 1 in 200.
Testing
make checkpasses. It includes these new tests:Notes for review
sim/world.rsandsim/bot.rs. They combine, since moves set power and a lane wish while Keep riders from riding through each other #17 caps speed and steers past, but whichever merges second needs a rebase.🤖 Generated with Claude Code