← Bo Shang CV Presentations Teach the Bot — Python for AI Research · Dec 5, 2026, 9:30–10:30 PM ET
Agent Arcade ↗
Title slide: Teach the Bot, Python for AI Research, Merit Point Academy, Saturday, December 5, 2026, 9:30-10:30 PM ET, online, Bo Shang, University of Maryland

The opening · Why this matters

Three companies, three ways to teach a robot

$400M Series B · $2B valuation · Jun 2026

Sells the model that drives other people’s arms.

Seed · Sep 2026

Teaches robots by recording humans.

Three ways to teach a robot. Tonight, you teach one yourself.

Tonight’s game · Agent Arcade

Three lanes. Dodge. Collect.

Score 0.00Lives 3Step 0Expert: STAYExpert (teacher) · auto-playing
  • Three actions: LEFT · STAY · RIGHT
  • 300 steps · 3 lives. Survive a frame: +0.02.

Who survives an unseen level — you, your bot, or neither?

▶ Play the game now — no install
Roadmap of five levels: play the game, train a small model, reinforcement learning, the fair test, and write the claim as a manuscript

Game rules · 90-second briefing

Every step earns +0.02. Events add a bonus or a penalty.

Choose
LEFT · STAY · RIGHT
Survive
+0.02+0.02+0.02
+0.02

every decision step

Collect
+10
Coin +10
Avoid
−12
Hazard −12
CSV reward for one row = +0.02 survival + event reward  ·  no event → 0.020  ·  coin → 10.020  ·  hazard → −11.980
  • ✎Play the demonstration rows — do not hand-edit them, add a row, or remove one.
  • ≠Do not test on the level you trained on.
  • ❚❚STAY is a real action — doing nothing is not missing data.

Open the black box · picture → numbers → decision

One frame becomes four measurements, one action, and one outcome.

PLAYER · lane 0 HAZARD C obs_distance0 near · 1 far coin_distance obs_dx = −0.50 coin_dx = +0.50
SensorWhat it measuresValue means
obs_dxObstacle left / right− left · 0 same lane · + right
obs_distanceDistance to nearest hazard0 near · 1 far / none
coin_dxCoin left / right− left · 0 same lane · + right
coin_distanceDistance to nearest coin0 near · 1 far / none

dx means “delta x”: horizontal offset relative to you — not screen pixels. All four values are normalized.

STATE [−0.50, 0.18, +0.50, 0.44]  →  ACTION RIGHT  →  REWARD +0.02  ·  coin 10.02 · hazard −11.98

One row is one decision. Not one whole game.

Three ways to copy the teacher: nearest neighbors, a small CNN that watches pictures, and a sensor network that reads four numbers

The data · What the bot learns from

What a demonstration row is

state [obs_dx, obs_distance, coin_dx, coin_distance]  →  action  →  reward
  • State: 4 sensor numbers — obstacle left / right, hazard distance, coin left / right, coin distance. All normalized, relative to you — not screen pixels.
  • Action: LEFT · STAY · RIGHT — the move you made in that state.
  • Outcome: survive a frame +0.02 · coin +10 · hazard −12.

One row is not a policy. The table is the policy.

Imitation, method 1

Copy the nearest demos — k-NN

Action labels

LEFTSTAYRIGHT

① Find neighbors

k = 9

Smallest two-feature distances; the real game repeats this in four dimensions.

What is happening?

Start with the two feature axes.

② Weighted vote

LEFT17%
STAY33%
RIGHT50%

Neighbors: LEFT 2 · STAY 3 · RIGHT 4
Closer points contribute more.

③ PREDICTION · RIGHT →

Teaching projection: two features make distance visible. The production policy uses all four sensors, k = 9, inverse-distance votes, and class balancing.
Training is remembering. Prediction is comparing.

Imitation, method 3

Four numbers are enough

−0.50obs_dx
0.35obs_distance
+0.50coin_dx
0.62coin_distance
4 → 64 → 64 → 3
4,675 parameters
LEFT
STAY
RIGHT

State 1 of 3 — hazard close on the left, coin far on the right. The network stays.

4 numbers → 236.6 in ~6 s
Picture (CNN) → 215 in ~100 s
  • A small network that sees only 4 numbers — the same 4 sensors.
  • Game score: 236.6.
  • Trained in about 6 seconds.

The right 4 numbers beat a picture. Choose the inputs, not just the model.

Imitation, method 3 · Inside the network

Watch the numbers flow

Example: Step 0 of 6
Input · 4 sensors
Hidden 1 · 64 nodes
Hidden 2 · 64 nodes
Output · 3 scores
obs_dx—
obs_distance—
coin_dx—
coin_distance—
#——
#——
#——
#——
#——
#——
LEFT—
STAY—
RIGHT—

Simplified view — the real network has 64 + 64 hidden nodes; the numbers shown are the real values for these connections (rounded to 2 decimals).

Inside the bot's eyes: one tiny 48 by 24 picture becomes a move — Conv 16 filters 3 by 3, pool, Conv 32 filters 3 by 3, pool, flatten 2,304 numbers, Dense 64, Dense 3 with softmax; three equal output bars for LEFT, STAY, RIGHT; the teacher's correct move for this frame is LEFT; total 152,803 parameters ▶ Open the live demo — train it yourself

Small CNN · in 3D

Watch the shading change

3D view — 3 of 16 (then 32) feature maps shown, the ones with the strongest response. Heights and shades are the real values from the trained network (conv1 max 2.90, conv2 max 7.36), scaled per stage so you can see the pattern. The input grid is the real 48×24 frame: gold = coin, pink = hazard, cyan = ship. Drag to rotate · scroll to zoom.

Reinforcement learning, Q-learning: no teacher, no demonstrations. Five steps in a loop: OBSERVE, CHOOSE, ACT, REWARD, UPDATE. 500 games played, about 1 minute of total training time

The other way · Live demo

Reinforcement learning: no teacher

  • No teacher. No demonstrations. Reward only.
  • Q-learning: the bot plays 500 games — tries, fails, and remembers what worked.
  • Coin +10 · Hazard −12 · about 1 minute.
Step 0 of 8 — Total: 0.00

Press Next step to play the first move. The bot starts by guessing.

After 500 games of this, the bot has learned which moves raise the reward — final score 249.0.

▶ Open the live demo — watch it learn
Scoreboard on 10 unseen levels: expert 250.0, reinforcement learning 249.0, SmolVLA 241.1, 4-number network 236.6, nearest neighbors 235.4, small CNN 215.0, pi-zero zero-shot 5.3, pi-zero fine-tuned 37.4
Same 240 demonstration rows: trained on 1 level, 91.0 percent accuracy on 20 unseen levels; trained on 12 levels, 84.3 percent

The write-up

Write a claim the numbers can carry

  • Four parts: Scope + Result + Limit + Next test.
In this three-lane game, the agent trained on [12 / 1] seed(s) achieved [A]% vs [B]% unseen-level accuracy with 240 rows each.

A score means something only when you can say what it was scored against.

Three takeaways: choose your inputs, guard the fair test, write the claim

Exit ticket

The bot played. You did the research.

Taught

One thing you taught the bot.

Tested

One thing you tested.

Still doubt

One thing you still doubt.

Next time the robot messes up, what do you check first?

See yourself on the stage

Your photo appears on the presenter. Nothing is uploaded.

Live composite preview: an illustrated stage with your photo, made in your browser. Not an AI-generated image. Your photo stays in your browser — it is never sent anywhere.

Thank you — questions welcome.
Slides: cnpcshangbo.github.io/slides/python-ai-research/