Skip to content

Fix legal_actions_mask bug in epsilon_greedy().#28

Open
jhtschultz wants to merge 1 commit intogoogle-deepmind:masterfrom
jhtschultz:epsilon_greedy_fix
Open

Fix legal_actions_mask bug in epsilon_greedy().#28
jhtschultz wants to merge 1 commit intogoogle-deepmind:masterfrom
jhtschultz:epsilon_greedy_fix

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