4 ms·
That was my first approach actually. The mental model is like this: if sensor says 4 - it means the obstacle is 4 meters away. If obstacle is far away, then se
by trekhleb 5y ago
That was my first approach actually.
The mental model is like this: if sensor says 4 - it means the obstacle is 4 meters away. If obstacle is far away, then sensor may say… hm… 5 meters? 10 meters? Infinity meters? So I went with something a bit higher than max sensor distance limit of 4 meters. And, for linear equation this didn’t work for me. Cars were straggling to learn.
So I’ve switched to another mental model: if sensors says 0 - it means we just turn the sensor of, the sensor is not important. Let’s say you want to learn how to drive forward if the obstacle is behind you. Then you don’t care about the side sensors, you may just cancel them with zero variables. And with this setup, the cars started to learn much faster.
I think the correct approach depends on the brain “model”. For linear equation, canceling the sensor with the zero value of the sensor.
But if you would manage to train the cars well with the different approach - it would be really interesting to try
- Someone 5y agoI would go for “4 meters and a tiny bit”. When driving in a thick fog that limits vision to 4 meters, a sane driver interprets “don’t see anything” as “there’s at least 4 meters of room”, not as “5 meters” or “10 meters”. That also makes sense if you interpret “sensor says 3” not as “obstacle is 3 meters away”, but as “there’s 3 meters of room”. But then, I didn’t try to see what works better. I find the result surprising, though.
- IshKebab 5y agoI would try mapping the distance to some fixed range and still represent "no response" as infinity, e.g. you can use the sigmoid function: nn_input = 2/(1+exp(-distance))-1 This also captures the fact that differences in small distances are more meaningful.