Tuesday, 4 November 2014

Uncertainty

If the algorithm wants to be generally usable, it must be able to gracefully deal with uncertainty.

When a rockets detects a falling asteroid in the video shown in the last post, the rockets imagine a future where the exact position of the asteroid is imagined, with no errors. It is only possible because it is a deterministic simulation what the rocket is using to calculate the future positions of the asteroid, and as you can see in the video, they can avoid the risk with a remarkably cold blood.

But it is not realistic. In the real systems, there are uncertainties. You know the asteroid will be in that position in one second, but with a standard error you can not control.

In the simulation is correspond to a random noise added to the asteroid velocity at each step, but only when a future is being simulated, in the real simulation, the one you see on screen, the asteroid follow strictly with the laws of physic using its real position and velocity.

In the following video, traces of the futures imagined by the rockets for each asteroid is drawn. As you could spect, the traces look like a whaterfall. As the future goes on, more and more small uncertainties accumulate on the asteroid velocities, so after some time, the traces obtained for each future diverge.

The effect on the rockets is that now they don't have to avoid a single falling trace of an asteroid, they have to hide away from a shower of asteroids falling in different directions. The rockets panic some times, and if they find no way to scape an asteroid, they just wait for it.

In this example the rockets doesn't have any uncertainty about their own positions or velocities, it can be added, but it rapidly increments the number of futures you need to simulate, and my CPU is already smelling strange.

No real rockets were harmed while producing this video footage!