Skip to content
Mechna Academy
  • How does it decide?
DecisionSignalsLearningMistakesTry itCheck itOlder readersQuestionsSourcesRelated
How does it decide? / Robot vacuum

How does a robot vacuum decide where to go?

Answer first

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.

DecisionPossible 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?

  1. 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.
  2. Test and adjust. People try the robot on different floors and change the rules when it gets things wrong.
  3. 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.
  4. 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.

ItemValuesRight move or bin
Rolling across an open kitchen floorBumper pressed: false; Floor drops away: false; Battery low: false; On a rug: falseKeep going
Front touching a table legBumper pressed: true; Floor drops away: false; Battery low: false; On a rug: falseTurn or stop
Front wheels at the top of the stairsBumper pressed: false; Floor drops away: true; Battery low: false; On a rug: falseTurn or stop
Crossing a soft rug in the hallBumper pressed: false; Floor drops away: false; Battery low: false; On a rug: trueKeep going
Battery nearly empty in the middle of a roomBumper pressed: false; Floor drops away: false; Battery low: true; On a rug: falseTurn or stop
Bumped a sofa while crossing a rugBumper pressed: true; Floor drops away: false; Battery low: false; On a rug: trueTurn or stop

Test cases

ItemValuesRight move or bin
Wall straight ahead, bumper pressedBumper pressed: true; Floor drops away: false; Battery low: false; On a rug: falseTurn or stop
A very dark rug that the floor sensors read as a dropBumper pressed: false; Floor drops away: true; Battery low: false; On a rug: trueKeep going
A charging cable caught in the brush, bumper not pressedBumper pressed: false; Floor drops away: false; Battery low: false; On a rug: falseTurn 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

  1. University-hosted paper: a simple infrared obstacle detection scheme for mobile robots (opens another website)
  2. University study: domestic service robots in the home (opens another website)
  3. University research paper: lidar sensors that robot vacuums use for mapping (opens another website)
  4. University lecture notes: simultaneous localization and mapping (SLAM) (opens another website)

Related machines

  • How does a map app decide the fastest route?↗
  • How does photo tagging decide what is in a picture?↗

Read more

  • How does a smart thermostat decide when to heat or cool?↗

On this page

What decision does it make?What does it look at?How does it learn the rule?Where can it go wrong?Try itCheck itFor older readersQuestionsSourcesRelated machines

Nothing you do on these pages is sent anywhere. There are no cookies and no ads.

Mechna Academy teaches how machines like this decide.

For grown-ups: privacy For grown-ups: how Mechna Academy works