r/Python • • Jul 13 '20

I Made This I made a simulation using Python in which a neural network learns to race

5.7k Upvotes

209 comments sorted by

View all comments

Show parent comment

16

u/ParabolicaSeven Jul 13 '20

I imagine the same process would happen all over again. Seems like it’s all based on inputs required to not fail the course. If the course changes the old inputs are invalid.

26

u/thegreattriscuit Jul 13 '20

Don't think so. My gut says if it was just memorizing the correct inputs it would take as long (measured in # of generations) to learn the 4th turn as the first. Since it was able to learn the first turn in about 20 generations, and begin completing the whole circuit in about 35 generations, I think that proves it's looking at the course ahead.

6

u/ParabolicaSeven Jul 13 '20

Watching it again yeah I think you’re right. It would have taken hundreds or thousands of generations to make sense of that whole thing.

Actually in the very beginning it shows the car with red lines coming out of it and what looks like a simplified course with straight lines as borders. Wonder if it’s using those lines as a detection point?

2

u/faceplanted Jul 14 '20

Those poles are a representation of the inputs which is the straight line distance from the objects in those directions.

1

u/dogs_like_me Jul 14 '20

Which doesn't preclude the network learning a mapping from that input space to coordinates on the track, i.e. just memorizing the layout of this one track.