Hi, Bot Machines · Fig. 01
Night-light

How does it know it's dark?

It has one eye that measures light and one rule. Slide the room from day to night, move the rule, then try to fool it.

A night-light plugged into a wall.
Fool it
Senses
Rule
Does

For grown-ups: what's really inside

A night-light has a light sensor (often a photoresistor, which lets more current through in brighter light) and a small circuit that switches the lamp when the reading crosses a set level. That is a threshold rule: measure, compare to a number, switch. A single artificial neuron makes the same move, adding up its inputs and comparing the total to a threshold. Neither one understands night.

Simplified: real ones also have to keep the lamp's own glow away from the sensor, or the light would switch itself off the moment it came on.