google-deepmind / google-deepmind/trfl
Legal actions mask bug
Open
- 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
Assessment
This issue has not been assessed yet.