How does a robot vacuum decide where to go?
A robot vacuum decides where to go next: keep going, turn or stop. It reads its sensors: a bumper that feels when it hits something, sensors underneath that notice when the floor drops away, and its battery level. Some models also build a map as they clean. Simple rules turn those readings into moves.
In one line: A small floor-cleaning robot that reads its bumper, floor and battery sensors and follows rules to keep going, turn or stop.
Last reviewed: 25 October 2026 3 min read
What decision does it make?
While it cleans, a robot vacuum keeps making the same small choice: keep rolling forward, or turn or stop? Every move it makes comes from that choice.
| Decision | Possible answers |
|---|---|
| Keep going, turn or stop? | Keep going: roll on and clean. Turn or stop: back off, change direction or head back to charge. |
What does it look at?
- Bumper. A bumper on the front is pushed in when the robot touches a wall or a chair leg, and the robot backs off or turns.
- Floor sensors. Sensors underneath shine invisible infrared light down and measure how much bounces back. When almost nothing comes back, the floor may have dropped away, like at the top of the stairs.
- Battery. When the battery runs low, the robot stops cleaning and heads back to its charging base.
- A map. Some models build a map of the room and track where they are on it, so they can plan where to go.
How does it learn the rule?
- People write the safety rules. Rules such as "if the floor drops away, stop and back up" are written by people. The robot does not learn these by itself.
- Test and adjust. People try the robot on different floors and change the rules when it gets things wrong.
- Learn the room. Models with a map build it while they clean, working out where they are and what the room looks like at the same time.
- Use the map. The map helps the robot plan its path.
Where can it go wrong?
- It stops when it should keep going. A very dark rug may send back little infrared light, so the floor sensors can read it as a drop and the robot will not cross it.
- It keeps going when it should stop. A bumper only feels what presses it. Something that does not press it, such as a thin cable, may not make the robot turn.
- New things fool fixed rules. Its rules only cover the moments its makers thought of. Test the rule on new cases below.
Try it
Toy example: pick the rule that sorts all six moments the right way. Then test it on new cases the robot has not met.
A toy example: six moments in a robot vacuum's run, what its sensors read and the move it should make, plus three new cases to test.
| Item | Values | Right move or bin |
|---|---|---|
| Rolling across an open kitchen floor | Bumper pressed: false; Floor drops away: false; Battery low: false; On a rug: false | Keep going |
| Front touching a table leg | Bumper pressed: true; Floor drops away: false; Battery low: false; On a rug: false | Turn or stop |
| Front wheels at the top of the stairs | Bumper pressed: false; Floor drops away: true; Battery low: false; On a rug: false | Turn or stop |
| Crossing a soft rug in the hall | Bumper pressed: false; Floor drops away: false; Battery low: false; On a rug: true | Keep going |
| Battery nearly empty in the middle of a room | Bumper pressed: false; Floor drops away: false; Battery low: true; On a rug: false | Turn or stop |
| Bumped a sofa while crossing a rug | Bumper pressed: true; Floor drops away: false; Battery low: false; On a rug: true | Turn or stop |
Test cases
| Item | Values | Right move or bin |
|---|---|---|
| Wall straight ahead, bumper pressed | Bumper pressed: true; Floor drops away: false; Battery low: false; On a rug: false | Turn or stop |
| A very dark rug that the floor sensors read as a drop | Bumper pressed: false; Floor drops away: true; Battery low: false; On a rug: true | Keep going |
| A charging cable caught in the brush, bumper not pressed | Bumper pressed: false; Floor drops away: false; Battery low: false; On a rug: false | Turn or stop |
Check it
What does a robot vacuum keep deciding?
Answer: Keep going, turn or stop. Every move comes from that one small choice, made again and again.
Why might it refuse to cross a very dark rug?
Answer: Its floor sensors read the dark rug as a drop. Some surfaces send back little infrared light, which can look like the floor has dropped away.
A cable does not press the bumper. What can happen?
Answer: The robot may keep going, because no sensor tells it to turn. No sensor reading tells its rules to turn, so it keeps going.
For older readers
Most moment-to-moment moves come from simple rules that link a sensor reading straight to an action. Robots that make a map can use SLAM, short for simultaneous localization and mapping: estimating where the robot is and what the room looks like at the same time, from sensor data, with no map to start from. Cameras and lidar, a laser sensor that measures distance, are common inputs. Counting wheel turns, called wheel odometry, helps it track how far it has moved.
Questions
Sensors underneath use infrared light to keep checking that the floor is still there. If the floor seems to drop away, its rules tell it to stop and back up before its wheels go over the edge.
Some things, such as a thin cable, may not set off its sensors, so its rules never tell it to turn. Clearing the floor first gives it fewer surprises.
Models that build a map keep a map of the rooms so they can plan where to go. Simpler models use only their bumper and floor sensors.
Sources
- University-hosted paper: a simple infrared obstacle detection scheme for mobile robots (opens another website)
- University study: domestic service robots in the home (opens another website)
- University research paper: lidar sensors that robot vacuums use for mapping (opens another website)
- University lecture notes: simultaneous localization and mapping (SLAM) (opens another website)