Machines that notice
Imagine three machines in the same house. A toy car zooms across the floor while a child steers it with a remote control. A washing machine fills itself with water, spins and beeps when it is done. A round robot vacuum cleaner bumps into a chair leg, turns, finds its way around the sofa and, when its battery runs low, drives back to its charging dock all by itself.
All three have motors. All three move. But only one of them is what most roboticists would call a robot. Which one, and why?
The answer is not about looks. Robots in films often have heads, arms and glowing eyes, but most real robots look nothing like people: they are arms bolted to a factory floor, boxes on wheels, flying frames with four propellers, or six-wheeled rovers on Mars. What makes them robots is what they do. A robot notices what is going on around it, decides what to do about it, and then does it, again and again, with nobody steering every move.
In this lesson you will tour robots working around the world, meet machines that are only partly robots, find out where the word "robot" came from, and run a tiny robot "brain" in Python.
Sense, think, act
Think about crossing a road. Your eyes and ears sense: is a bus coming? Your brain thinks: there is a gap, it is safe to go. Your legs act: you walk, and you keep looking as you go, ready to change your mind. This repeating cycle is the heart of every robot too.
Definition— sense–think–act
A robot repeats three steps in a loop:
- Sense: measure something about the world or about itself, using sensors (a camera, a bump switch, a thermometer, a distance sensor).
- Think: use a computer to decide what to do, following a program written by people (and sometimes rules it has learned).
- Act: change something in the physical world, using actuators (motors, wheels, grippers, propellers, heaters).
Then it senses again, to find out what its action changed.
Now we can say what a robot is. Roboticists do not all agree on one exact definition (the international standard on robot words, ISO 8373, gives one, and other experts word it differently), but almost all of them would accept this one.
Definition— robot
A robot is a machine that senses its surroundings, decides what to do using a computer program, and acts on the physical world, usually by moving itself or moving things, with at least some ability to carry on without a person controlling every step.
Back to the house. The robot vacuum senses (bumpers, distance sensors, a battery gauge), thinks (its program chooses where to go next) and acts (wheels and brushes), all on its own. It is a robot. The toy car has motors, but a person does the sensing and thinking; the car only follows orders from the remote. The washing machine is the tricky one, and we will come back to it.
Robots around the world
Robots already do millions of jobs. Here is a tour, with the sense–think–act loop for each.
Factory arms. The workhorses of industry are robot arms bolted to factory floors, welding car bodies, painting, packing food and placing tiny parts on circuit boards. Companies such as FANUC and Yaskawa in Japan, KUKA in Germany, ABB in Europe and Estun in China build them. According to the International Federation of Robotics, about five million industrial robots were at work in 2025, and well over half of the year's new ones were installed in China. A factory arm senses the angle of each of its joints, and often uses a camera to find the part; it thinks by following a carefully planned program; it acts with motors in each joint.
Warehouse robots. When you order something online, a robot may have fetched it. In some warehouses, such as those of Amazon in the United States or those equipped by Geek+ from China, low wheeled robots slide under whole shelves and carry them to a person who picks the item; in others, such as those built by Ocado in the United Kingdom or AutoStore in Norway, robots run on rails across the top of a giant grid of crates and lift the right crate out. Each robot senses markers on the floor or rails, follows routes chosen by a central computer, and must not crash into its neighbours.
Robot vacuum cleaners. Made in China, the United States, South Korea, Japan, the United Kingdom and elsewhere, they are the robots you are most likely to meet at home. Many map each room with a spinning laser sensor or a camera.
Surgical robots. In many hospitals, a surgeon sits at a console and moves controls while thin robot arms copy those movements inside the patient, scaled down and with any shaking of the hands filtered out. Systems include the da Vinci (from the United States), Versius (United Kingdom) and hinotori (Japan). Notice that these robots do not decide anything about the operation: the surgeon closes the loop.
Mars rovers. NASA's Curiosity and Perseverance rovers, and China's Zhurong, have driven across Mars. Scientists on Earth choose where a rover should go, but Perseverance can work out its own safe route across the rocks on the way, taking pictures, spotting hazards and steering around them.
Drones. Flying robots inspect bridges and wind turbines, map farms and film sport. Since 2016 the US company Zipline has flown blood and medicines to hospitals, first in Rwanda and then in Ghana and other countries. A drone senses its tilt and height hundreds of times a second; if its loop stopped for more than a moment, it would tip over and fall.
Robots on farms. Since the 1990s, milking robots, pioneered by companies in the Netherlands and Sweden, have let cows walk in to be milked whenever they choose: the robot recognises each cow, finds the teats with lasers or cameras and attaches the cups. Newer robots drive along rows of vegetables and pull or zap weeds, so farmers need less weedkiller.
Example— Spot the loop: a robot lawnmower
A robot lawnmower in a garden in Kraków or Cape Town:
- senses a thin wire buried around the edge of the lawn, a bump when it hits a flowerpot, a tilt if someone lifts it, and rain;
- thinks: if it is near the wire, turn back; if it bumped something, reverse and turn; if it is lifted, stop the blade at once; if it is raining or the battery is low, go home to the charging station;
- acts by driving its wheels and spinning its blade.
Notice the safety rule: as soon as it senses it has been lifted, the blade stops. Good robots are designed to be safe first.
Almost robots, and the spectrum of autonomy
Some machines close part of the loop. Looking at them carefully sharpens the idea.
A remote-controlled toy has motors and may even have a camera, but the person holding the controls does all the sensing and thinking. It is not a robot. Add a bump sensor and a little program that reverses automatically after every crash, and it becomes a very simple one.
A washing machine senses (water level, temperature, sometimes how heavy the load is), thinks (its programme decides when to fill, heat, spin and drain) and acts (a motor and a pump). So why do most people not call it a robot? Because it only acts inside itself: it never moves through the world or handles things in it. Roboticists usually keep the word "robot" for machines that move themselves or move objects. A thermostat that switches a heater on and off is similar: a complete loop, but nothing moves. That is a matter of how we use words, not a law of nature, and it is fine to argue about it.
Definition— autonomy
A robot's autonomy is how much of the sense–think–act loop it closes by itself, without a person deciding for it. A teleoperated robot is one that a person controls from a distance, move by move.
Autonomy is not "yes or no". It is a spectrum.
Why not make every robot fully autonomous? Sometimes it is not safe or not wanted: a surgeon's judgement matters too much to hand over. And why not teleoperate everything? Sometimes it is impossible. A Mars rover is the classic case.
A robot's loop in Python
Here is a tiny robot brain, written in Python. It controls a heater that keeps seedlings warm in a greenhouse on a cold night. (It has no wheels, so it is more of a thermostat than a robot, but its loop is exactly the loop inside every robot, and it is short enough to read in one go.) If you have never written Python, start with Lumenary CS's first programs, then come back.
The program pretends to be the world as well as the robot: each time round the loop is one minute, and the air warms by 0.5 °C when the heater is on and cools by 0.25 °C when it is off. Press Run.
# A heater robot that keeps seedlings warm in a greenhouse at night.
# Each pass round the loop is one minute: sense, think, act.
temperature = 15.0 # the air in the greenhouse, in degrees Celsius
heater_on = False
for minute in range(1, 25):
# SENSE: read the thermometer
reading = temperature
# THINK: decide what to do
if reading < 18.0:
heater_on = True
elif reading > 20.0:
heater_on = False
# between 18 and 20 degrees: carry on as before
# ACT: the heater warms the air, or the night cools it
if heater_on:
temperature = temperature + 0.5
else:
temperature = temperature - 0.25
state = "ON" if heater_on else "off"
print(f"minute {minute:>2}: {reading:5.2f} °C, heater {state}")Read the output from the top. The greenhouse starts at 15 °C, so the heater comes on and the temperature climbs 0.5 °C a minute. At minute 11 the reading is exactly 20.00 °C, which is not more than 20, so the heater stays on; at minute 12 the reading is 20.50 °C and the heater switches off. The air cools a quarter of a degree a minute until, at minute 23, the reading is 17.75 °C and the heater comes back on. The temperature stays between about 17.75 °C and 20.5 °C for as long as the loop runs.
Try changing the program, one thing at a time, and predict what will happen before you press Run:
- Make the night colder by changing
0.25to0.5. Does the heater spend more time on? - Change the starting temperature to
22.0. - Change
range(1, 25)torange(1, 61)to watch a whole hour.
Real robots run loops like this many times a second, with many sensors and motors, but the shape is the same: sense, think, act, repeat.
From a play in Prague to a rover on Mars
Moving machines are old. Engineers built machines that moved by themselves long before the word "robot" existed. Hero of Alexandria described self-moving theatre machines in the first century; in 1206 the engineer al-Jazari, working in what is now Turkey, wrote a book of ingenious devices, including musical automata and a hand-washing machine that offered soap and a towel; and from the 1600s, Japanese craftspeople built karakuri dolls, among them a little doll that carries a cup of tea to a guest, stops when the cup is lifted from its tray, and turns round and walks back when the empty cup is put down again. These machines acted, and a few even reacted to a simple trigger, like the weight of that cup, but their movements were fixed in their gears and springs: they could not sense the world around them and choose among many actions.
The word. In 1920 the Czech writer Karel Čapek wrote a play called R.U.R., short for Rossum's Universal Robots, first performed in Prague in January 1921. In it, a factory makes artificial workers, more like artificial people than metal machines, who end up rebelling against their makers. Čapek's brother, the painter Josef Čapek, suggested the name, from the Czech word robota, meaning forced labour, the work that peasants once owed their landlords. The play was a hit around the world, and the word stuck.
The first industrial robot. In 1961 a robot arm called Unimate started work at a General Motors car factory in New Jersey, in the United States, lifting hot pieces of metal from a casting machine, a dangerous job for people. It was invented by George Devol and built by a company he founded with Joseph Engelberger. It followed a recorded list of movements, much like a modern factory arm.
The first robot that reasoned. From 1966 to 1972, researchers at SRI in California built Shakey, a wobbly wheeled robot with a camera, a distance sensor and bump sensors, connected by radio to a computer that filled a room. Given a task such as "push the block into the next room", Shakey could look around, make a plan of steps and carry it out, very slowly. Ideas invented for Shakey are still used today, including the A* method for finding short routes, which you will meet in Graph search for planning.
More firsts. In 1970 the Soviet Union's Lunokhod 1, driven by a team on Earth, became the first rover on the Moon (radio takes only about 1.3 seconds to get there, so remote driving worked). In 1973, Waseda University in Tokyo built WABOT-1, the first full-size humanoid robot, which could walk a few steps and grip objects. In 1997 the small rover Sojourner became the first robot to drive on Mars. In 2001 and 2002 the first robot vacuum cleaners went on sale, in Sweden and the United States, and robots began to arrive in ordinary homes.
Today. Robots weld cars in Mexico, pack parcels in India, milk cows in New Zealand, inspect pipes under the sea off Norway, and in 2021 a little helicopter called Ingenuity made the first powered flight on another planet. In 2026 many companies and laboratories, in China, the United States, Europe and elsewhere, are testing humanoid robots and robots that learn from experience; you will meet them at the end of this course, in Humanoid robots.
Common misconceptions
Misconception
"A robot has to look like a person." Very few do. A robot's shape is chosen for its job: an arm for welding, a flat box for vacuuming, propellers for flying. A human shape helps only in places built for humans, such as stairs and doorways, and even then wheels are often simpler.
Misconception
"Robots think for themselves the way people do." A robot's "thinking" is a computer following a program (and sometimes rules learned from data) written and tested by people. It does not understand its job the way you understand yours, and it can fail badly in situations its makers did not expect.
Misconception
"Anything with a motor is a robot." A fan, a drill and a remote-controlled car have motors but no sense–think–act loop of their own. What makes a robot is the loop, not the motor.
Misconception
"Robots are a new invention." The word dates from 1920 and industrial robots from 1961. What is new is how cheap sensors and computers have become, which is why robots are leaving factories for homes, farms, hospitals and streets.
Exercises
Most of these exercises ask you to think; one asks you to write a short Python function. If you get stuck, open a hint: each one gives a little more away.
1. What is a robot?
Warm-upHumanWhich of these machines is a robot, in the sense of this lesson?
2. What is a robot?
Warm-upHumanA robot lawnmower has the parts below. Select all the sensors (the parts that measure or notice something).
3. What is a robot?
CoreHumanOn one particular day, Mars is 225 million kilometres from Earth. Radio signals travel at about 300,000 kilometres per second.
A driver on Earth sends a rover the command "stop". The rover stops at once and radios back "I have stopped". How many minutes after sending the command does the driver receive the reply?
4. What is a robot?
CoreHumanIn a hospital in Seoul, a surgeon sits at a console and moves two hand controls. Thin robot arms copy her movements inside the patient, scaled down, with any shaking of her hands filtered out. Where does this machine sit on the spectrum of autonomy?
5. What is a robot?
CoreHumanA washing machine senses the water level and temperature, follows a programme that decides when to fill, heat, spin and drain, and drives a motor and a pump. So it has a complete sense–think–act loop. What is the usual reason roboticists still don't call it a robot?
6. What is a robot?
Warm-upHumanWhere does the word robot come from?
7. What is a robot?
CoreComputationalWrite the think step of the greenhouse heater robot as a function.
decide(reading, heater_on) is given the thermometer reading (in °C) and whether the heater is on now. It must return what the heater should do next:
True(on) if the reading is below 18;False(off) if the reading is above 20;- otherwise, whatever
heater_onalready is (carry on as before).
The starter just returns heater_on every time, so the heater never changes. Fix it, then press Run.
Further reading and resources
- ROBOTS: your guide to the world of robotics · IEEE SpectrumProfiles of hundreds of real robots, from vacuum cleaners to humanoids, with photos and videos.
- Shakey the Robot · SRI InternationalThe lab's own page on the first mobile robot that could reason about its surroundings.
- Mars 2020: Perseverance rover · NASA ScienceThe mission's own pages, with pictures, the rover's route and its record drives.
- Five million robots now operate in factories globally · International Federation of Robotics · 2026The yearly count of the world's industrial robots, from the World Robotics 2026 report.