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

[Question] User needs to reset gSDE noise when using learned model? #1767

Open
4 tasks done
gmarkkula opened this issue Nov 26, 2023 · 1 comment
Open
4 tasks done
Labels
documentation Improvements or additions to documentation help wanted Help from contributors is welcomed question Further information is requested

Comments

@gmarkkula
Copy link

gmarkkula commented Nov 26, 2023

❓ Question

Many thanks for the great library!

I have been trying out gSDE lately, which seems to be working well for my problem, but I have found that when I simulate the learned model using the model.predict() approach described in the examples in the documentation (e.g., here), it gives deterministic behaviour (in the sense that the behaviour in each simulated episode will look the samel) even if I set deterministic=False in the call to predict(). After some digging, I think I understand that this is due to the sde_sample_freq setting not being made use of in predict(), which sort of makes sense because that function doesn't have access to the environment.

So my question is just: Am I correct in understanding that when running models learned with gSDE, if the user wants the same non-deterministic behaviour as at the end of learning, the user needs to keep track of n_sde_freq themselves and do the model.policy.reset_noise(env.num_envs) themselves at appropriate intervals? If so, it's possibly something to mention in the documentation? (Happy to have a go at contributing with such edit(s) if appropriate.)

Checklist

@gmarkkula gmarkkula added the question Further information is requested label Nov 26, 2023
@gmarkkula gmarkkula changed the title [Question] question title [Question] User needs to reset gSDE noise when using learned model? Nov 26, 2023
@araffin
Copy link
Member

araffin commented Nov 29, 2023

Hello,

Am I correct in understanding that when running models learned with gSDE, if the user wants the same non-deterministic behaviour as at the end of learning, the user needs to keep track of n_sde_freq themselves and do the model.policy.reset_noise(env.num_envs) themselves at appropriate intervals?

yes, you are correct.
gSDE is meanly meant to be used during training as at test time, for continuous control, it is recommended to use the deterministic controller.

If so, it's possibly something to mention in the documentation? (Happy to have a go at contributing with such edit(s) if appropriate.)

yes please =)

@araffin araffin added documentation Improvements or additions to documentation help wanted Help from contributors is welcomed labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Help from contributors is welcomed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants