google-deepmind / google-deepmind/trfl

Legal actions mask bug

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

Found a bug in `epsilon_greedy()` in `policy_ops.py` when applying `legal_actions_mask`. It fails when masking the action with the highest action value.

For example:
```
action_values = [2.0, 1.0, 1.0]
legal_actions_mask = [0., 1., 1.]
epsilon = 0.1
result = policy_ops.epsilon_greedy(action_values, epsilon, legal_actions_mask).probs
```
Outputs:
`[0.9 0.05 0.05]`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.