TINYBOT FORGE
Home › Learn › Robot vacuum simulator

Robot vacuum simulator: draw your room, race 4 cleaning patterns

Runs in your browserCoverage path planningFree Python versionUpdated October 12, 2026

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.

0:00 simulated
Random bounce–
Spiral + bounce–
Wall follow + bounce–
Planned lanes–
RobotClean now90% atDriven

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

PatternWhat the robot doesNeeds
Random bounceDrive straight; on every bump turn 90–270° at randomA bump sensor
Spiral + bounceSpot-clean in a growing spiral, then bounce; after a bump, 1 in 4 chance to spiral againA bump sensor
Wall follow + bounceKeep the wall on its right for 90 s, bounce for 120 s, repeatA side sensor
Planned lanesBack-and-forth lanes one brush apart (boustrophedon), shortest route to the next unvisited lane, then a clean-up pass over missed spotsA 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.

Dot and range chart: minutes until 90% clean in 100 random rooms. Planned lanes median 3.9, random bounce 11.6, spiral 11.6, wall follow 16.1
Dot = median of 100 rooms, bar = the middle 80% of rooms. Browser engine, October 2026.
100 random rooms90% clean (median)Middle 80% of roomsClean after 10 minClean after 40 min
Planned lanes3.9 min3.5–4.1 min98%98.3%
Random bounce11.6 min8.8–19.7 min85%97.9%
Spiral + bounce11.6 min8.8–17.3 min85%97.5%
Wall follow + bounce16.1 min9.7–23.4 min78%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%RandomSpiralWall followPlanned
Studio, one room 20 m²13.7 min14.5 min20.5 min4.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.

Four maps of the same apartment after 10 minutes: random 56% clean, spiral 55%, wall follow 47%, planned lanes 93%
The apartment after 10 simulated minutes, rendered by the Python version (seed 0).

What we learned

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.

Free. Personal and educational use, including classes.

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)PythonBrowser
studio · Random bounce13.6 min (100%)13.7 min (100%)
studio · Spiral + bounce13.9 min (100%)14.5 min (100%)
studio · Wall follow + bounce22.8 min (100%)20.5 min (100%)
apartment · Random bounce36.1 min (65%)34.4 min (55%)
apartment · Spiral + bounceover 40 min (50%)31.9 min (60%)
apartment · Wall follow + bounce35.0 min (60%)35.6 min (70%)

Limits of this simulation

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.

One email when Kit 1 opens. Unsubscribe anytime.

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

  1. 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).
  2. H. Choset, Coverage of Known Spaces: The Boustrophedon Cellular Decomposition, Autonomous Robots 9, 2000.
  3. E. Galceran and M. Carreras, A survey on coverage path planning for robotics, Robotics and Autonomous Systems 61(12), 2013.
  4. 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