Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robust model on multiple tracks [question] #7

Open
tleyden opened this issue May 19, 2019 · 3 comments
Open

Robust model on multiple tracks [question] #7

tleyden opened this issue May 19, 2019 · 3 comments
Labels
question Further information is requested

Comments

@tleyden
Copy link

tleyden commented May 19, 2019

The models I've trained seemed to do much better on certain tracks as compared to others. I was thinking that a training loop over randomly generated tracks would do better since it would be robust to the particular track. For example, the input to the training loop would be the number of tracks to complete (n), and then:

  • Repeat until n tracks have been completed
    • For track x, repeat training until the model can complete track x without going outside the lanes
    • Regenerate a new track

Setting n to a high enough value should produce a model that would work on a high percentage of randomly generated tracks.

Is there already a way to do this in train.py or would you accept a PR w/ an enhancement?

@araffin araffin added the question Further information is requested label May 19, 2019
@araffin
Copy link
Owner

araffin commented May 19, 2019

Hello,

There is no way currently of doing that and I would definitely appreciate a PR that enables that =).
I also tried to fix the seed a while ago but couldn't make it work (apparently you succeeded on your side, no?).
The original idea of the project was to use the method on a real RC car, that's also why I did not spend much time in training on n different tracks.

@araffin
Copy link
Owner

araffin commented May 19, 2019

For the guidelines, please look at the ones in stable baselines, I use the same here ;)

@tleyden
Copy link
Author

tleyden commented May 19, 2019

Ok great! Yes I managed to get the simulator to regenerate new tracks, see https://github.com/tawnkramer/sdsandbox/issues/24 + tawnkramer/sdsandbox#26. The quick fix is to get the changes from #8 and call regen_road(rand_seed=int(time.time())) and the road regeneration should work.

Any suggestions on how the interface should look on a training loop over multiple tracks?

I don't see an easy way to be notified by the simulator when the car completed a track, so maybe a timestep approach is simpler.

For example add a --num-unique-tracks (default=1) parameter and then change --n-timesteps to --n-timesteps-per-track, and the then it would loop the training over --num-unique-tracks, and only move onto the next track when it hit --n-timesteps-per-track timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants