DEV Community

Discussion on: Self-Parking Car in <500 Lines of Code

Collapse
 
trekhleb profile image
Oleksii Trekhleb

Julien, I've spent most of the time to come up with the Evolution Simulator. The Genetic Algorithm basics andwriting the article took approximatelly ~1 month of background work.

The issue is that the work on the article has happened in a "spare" from the main work time. So, it took ~5 month in a background to learn about Genetic Algorithm basics, learn about Three.js basics, implement the Evolution Simulator, experiment with parameters, optimise the algorithm and performance. And after that it took ~2 weeks to write the article.

How would the car know to move forward or backward when not having a free spot in it's sensors

Current implementation of the parking function is really primitive, so it hardly adapts to the parking lot that is different from the one that you see in the Evolution Simulator. It also hardly adapts to the new initial car position. But, still, I belive what trained cars will do is they will move beckwards all the time until they find a free space. But again, to have a more sophisticated behavior of the cars we would probably need to use a Multilayer Perseptron as a brain function instead of over-simplified linear equation.

Collapse
 
jaytonic profile image
Jaytonic

Thanks, those domain are so interessant! Are you working in this field?

Thread Thread
 
trekhleb profile image
Oleksii Trekhleb

Yeah, the domain is pretty interesting. No, I don't work in this field. It is just a hobby for me.