News for hackers. Stuff that matters.
Re:Show HN: Self-Parking Car Evolution by Someone on Tuesday September 28, 2021 @12:36PM (#28684711)
> Whenever the sensor doesn't see any obstacles it reports the value of 0. On the contrary, if the value of the sensor is small but not zero (i.e. 0.01m) it would mean that the obstacle is close.

I would guess that mapping ”nothing here” to a value that is higher than the others would give better results. The software wouldn’t have to learn that weird inversion where the safest value is very close to the least safe ones.

Re:Show HN: Self-Parking Car Evolution by trekhleb on Tuesday September 28, 2021 @01:21PM (#28685173)
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

Re:Show HN: Self-Parking Car Evolution by Someone on Tuesday September 28, 2021 @01:46PM (#28685429)
I 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.

Re:Show HN: Self-Parking Car Evolution by IshKebab on Wednesday September 29, 2021 @08:52AM (#28692925)
I 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.

Re:Show HN: Self-Parking Car Evolution by jetrink on Tuesday September 28, 2021 @01:13PM (#28685092)
Alternatively, it would be interesting to try having the sensors output 1/(distance + k), where k is maybe 0.1m. Then the output would naturally go to zero as things got further away.
Re:Show HN: Self-Parking Car Evolution by fxtentacle on Tuesday September 28, 2021 @06:54PM (#28688417)
Many depth estimation AI approaches do that and call it disparity. The idea there is that as things get further away, you'll see distances less precisely, so perceptually 20cm to 30cm might be the same as 20m to 30m
Re:Show HN: Self-Parking Car Evolution by zestyping on Tuesday September 28, 2021 @03:13PM (#28686298)
This was my first thought as well.