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

Can anyone explain Why we have self.Q = tf.reduce_sum(tf.multiply(self.output, self.actions_), axis=1) in Deep Q learning with Doom.ipynb #65

Open
ParmpalGill opened this issue Jul 28, 2019 · 1 comment

Comments

@ParmpalGill
Copy link

ParmpalGill commented Jul 28, 2019

why multiply by action and use reduce sum instead of argmax?

@yonigottesman
Copy link

I think its because actions is a 1hot vector and there is 1 only in the chosen action,
So multiplying will give you a vector of zeros instead of one place which will hold the qvalue.
the reduce_sum just gets this number out because all the rest are zeros.
What do you think?

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

2 participants