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

DADS reward implementation #13

Open
slee01 opened this issue Oct 31, 2021 · 0 comments
Open

DADS reward implementation #13

slee01 opened this issue Oct 31, 2021 · 0 comments

Comments

@slee01
Copy link

slee01 commented Oct 31, 2021

Thank you for sharing your great code :)

I think I found that the reward function is a little different from what was defined in the paper(iclr2020):

# final DADS reward
intrinsic_reward = np.log(num_reps + 1) - np.log(1 + np.exp(
np.clip(logp_altz - logp.reshape(1, -1), -50, 50)).sum(axis=0))

As far as I understand, the first reward term defined in eq. 6 of the paper is log q(s'|s,z) - log(\sum_{i=1}^{L}{q(s'|s,z_i)}). But the reward in this repo is defined as \sum_{i=1}^{L} {log q(s'|s,z) - log q(s'|s,z_i)} with numpy's broadcasting functionality. May I ask if I misunderstood or if there is any practical technique I'm missing?

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

No branches or pull requests

1 participant