Skip to content

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?

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