Live data from Hacker News

Show HN: Self-Parking Car Evolution

trekhleb.dev

41–45 of 45 posts

Re: Show HN: Self-Parking Car Evolution

#42
post #38
post #9

Earlier quoted context omitted.

Yes, you may press the "Restore Evolution" button (at the bottom of the screen) and then upload the pre-saved training checkpoints from here https://github.com/trekhleb/self-parking-car-evolution/tree/... You may also press the "Restore Evolution" button and then press "Use demo checkpoint" to use some pre-trained data.

Does each visitor submit their dna back to the server? Using the power of the web this allows you to have as many "cores" as you have visitors, and train massively parallel!

Currently all calculations are happening in user’s browsers - no sending to the backend.

Re: Show HN: Self-Parking Car Evolution

#43
post #39

Earlier quoted context omitted.

I haven’t thought about the native version, it was fun trying to implement it for browser. To resolve the performance issue I would try next to switch to the 2D simulation engine, since we don’t use the height during the parking. Getting rid of the 3rd dimension, lights and complex geometry would increase the performance drastically I believe

And then still render it in 3D, right? That's a really cool idea.

Yes, training may happen pretty fast in 2D, but then applied to the 3D to final visualizations. But this is just an assumption. I haven’t tried this approach yet.

Re: Show HN: Self-Parking Car Evolution

#44
post #39

Earlier quoted context omitted.

And then still render it in 3D, right? That's a really cool idea.

Yes, training may happen pretty fast in 2D, but then applied to the 3D to final visualizations. But this is just an assumption. I haven’t tried this approach yet.

https://rednuht.org/genetic_cars_2/ does something like this. You can turn off visualizations and let it run for a while then turn visualizations back on or replay the best result.

Re: Show HN: Self-Parking Car Evolution

#45
post #6

> 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 o…

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:…

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.

Post reply on HN