Robot vacuum simulator: draw your room, race 4 cleaning patterns
Four identical robot vacuums, one room. One bounces at random, one spirals, one follows the walls, one drives planned lanes. Draw your own floor plan below and watch who cleans it first. In our test of 100 random furnished rooms, planned lanes reached 90% clean in a median 3.9 minutes; random bounce needed 11.6.
. Each square is 10 × 10 cm. Drag to draw; the robot is 34 cm wide, so gaps under 35 cm are walls to it.
| Robot | Clean now | 90% at | Driven |
|---|
Same robot for all four: 34 cm disc, 30 cm brush, 0.30 m/s, 2 cm simulation grid. The race stops at 40 simulated minutes. Press Race again and the three random robots get new luck; the planned robot does the same thing every time.
The four cleaning patterns
| Pattern | What the robot does | Needs |
|---|---|---|
| Random bounce | Drive straight; on every bump turn 90–270° at random | A bump sensor |
| Spiral + bounce | Spot-clean in a growing spiral, then bounce; after a bump, 1 in 4 chance to spiral again | A bump sensor |
| Wall follow + bounce | Keep the wall on its right for 90 s, bounce for 120 s, repeat | A side sensor |
| Planned lanes | Back-and-forth lanes one brush apart (boustrophedon), shortest route to the next unvisited lane, then a clean-up pass over missed spots | A map and its own position |
The first three are reactive: the robot never knows where it has been. That is how early robot vacuums worked; iRobot's patent on multi-mode coverage describes switching between spot (spiral), wall-following and bounce behaviors [1]. Planned lanes are the textbook boustrophedon ("the way an ox plows") coverage path [2][3], which needs a map and localization: in a real vacuum that's a LiDAR or camera.
Our experiment: 100 random rooms
We ran all four robots in 100 random 5 × 4 m rooms (3 to 6 pieces of furniture, half of them against a wall, the same generator as the Random room button) and in the three floor plans above, 40 simulated minutes each. The random robots ran 20 times per floor plan with different random seeds.

| 100 random rooms | 90% clean (median) | Middle 80% of rooms | Clean after 10 min | Clean after 40 min |
|---|---|---|---|---|
| Planned lanes | 3.9 min | 3.5–4.1 min | 98% | 98.3% |
| Random bounce | 11.6 min | 8.8–19.7 min | 85% | 97.9% |
| Spiral + bounce | 11.6 min | 8.8–17.3 min | 85% | 97.5% |
| Wall follow + bounce | 16.1 min | 9.7–23.4 min | 78% | 98.8% |
The planned robot stops when nothing it can reach is left; its "40 min" number is where it stopped.
| Floor plan: time to 90% | Random | Spiral | Wall follow | Planned |
|---|---|---|---|---|
| Studio, one room 20 m² | 13.7 min | 14.5 min | 20.5 min | 4.9 min |
| Apartment, 3 rooms 34 m² | 34.4 min (55% of runs) | 31.9 min (60% of runs) | 35.6 min (70% of runs) | 9.1 min |
| Office, desks + chair legs 63 m² | never (83% after 40 min) | never (77% after 40 min) | never (71% after 40 min) | 16.8 min |
Medians of 20 seeds. "(55% of runs)" means only 55% of the runs reached 90% within 40 minutes; the median counts the others as slower than 40 minutes.

What we learned
- Planning is about 3× faster in one room, and the gap grows with doors. In the studio planned lanes needed 4.9 min versus 13.7 min for random bounce. In the 3-room apartment only 55% of random runs reached 90% in 40 minutes; in the office, none did.
- Random is a lottery. Across the 100 rooms the slowest tenth of random-bounce runs took 19.7+ minutes, the fastest tenth 8.8. Planned lanes always landed between 3.5 and 4.1. Race the same room twice above and you'll see it.
- Spiral helps a little, wall following helps the edges. Spiral + bounce tied random bounce on median time but had fewer very slow rooms. Wall follow + bounce was the slowest to 90% but ended with the most floor cleaned (98.8% vs 98.3% for planned lanes), because lanes leave thin strips along walls and around legs. Among the three reactive robots, random bounce was fastest in 45 rooms, spiral in 39 and wall follow in 16.
Get the Python version (free)
The browser engine is a line-by-line port of our Python simulator. The Python version adds videos (mp4/gif) of each robot, your own floor plan from a PNG, a robot size/brush/speed setting and a CSV of every run. It used to be a paid download; it's now free for an email address.
Download the Python simulator
Enter your email and we'll send you a confirmation email: click it and your download starts. We'll also email you when we publish a new robot experiment (about once a week). Unsubscribe anytime.
Unzip, then follow README.md.
We ran it from a fresh virtual environment (Python 3.13, numpy 2.5, scipy 1.18, matplotlib 3.11, pillow 12.3). This is the real output; on our machine the four-robot comparison took 18 seconds:
$ python -m venv venv && source venv/bin/activate $ pip install -r requirements.txt $ python run.py --map maps/apartment.txt --compare Map apartment: 8.0 x 6.0 m, cleanable floor 33.9 m2 Random bounce final 91.4% 90% at 28.1 min driven 528.0 m Spiral + bounce final 71.8% 90% at never driven 522.6 m Wall follow + bounce final 94.2% 90% at 20.1 min driven 532.9 m Planned rows (BFS) final 98.1% 90% at 9.1 min driven 265.2 m Chart -> results/apartment_coverage.png CSV -> results/apartment_coverage.csv
Same floor plan, same seed as the image above. Its random robots use numpy's random generator and the browser uses its own, so the reactive robots' single runs differ between the two versions; the planned robot is deterministic and both versions give the same 9.1 min. Over 20 seeds the two versions agree within the seed-to-seed noise:
| Median time to 90%, 20 seeds (share of runs reaching it) | Python | Browser |
|---|---|---|
| studio · Random bounce | 13.6 min (100%) | 13.7 min (100%) |
| studio · Spiral + bounce | 13.9 min (100%) | 14.5 min (100%) |
| studio · Wall follow + bounce | 22.8 min (100%) | 20.5 min (100%) |
| apartment · Random bounce | 36.1 min (65%) | 34.4 min (55%) |
| apartment · Spiral + bounce | over 40 min (50%) | 31.9 min (60%) |
| apartment · Wall follow + bounce | 35.0 min (60%) | 35.6 min (70%) |
Limits of this simulation
- 2D, top-down. No wheel slip, carpet, battery, cliffs, or obstacles that move. A bump turns the robot instantly.
- The planned robot knows the map and its position exactly. Real vacuums get there with LiDAR or cameras and still make small errors, so real planned cleaning is slower than this.
- "Clean" means the brush passed over a spot once. It says nothing about suction or dirt pickup.
- Good for comparing navigation ideas, not for predicting how long a particular product needs in your home.
Want to build a robot that navigates on its own?
Kit 1 is our ESP32 obstacle-avoiding car kit with a simulation twin of the same car. Its avoidance code was tested in 40 simulated rooms first: see the experiment.
More robot vacuum reading: a 100-line robot vacuum simulator in Python (random bounce vs planned rows, explained step by step) and how robot vacuums really cover a room.
FAQ
Which robot vacuum cleaning pattern is best?
In our simulation, planned back-and-forth lanes: in 100 random furnished 5 x 4 m rooms they reached 90% clean in a median 3.9 minutes, against 11.6 for random bounce, 11.6 for spiral + bounce and 16.1 for wall follow + bounce, with the same robot, speed and brush.
Do random robot vacuums ever finish the room?
In a single open room, almost always: 98% of our random-bounce runs reached 90% within 40 minutes. In a three-room apartment only 55% did, and in an open office with desks none did. Doorways are the problem: a robot that bounces at random rarely finds its way through a narrow opening.
Why use wall following if it's slower?
Because it reaches the edges and corners. Wall follow + bounce was the slowest to 90% but finished with the most floor cleaned (98.8% after 40 minutes, vs 98.3% for planned lanes, whose lanes leave thin strips along walls). Real vacuums combine lanes with an edge pass for this reason.
Is this how a Roomba works?
Early bump-sensor robot vacuums mixed spiral spot cleaning, wall following and bouncing, which is what three of the four robots here do; iRobot's multi-mode coverage patent describes this kind of mode switching. Robots with LiDAR or camera navigation build a map and plan lanes. Our robots are simplified 2D models, not copies of any product.
Can I simulate my own floor plan?
Yes. Draw it on the grid above (one square = 10 cm), or in the free Python version use a text map or a black-and-white PNG of your floor plan with a scale in meters per pixel.
Sources
- iRobot Corporation, US 6,809,490 B2, Method and system for multi-mode coverage for an autonomous robot (spot coverage, obstacle following and bounce modes).
- H. Choset, Coverage of Known Spaces: The Boustrophedon Cellular Decomposition, Autonomous Robots 9, 2000.
- E. Galceran and M. Carreras, A survey on coverage path planning for robotics, Robotics and Autonomous Systems 61(12), 2013.
- Simulation, code and measurements: TinyBot Forge, October 2026. The batch script (experiment.js) and raw results are available on request.
Need a robot simulation for your product or class?
We build physics-simulated robot videos and Python robot simulations to order.
Email us