Live data from Hacker News

Show HN: Self-Parking Car Evolution

trekhleb.dev

21–30 of 45 posts

Re: Show HN: Self-Parking Car Evolution

#21
post #7

Earlier quoted context omitted.

Yes, currently the simulation performance is one of the biggest issues ( https://github.com/trekhleb/self-parking-car-evolution/issue... ). You may try to check the “Performance boost” checkbox that simplifies the geometry. It should give you approx x1.5 performance increase. But even with x1.5 boost the performance is still an issue, yes

Have you thought about a native version? I get the appeal of writing for the browser but it's so damned slow compared to what you could get natively.

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

Re: Show HN: Self-Parking Car Evolution

#22
post #20

This is pretty cool, kudos to the author. However, I'm curious about why would you want to use a genetic algorithm (GA) for what is clearly a relatively straightforward computer vision (CV) problem. I would argue that the GA-based evolutionary solution is no simpler and, more importantly, will not only never outperform the CV-based one in terms of accuracy and speed, but will be orders of magnitude slower.

You are right in this particular case. CV may effectively solve this particular problem, but will be useless if yellow cars are replaced with blue trucks, or if starting angle will be slightly different, or if other cars will start moving as well, etc, etc. Genetic algorithm may be useful if one needs to animate cars in a game and making the algorithm less deterministic will make the game look better.

Re: Show HN: Self-Parking Car Evolution

#23
post #20

This is pretty cool, kudos to the author. However, I'm curious about why would you want to use a genetic algorithm (GA) for what is clearly a relatively straightforward computer vision (CV) problem. I would argue that the GA-based evolutionary solution is no simpler and, more importantly, will not only never outperform the CV-based one in terms of accuracy and speed, but will be orders of magnitude slower.

Yeah, the GA is not the best option for self-driving tasks, agree.

The reason why I chose GA is because I wanted to play around with this algorithm at the first place. And only after that I’ve tried to come up with some artificial problem I could try to solve with it :)

Re: Show HN: Self-Parking Car Evolution

#24
post #22
post #20

This is pretty cool, kudos to the author. However, I'm curious about why would you want to use a genetic algorithm (GA) for what is clearly a relatively straightforward computer vision (CV) problem. I would argue that the GA-based evolutionary solution is no simpler and, more importantly, will not only never outperform the CV-based one in terms of accuracy and speed, but will be orders of magnitude slower.

You are right in this particular case. CV may effectively solve this particular problem, but will be useless if yellow cars are replaced with blue trucks, or if starting angle will be slightly different, or if other cars will start moving as well, etc, etc. Genetic algorithm may be useful if one needs to animate cars in a game and making the algorithm less deterministic will make the game look better.

Fair enough. Thank you for chiming in.

Re: Show HN: Self-Parking Car Evolution

#25
post #20

This is pretty cool, kudos to the author. However, I'm curious about why would you want to use a genetic algorithm (GA) for what is clearly a relatively straightforward computer vision (CV) problem. I would argue that the GA-based evolutionary solution is no simpler and, more importantly, will not only never outperform the CV-based one in terms of accuracy and speed, but will be orders of magnitude slower.

Yeah, the GA is not the best option for self-driving tasks, agree. The reason why I chose GA is because I wanted to play around with this algorithm at the first place. And only after that I’ve tried to come up with some artificial problem I could try to solve with it :)

I'm glad that we're on the same page on this. Your motivation is totally understandable and the end result (including relevant blog post) is both very nicely done and educational. Thank you for this and your other resources that you share online! :-)

Re: Show HN: Self-Parking Car Evolution

#27
post #7
post #4

This is cute, but am I missing some way to make it run faster? It seems to only happen in real time. Group sizes of any more than about 10 make my machine slow to a crawl. Using the suggested population size of 500, then means it takes running 50 groups to pass 1 generation. With the suggested time of 17s, that's about 15 minutes per generation. The recommended 50 generations would therefore take over 12 hours. And t…

Yes, currently the simulation performance is one of the biggest issues ( https://github.com/trekhleb/self-parking-car-evolution/issue... ). You may try to check the “Performance boost” checkbox that simplifies the geometry. It should give you approx x1.5 performance increase. But even with x1.5 boost the performance is still an issue, yes

Maybe you could have an option to not render all the generations and maybe only show the animation for the Nth run

Re: Show HN: Self-Parking Car Evolution

#30
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…

This was my first thought as well.
Post reply on HN