locate
a robot is hidden on the map. it can feel the walls, but not see. find it in 5 guesses.
facing —
5 guesses left
reading sensors…
SOLVED
how to play
- the robot is somewhere on the map, facing the direction shown. its four numbers are distances to the nearest wall north, east, south and west.
- tap the cell you think it's in and hit guess. the robot's cell or any cell touching it counts.
- missed? pick a move: turn, or drive forward one cell (it won't drive through walls). it reads its sensors again.
- five guesses. compare the readings to the map, rule places out, and close in.
how monte carlo localization works
this game is a tiny version of a real robotics problem, and it's based on the localization work i've done in robotics: a robot has a map but doesn't know where it is on it.
1. scatter. start with a few hundred particles spread evenly over every open spot. each one is a guess: "maybe the robot is here."
2. predict. when the robot moves, move every particle the same way. particles that would drive into a wall stay put, just like the robot.
3. weigh. for each particle, work out what the sensors would read from there, and compare it to what the robot actually read. close match → heavy particle. bad match → nearly weightless.
4. resample. draw a new set of particles, picking heavy ones more often. bad guesses die out, good ones multiply. add a little random jitter so they don't all collapse onto one point.
repeat predict → weigh → resample every step. after a few rounds the particles bunch up where the robot really is. solve today's puzzle and hit show particles to watch it happen with your own moves.
faq
what is monte carlo localization?
it's how a robot works out where it is on a known map. it scatters thousands of guesses (particles) over the map, moves them all the way the robot moved, then keeps the ones whose expected sensor readings match what the robot actually saw. after a few rounds the survivors pile up on the real position.
what do the sensor numbers mean?
each is the distance, in cells, from the robot to the nearest wall in that direction (north, east, south, west), counting the map edge as a wall. they're noisy: each reading can be off by about half a cell.
does the robot know which way it's facing?
yes. like a robot with a compass or imu, it knows its heading, just not its position. that's why the readings are labelled north/east/south/west.
what counts as a correct guess?
the robot's cell or any of the 8 cells around it. a miss tells you if you were close (within 3 cells), warm (within 6) or cold.
made by edwrdq