uzh-rpg / agile_flight

Developing and Comparing Vision-based Algorithms for Vision-based Agile Flight
MIT License
142 stars 54 forks source link

Changing environment/scene during training #18

Closed ouafi98 closed 2 years ago

ouafi98 commented 2 years ago

Hi I've spent some time finding a way to change the environment/scene during the training I didn't find anything easy. I've found addDynamicObstacle (but not its counterpart ), also found addStaticObsacle but it seems that it is not used anywhere.

Do you have some tips on How I can achieve that? (I want to randomly appear in an environment/scene during training)

I've questions on continuing learning with rpg_baselines. is it possible?
because I've used model.save() and model.load() but the agent does not seem to gain something from the previous training it's like it starts over.

If it's possible with rpg_baselines, could please tell me how to do continuing learning properly?

(if I can't change environment/scene during training, I would like to train, stop, switch environment/scene, load, and retrain in a fresh new environment)

Best r

yun-long commented 2 years ago

Hi

It is very difficult to change the environment during the training since Unity itself does not support it.

ouafi98 commented 2 years ago

Thanks for the reply.

What about continuing learning / curriculum learning in rpg_baselines ?

Can I save a model with model.save() Then load it for training in another environment and be sure to not start from scratch ?

Br.

yun-long commented 2 years ago

yes. this is for sure possible.

For this, I suggest reading the documents about stable baselines3

https://stable-baselines3.readthedocs.io/en/master/index.html