Free online robot simulator · Blockly · Digital twin
Program a robotto cut hair.Nothing gets hurt.
HCR is an academic Hair Cutting Robot study where participants drag blocks to drive a five-joint Service Robot across a voxel hairstyle. A digital twin checks every move first and refuses anything that would reach the head.
It runs in a browser, while a Rust service replays and scores submitted programs. No physical robot is required, and the level adapts to the participant.
Or download the desktop app for macOS, Windows, and Linux. It is useful when the room has no Wi-Fi.
- shoulderRoll15°
- shoulder72°
- elbow10°
- elbow−48°
- baseYaw−30°
- baseYaw0°
- baseYaw30°
- wrist−20°
Why
Teaching robotics does not scale
One arm, one student
A real robot arm is expensive and serves one student at a time, with a teacher standing over it.
One course, one pace
A class gets a single sequence of lessons. The quick students are bored and the struggling ones give up.
Mistakes are expensive
On real hardware a wrong angle is a collision. That makes the safe move to not let beginners drive at all.
The loop
Write, check, score. Then change one number and try again
Three steps, and the third sends you back to the first. That loop is the whole lesson.
- 1Program
Drag blocks, not syntax
Servo mode has three block types: set a joint to an absolute angle, wait, or repeat. Certified Cutter Grid practice adds six fixed-world directions and integer distances, compiled into a deterministic joint plan before the run.
Servo angles · Cutter Grid moves · wait (0–5000 ms) · repeat (1–20×)
- 2Check
A twin runs it first
Before the arm moves, the same program is swept through a geometric model of the head. A move that would enter the head is refused: the arm holds its last safe pose and the block that caused it is highlighted.
Continuous swept contact · deterministic, no physics engine
- 3Score
A score, not a grade
Getting it wrong costs one more attempt. The result is scored on how closely the haircut matches the target, how compact the program is, and how long it would take to run.
0.60 completion + 0.25 efficiency + 0.15 time
Adaptive
One level per student, not one level per class
After every attempt the platform re-estimates how the learner is doing and picks the next challenge to match. Finish comfortably and the next one is harder; struggle and it steps back. One level per student, not one level per class.
- Ability θ
- Robot-programming proficiency on a logit scale, updated from each replayed program.
- 2PL, not 3PL
- You cannot guess your way into a correct haircut, so the guessing parameter is fixed at zero and the third parameter is dropped rather than estimated from noise.
- Item selection
- Challenges are ranked by Fisher information at the current θ, then exposure-capped so the same handful of items is not served to everyone at the same level.
- Partial credit
- Scores are continuous. Before updating the estimate, the service remaps each raw score around that item’s mastery threshold and keeps the original value alongside it.
- Calibration
- A new challenge starts provisional: exposure-capped and excluded from ability updates that count, until it has enough responses to refit its difficulty.
- One θ, for now
- Ability is a single composite value in this version, with dimension tags recorded on every response for reporting. A genuinely multidimensional model is the next step, not a current claim.
Participation
Choose whether to participate before the study starts
The client creates no simulator session or player identifier until a person actively chooses to participate in this academic study.
Required study response
Compiled Blockly Program IR, challenge version, score, and technical session or submission identifiers required for replay and analysis.
Optional context
Primary language as a coarse code such as zh or en, and current UTC offset in minutes. The primary Participate action enables both; More settings can disable either one.
Not intentionally collected
No browser fingerprint, precise IANA time-zone name, inferred location, advertising identifier, or cross-site tracking profile.
How we describe the data
We do not call the data fully anonymous. Study records may retain session identifiers, and the server keeps routine security logs, so we describe the data as de-identified.
Modes
Practise alone, or play the room
Solo practice
Untimed. The workbench, a challenge, and as many attempts as you want.
- Run, pause, resume, step through one command at a time, stop, or reset. Your program stays in place after a reset.
- Test evaluates the program headlessly in milliseconds instead of watching it animate.
- Toggle the target hairstyle preview on or off while you work.
Versus round
Everyone in the room gets the same challenge at the same moment.
- A fixed wall-clock window, judged by the server clock rather than any player’s.
- Nobody sees a score, including their own, until the round closes.
- Resubmit as often as you like; only your best attempt counts.
- Programs are replayed server-side, so a faster laptop wins nothing.
Without a configured backend, your browser scores versus rounds against scripted bots. The menu, lobby, and scoreboard clearly label these rounds as practice. You can still play offline, but a local score is never presented as an official result.
Built with Rust
Rust from server replay to embedded robot firmware
Rust is not a decorative label in HCR. It implements the scoring service, adaptive engine, protocol handling, and the no_std embedded gateway.
Underneath
Four pieces, one protocol
Simulator
HCR_Simulator_Frontend
React · TypeScript · Vite · React Three Fiber · Blockly
The whole demo loop runs client-side. With no backend configured it makes no network request at all.
Service
hcr-backend
Rust · MQTT over WebSocket · HTTP binding
Replays programs server-side, runs the adaptive question bank, and owns round deadlines and standings.
Protocol
hcr-backend/schema
hcr.v1 · JSON and CBOR
One envelope for every message, correlated by ULID. Minor versions are additive only; receivers drop what they do not recognise rather than failing.
Hardware
hcr-fw
Rust (no_std) · ESP8266 · Arduino C++ as a hardware library
A physical five-servo arm. Rust owns startup policy, routing, HTTP/JSON and servo state; C++ is confined behind a byte-oriented C ABI. MQTT is not implemented in the gateway yet.
Elsewhere
The first JHM-SRAS symposium, December 2026
Jiangsu, Hong Kong, and Macao meet at PolyU for eleven days on intelligent service robotics: four days building low-cost robotic arms with block-based programming, then seven days of papers, exhibition, and lab tours.
Try it
Adaptive coding, games, simulation, and education in one platform.
There is no robot to buy. A whole class can learn at once, each student at the right level. Read the study information, decide whether to participate, and open the first challenge.