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

Fix legal_actions_mask bug in epsilon_greedy(). #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jhtschultz
Copy link
Member

This PR addresses Issue #27

Note that the bug must be addressed in two places. First, when selecting max_value - it must only be selected from legal actions. Second, when computing greedy_probs - there could be multiple action values achieving the max, but not all of them legal.

Also, I added legal_actions_mask to the list of values in the tf.name_scope context manager.

Aside from that, when there is no legal actions mask the epsilon_greedy function should execute exactly the same as before.

Happy to implement any small changes and if there’s a better fix altogether feel free to close this and implement it internally. Just thought I’d offer up a solution :)

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.

1 participant