Mistaking Stop for Go is worse than mistaking Left for Right, so the robot should need more confidence before a risky action than a safe one. The board asks 95% for Go and 70% for the rest; the robot also waits for Go twice in a row.
A self-driving car that brakes for a plastic bag is annoying. One that drives through a stop sign is dangerous. Its designers make it much more careful about some decisions than others.
This time the model reads printed signs: print the four signs (Go, Left, Right, Stop) and train a class for each, holding the sign at different distances, angles and light.
The board on this page does not treat every label the same: it sends Go only when the model is 95% sure, and the others at 70%. Anything less is Unsure.
Make your prediction first. Help opens once you've locked it in.
The robot is last lesson's, with Go in place of Forward: A Left, B Right, A+B Go, logo Stop. Without new labels, the watchdog stops it after two seconds.

radio.onReceivedString(function (receivedString) {
mode = receivedString
lastHeard = input.runningTime()
})
basic.forever(function () {
if (input.runningTime() - lastHeard > 2000) {
mode = "Stop"
}
if (mode == "Go") {
robot.motorTank(50, 50)
} else if (mode == "Left") {
robot.motorTank(-30, 30)
} else if (mode == "Right") {
robot.motorTank(30, -30)
} else {
robot.motorStop()
}
})
input.onButtonPressed(Button.A, function () {
radio.sendString("Left")
})
input.onButtonPressed(Button.B, function () {
radio.sendString("Right")
})
input.onButtonPressed(Button.AB, function () {
radio.sendString("Go")
})
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
radio.sendString("Stop")
})
let lastHeard = 0
let mode = ""
robot.elecfreaksCuteBot.start()
radio.setGroup(7)
Show Go far away, tilted or half covered. Watch the label on the board: when is Go sent, and when does it say Unsure? Try the same with Left.
Drive with the signs: send Go and Stop, and find a way of holding Go that makes the board say Unsure.
Use the board. This ticks when you get there.
Sort each decision: should it need high confidence or is lower fine?
Make Stop act the moment it arrives, without waiting for forever: stop, red lights, a beep.
In on radio received string, after setting the mode: if mode = Stop, then robot motor stop, set color red and play a tone.
The board repeats each label every second, so "Go twice in a row" means about a second of steady Go. Make the robot wait for that before driving.
Make a variable goCount. In on radio received string: if the word is Go, change goCount by 1, else set it to 0.
In forever, drive forward only if mode = Go and goCount ≥ 2 (Logic › and).
Stop acts at once, as soon as it arrives: the robot stops, turns red and beeps.
This ticks by itself when your blocks do what is asked.
The robot drives forward only after hearing Go twice in a row.
This ticks by itself when your blocks do what is asked.
Make a careful sign robot: Go only after hearing it twice in a row, Left and Right turn, and anything else (Stop, Unsure, a word it doesn't know, or two seconds of silence) stops it. Lights: green going, yellow turning, red stopped.
Start from what you built: goCount, lastHeard and the watchdog.
Lights: green going, yellow turning, red stopped. Go a little slower (40) so there is time to react.
A careful sign robot: Go only after two Gos in a row, Left and Right turn, anything else (Stop, Unsure, a word it doesn't know, or silence) stops it, with green, yellow and red lights.
This ticks by itself when your blocks do what is asked.
Students drive a robot with printed signs read by their own model, and make it more careful where a mistake costs more (a higher threshold for Go, and Go twice in a row). About 50 minutes.
Open the teacher guide: answers, solutions, slides and a worksheet.
The idea: a model is sometimes wrong, and not all mistakes are equal. Mistaking Stop for Go can send a robot off a table; mistaking Left for Right only wastes time. So the board here needs 95% confidence before it sends Go and 70% for the others (anything less is Unsure), and the robot adds its own caution: it drives only after hearing Go twice in a row (about a second, since the board repeats the label every second), while Stop acts at once.
The cost of caution: a higher threshold means more Unsures, so the robot stops more often. Put the caution where mistakes are costly, not everywhere.
Materials: the printable signs (linked in the lesson; two to an A4 page, colour if possible). Training tip: hold each sign at different distances and angles, in different light, and add a Nothing class (no sign) if the model guesses a sign for an empty frame.
Without robots: the simulator's buttons stand in for the model; the board step is typical.
Accepting that some mistakes matter more, so the thresholds differ. Ask which wrong answer would be worst, and set that label's threshold first.
Stretch: Add a Slow sign that drives at half speed, and decide what threshold it needs.
Support: Give the goCount blocks; students only add the and in forever.
Next: the delivery robot challenge, where the robot's own sensor can overrule the model. Real world: thresholds in self-driving cars, medical screening and spam filters.