Real-Robot Driving MLP: the 116-parameter policy driving our robot's tracks on video
This is the smaller, older sibling of NCDTech/sim-driving-mlp-numpy.
A 116-parameter MLP trained not in simulation but on real driving sessions of our tracked test robot, collected through our desktop studio.
This exact file is the one loaded and running in the video below.
We traced it frame by frame: the load dialog in the recording shows this very filename.
โถ Watch it run (3:18, Korean): synthetic data check, analysis, training, weight transfer to the robot, and the network driving the tracks, end to end.
One honest detail you will notice: the robot is propped up in the air.
The LEGO-built chassis was too fragile for repeated floor runs, so for this NN test the tracks spin freely while the network drives them from live ultrasonic input.
The video's own thumbnail jokes about it ("hehe... right now it's floating!").
Architecture
| part | meaning |
|---|---|
| input (6) | ultrasonic distances Front / Left / Right, plus their frame-to-frame deltas (ฮF, ฮL, ฮR). Distance tells "how far", delta tells "getting closer or not" |
| hidden (8) | one dense layer, leaky ReLU (ฮฑ = 0.01) |
| output (5) | command logits: FWD / LEFT / RIGHT / STOP / BACK |
Normalization statistics (norm_center, norm_scale) are included in the file.
Metrics: an honest early scorecard
| command | accuracy |
|---|---|
| FORWARD | 76 % |
| LEFT | 85 % |
| RIGHT | 83 % |
| STOP / BACK | 0 % |
| overall | 49 % |
We publish these numbers as they are.
The driving commands (F/L/R) worked well enough to drive the tracks in the video.
STOP and BACK scored zero because the training sessions barely contained those actions: class imbalance in a few minutes of real driving data.
Fixing exactly this kind of gap is why our current systems run self QA/QC on every stage.
The class-distribution check that would have flagged this dataset is now built in.
Load and run (NumPy only)
import numpy as np
d = np.load("real_robot_mlp.npz")
x = np.array([[300.0, 150.0, 400.0, -5.0, -20.0, 0.0]]) # F, L, R, dF, dL, dR
x = (x - d["norm_center"]) / d["norm_scale"]
h = x @ d["W0"] + d["b0"]
h = np.where(h > 0, h, 0.01 * h) # leaky ReLU
y = h @ d["W1"] + d["b1"]
print(["FWD", "LEFT", "RIGHT", "STOP", "BACK"][int(np.argmax(y))])
The whole file is 2.4 KB.
It runs on anything that runs NumPy, and the original target was an MCU-class robot controller.
The robot it drove
A frame from that video (2:37): the robot propped up on its support, tracks driven by this network live at the same moment.
The inference panel on the right shows the softmax over the five commands, and its judgment at this instant is STOP.
The hardware itself, with the ultrasonic sensors on the hand:
Sim and real, side by side
| this model | sim-driving-mlp-numpy | |
|---|---|---|
| trained on | real driving sessions (test floor) | virtual-map simulation |
| inputs | 3 distances + 3 deltas | 4 distances (F/L/R/B) |
| size | 6โ8โ5, 116 params | 4โ16โ8โ6, 279 params |
| extra head | none | turning-angle regression |
| date | 2026-04 | 2026-05 |
Together they show the path we actually took: drive the real robot first, feel the data problems, then build the simulation studio with self QA/QC wired into every stage.
ํ๊ตญ์ด
์์ ์์์ ์ค์ ๋ก ๋ก๋๋์ด ๋๋ ๋ฐ๋ก ๊ทธ ๊ฐ์ค์น ํ์ผ์ ๋๋ค (์์์ ํ์ผ ์ด๊ธฐ ์ฅ๋ฉด์์ ํ์ผ๋ช ์ ์ถ์ ํด ํ์ธ).
์๋ฎฌ ๋ชจ๋ธ์ ํ๋ป๋ก, ๊ฐ์ ๋งต์ด ์๋๋ผ ์ค์ ์ฃผํ ๋ฐ์ดํฐ๋ก ํ์ตํ์ต๋๋ค.
์ด์ํ 3๋ฐฉ ๊ฑฐ๋ฆฌ + ๋ณํ๋ 3๊ฐ๋ฅผ ๋ฃ์ผ๋ฉด ์ฃผํ ๋ช ๋ น 5์ข ์ด ๋์ค๋ 116 ํ๋ผ๋ฏธํฐ ์ ๊ฒฝ๋ง(2.4 KB)์ ๋๋ค.
์ ์งํ๊ฒ ๋ฐํ๋ ๊ฒ ๋ ๊ฐ์ง.
์ฒซ์งธ, ์์์ NN ํ ์คํธ์์ ๋ก๋ด์ ๊ณต์ค์ ๋ ์์ต๋๋ค.
๋ ๊ณ ๋ธ๋ก ๋ชธ์ฒด๋ผ ํ์ฒด๊ฐ ์ฝํด ๋ฐ๋ฅ ์ฃผํ์ ๋ฐ๋ณตํ๊ธฐ ์ด๋ ค์ ๊ณ , ๊ทธ๋์ ๋ฐ์นจ ์์ ์ฌ๋ ค ์ ๊ฒฝ๋ง์ด ๊ถค๋(๋ฐํด)๋ฅผ ๋ชจ๋ ๋ชจ์ต๋ง ๋ณด์ฌ์ค๋๋ค.
์์ ์ธ๋ค์ผ๋ "ํํ.. ์ง๊ธ์ ๊ณต์ค์ ๋ ์์ด์!"๋ผ๊ณ ๋จผ์ ๋ฐํ๊ณ ์์ต๋๋ค.
๋์งธ, ์ฑ์ ํ ๊ทธ๋๋ก: ์ฃผํ ๋ช ๋ น(์ ์ง 76%ยท์ข 85%ยท์ฐ 83%)์ ์ ๋์ํ์ง๋ง ์ ์ง/ํ์ง์ 0% ์ ๋๋ค.
๋ช ๋ถ์ง๋ฆฌ ์ค์ฃผํ ๋ฐ์ดํฐ์ ๊ทธ ๋์์ด ๊ฑฐ์ ์์๊ธฐ ๋๋ฌธ์ ๋๋ค(ํด๋์ค ๋ถ๊ท ํ).
๋ฐ๋ก ์ด๋ฐ ๊ตฌ๋ฉ์ ์ก์ผ๋ ค๊ณ ์ง๊ธ์ ์ ํฌ ์์คํ ์ ๋ชจ๋ ๋จ๊ณ์ ์ ํ QA/QC(ํด๋์ค ๋ถํฌ ๊ฒ์ฌ ํฌํจ)๋ฅผ ์ฌ์์ต๋๋ค.
Learn more: https://huggingface.co/NCDTech ยท https://www.ncdtech.org ยท ์ฃผํ ์์: https://youtu.be/6DJX0T6qrtM


