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

Features/openai hacks #35

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

richardrl
Copy link
Contributor

@richardrl richardrl commented Feb 21, 2019

Sorry for the delay...
These are the changes for successful pushing/pick and place in state space + typo in gaussian epsilon

I tried to cleanup the commit history with git rebase -i ec231e7 but it's behaving strangely; after I run that command, it pulls a much longer history of the commits, including some from the main branch.

Copy link
Collaborator

@vitchyr vitchyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Would you mind making a few changes before I merge it in?

@@ -4,7 +4,7 @@
import numpy as np


class GaussianAndEpislonStrategy(RawExplorationStrategy, Serializable):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix!

self.composite_normalizer = composite_normalizer

def forward(self, obs, **kwargs):
if self.composite_normalizer:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check seems a bit redundant given the assert statement in __init__.

def __init__(
self,
*args,
composite_normalizer: CompositeNormalizer = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we can just make this a required argument rather than kwarg.

if self.clip_q:
target_q_values = torch.clamp(
target_q_values,
-1/(1-self.discount),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a parameter rather than hard-coding it? It could be something like:

if max_q_value is None:
  max_q_value = -1/(1-self.discount)   # for HER sparse rewards.

in __init__.

@richardrl
Copy link
Contributor Author

I changed it to clip the networks instead, this should be easier.

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

Successfully merging this pull request may close these issues.

2 participants