Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Robot localization lab

Help a lost robot find itself: watch a histogram filter update its belief with each noisy reading and move, in a corridor or on coloured tiles.

How to use

  1. A robot is somewhere in a looping corridor but does not know where. The bars show its belief: how likely it thinks each cell is.
  2. Press Sense: the robot's sensor says door or wall (and is sometimes wrong). Cells that match the reading become more likely.
  3. Press Move: the robot drives right, but not always exactly. The belief shifts and spreads out.
  4. Repeat. After a few moves and readings, one bar usually towers over the rest. Tick Show the real robot to check the guess.
  5. The Coloured floor tab does the same in two dimensions: the robot reads the colour of the tile it stands on.

Keyboard and touch

TabMove between settings and buttons
Enter or SpacePress the focused button
TouchEvery control works by tapping

Tips

  • Moving without sensing makes the robot less sure; sensing without moving cannot tell two identical doors apart.
  • A corridor with evenly spaced doors is hard to solve: every door looks the same. Uneven gaps make positions unique.
  • Make the sensor worse (closer right and wrong values) and count how many more steps the robot needs.

About this tool

This is a histogram filter, the simplest form of Bayesian localization used by real robots and self-driving systems. Sensing multiplies each cell's belief by the chance of the reading there (the "right" value where the map matches, the "wrong" value elsewhere) and rescales so the total is 100 %. Moving shifts the belief, mixing in the chances of moving one cell too short or too far (the rest of the probability). The hidden robot follows the same rules: its moves and readings are drawn at random from the same chances, with a seeded generator so a robot number repeats. Uncertainty is shown as entropy in bits.

Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product