Skip to content

Tutorials: a first tactic, a first planner, debugging a moment, the field day rewritten; worktree and one-match fixes - #154

Merged
isaac0804 merged 10 commits into
mainfrom
docs/tactic-and-debug-tutorials
Nov 13, 2026
Merged

isaac0804 merged 10 commits into
mainfrom
docs/tactic-and-debug-tutorials

Conversation

@isaac0804

@isaac0804 isaac0804 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

New members can now write a first strategy; these pages take them to the next steps: a tactic of their own, finding why a robot did something wrong, a motion planner, and a field day. An agent that followed the change-strategy skill to check the tutorial also found three tooling problems, fixed here.

Tutorials

  • tutorials/first_tactic.md (part 2 of first_strategy): rookie gets ShadowAndMarkTactic for defence, a partitioner (split), a memory that stops the chaser job flipping (pick_chaser), pure tests of both, and the rule for moving a tactic into tactics/. A test match (rookie vs wolfpack, 120 s, 0-0): its two defenders stayed a median 1.6-1.8 m from goal; they also swapped with attackers 3-4 times a minute, which the page now sets as the reader's next exercise (previous).
  • tutorials/debug_a_moment.md: the open keeper bug (pendulum_vs_wolfpack, 3:54, in the v2.6.0 replays) from a GIF, through replay_trace's numbers and goalkeep.py's 0.3 m/s threshold, to a test that fails. The fix is left as a first PR.
  • tutorials/field_day.md rewritten in the tutorials' voice (short numbered steps, then a table of what to do when something goes wrong), with TagVision (First-Order-RoboCup-SSL/tagvision) beside ssl-vision: it sends the same packets, so the day is the same. The detail moved to docs/real_robots.md, "Field-day reference".
  • tutorials/first_planner.md: beeline, a planner that drives straight at its target and brakes in time, scored on the benchmark against fpp. It is faster on an open run (3.45 s vs 4.17 s) and collides in 9 of 29 scenarios. Steering round the first robot in the way brings that to 4, and breaks narrow_passage, which passed before: the reader's exercise. To allow this, motion_planning_benchmark.py --schemes now takes any registered planner (test included).
  • debug_a_moment.md ends with where to find your own moment: find_bugs, and the goals conceded.
  • test_tutorial_code.py (was test_first_strategy_doc.py) runs every tutorial's code as pasted, tests included, and fails once the keeper bug is fixed so the page gets updated.
  • render_clip draws in the light dashboard's colours; .gitignore keeps tutorial GIFs.

Fixes

  • setup_worktree.sh: pixi 0.83 refuses a .pixi symlinked from the main checkout ("the environment directory has moved"), so pixi run failed in every worktree. Each worktree now gets its own environment (pixi install, about 2 min, 120 MB real disk) and a replays link.
  • match.py: with replays a link, a run folder given by its real path sent the replay outside the repo (~/replays). Both paths are resolved now; regression test included.
  • One match with a replay: pixi run python -m tools.evaluation.match A B [--duration 120] [--out DIR]. No tool wrote one before.

Tests

pixi run test: 13619 passed, 83 xfailed. pixi run lint clean. In a fresh worktree after setup_worktree.sh: pixi run pytest and pixi run lint pass.

isaac0804 and others added 10 commits November 13, 2026 14:37
Its colours claimed to match the dashboard but were still the dark theme's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- first_tactic.md, part 2 of first_strategy: rookie gets ShadowAndMarkTactic for defence, a
  partitioner, a memory that stops the chaser switching, pure tests of both decisions, and the
  rule for moving a tactic into tactics/.
- debug_a_moment.md: the open keeper bug (pendulum_vs_wolfpack, 3:54) from the replay, through
  replay_trace's numbers and goalkeep.py's 0.3 m/s threshold, to a test that fails; the fix is left
  to the reader, with what it must not break. With a GIF of the moment.
- test_tutorial_code.py (was test_first_strategy_doc.py) runs every tutorial's code as pasted, its
  tests included, and fails once the keeper bug is fixed, so the page gets updated.
- .gitignore keeps tutorial GIFs; evaluate.py's pointer to the tutorial's evaluation step fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sl-vision

field_day.md was the reference written as steps: every flag, number and exception inline. It is
now short numbered steps in order (before the day, then on the day: network, vision, radio, one
check, a drill, measuring a robot, after the day) and a table of what to do when something goes
wrong. Vision is either ssl-vision or the team's TagVision; our side is the same for both.

The detail moved to docs/real_robots.md, "Field-day reference": camera settings, the radio and
lids, the demo panel, what calibrate measures and writes, --check, kicker charge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…us as the fix to try

A test match showed robots swapping between attack and defence three or four times a minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…linked

pixi 0.83 refuses an environment reached from another directory ("the environment directory has
moved"), so the .pixi symlink left `pixi run` unusable in every worktree: an agent following
AGENTS.md or the change-strategy skill could run no test or lint there. The script now replaces
that link with `pixi install` (about 2 min; 120 MB of real disk, the rest hardlinks into pixi's
cache), and links replays/ to the main checkout's, which the skill asked for by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
replay_name took the path from REPLAY_BASE_PATH to the run folder without resolving either, so in
a worktree whose replays/ links to the main checkout's, a run folder given by its real path gave a
path that climbed out of the link: a test match's replay landed in ~/replays (2026-11-13). Both are
resolved now; the test pins that case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No tool wrote a replay of a single match (debug_match.py and `pixi run main` write none), so the
agent checking the tutorial's strategy had to script run_match itself.
`pixi run python -m tools.evaluation.match A B [--duration 120] [--out DIR]` prints the score and
the replay's path. AGENTS.md, docs/tools.md and the skills describe the new worktree setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The benchmark only accepted fpp, dwa and trajsample, so a new planner meant editing the benchmark
as well as registering it. --schemes now takes any name in CONTROL_SCHEME_MAP; the default run is
unchanged, and the three defaults keep their colours in the figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
beeline drives straight at its target, braking in time: faster than fpp on an open run, and it
collides in 9 of the 29 scenarios. Steering round the first robot in the way brings that to 4,
and breaks narrow_passage, which passed before: the reader's exercise. The page's code and its
tests run in test_tutorial_code.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_bugs for what broke, the goals conceded on the dashboard for what cost goals; the
explain-result skill for a whole evaluation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@isaac0804 isaac0804 changed the title Tutorials: a first tactic, debugging a moment, the field day rewritten; worktree and one-match fixes Tutorials: a first tactic, a first planner, debugging a moment, the field day rewritten; worktree and one-match fixes Nov 13, 2026
@isaac0804
isaac0804 merged commit 8d7ae69 into main Nov 13, 2026
4 of 5 checks passed
@isaac0804
isaac0804 deleted the docs/tactic-and-debug-tutorials branch November 13, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant