Shuffle the step cards in tutorial 2 - #13
Conversation
The five cards were shown in the order STEPS is written in, and that order scores. A student could tap straight along the row and solve the exercise without reading a single step, which is the whole point of the tutorial. Shuffle the cards instead. Four of the 120 orders score, because the intake keeps running once it starts and the robot can collect the game piece as it drives through, so the shuffle rejects any arrangement that is one of those four. Reading order is now never the answer. Keep one student on one shuffle. The routine is already saved across visits, so a bank that rearranged itself each time would not agree with the routine under it. A saved order left over from an older list of steps is thrown away. Add tools/validate-sequence.js. The guarantee rests on the list of working orders being exact, so it replays all 120 orders through the real robot and checks the list is still the whole set. The rules a step finishes by live in a closure with no module to load, so the tool holds a copy and fails loudly when that copy and the widget have parted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CtC4MMv9XLZrAGLv712dF6
|
The
No fix for it exists to port: the remedy is rotating the Worth noting separately that The checks this branch can be judged on were run and pass: Generated by Claude Code |
What was wrong
The five step cards in "Put the Steps in Order" were rendered straight from the
STEPSarray, andSTEPSis written in an order that scores (lower → drive_piece → intake → drive_goal → shoot). A student could tap left to right without reading a single step and solve the exercise, which is the whole point of the tutorial.What changed
assets/js/interactive/beginner.js— the bank is now shuffled, and the shuffle rejects any arrangement that would score. Reading order is never the answer._includes/interactive/first-sequence.htmlanddocs/Code/Tutorials/first-sequence.md— the text now says the steps are not in order.tools/validate-sequence.js(new) — the checker described below.Why the rejection loop matters
Replaying all 120 orders through the real robot model, exactly four score:
There are four rather than one because the intake keeps running once it starts, so the robot can collect the game piece as it drives through. A plain shuffle would land on one of those about one visit in thirty and hand the answer back, so the shuffle repeats until the order is not one of them.
The new checker
That guarantee rests on the list of working orders being exact, so
node tools/validate-sequence.jsreplays all 120 orders through the real robot and checks the list is still the whole set. The rules a step finishes by live in a closure with no module to load, so the tool holds a copy of them and fails loudly when that copy and the widget have parted. Both guards were tested: changing a threshold instepDoneand removing a line from the list each produce a failure.It is listed with the other checks on the Tutorials page.
Checks run
node tools/validate-sequence.js— all checks pass.node tools/check-ste.js— clean on both edited pages.first-tutorials.spec.mjs, sequence tests: every widget assertion passes. A wrong order is rejected with a reason, the right order scores,is-solvedis set, and the code panel is correct.One caveat on that browser run: the sequence tests and the untouched first-button test all fail their final
expectNoErrorsbecausecdn.jsdelivr.netis blocked in the sandbox the tests ran in, so mermaid never loads. The same failure appears on code this branch does not touch, and it fires after every behavioural assertion, but it does mean a fully green end-to-end run was not possible there.🤖 Generated with Claude Code
https://claude.ai/code/session_01CtC4MMv9XLZrAGLv712dF6
Generated by Claude Code