Skip to content

Commit

Permalink
fix(lxy): fix completed value inf bug when zero exists in action_mask…
Browse files Browse the repository at this point in the history
… in gumbel muzero (#178)
  • Loading branch information
karroyan authored Dec 29, 2023
1 parent 6af174b commit 7953c54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lzero/policy/gumbel_muzero.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ def _forward_collect(
# entire action set.
valid_value = np.where(action_mask[i] == 1.0, improved_policy_probs, 0.0)
action = np.argmax([v for v in valid_value])
roots_completed_value = np.where(action_mask[i] == 1.0, roots_completed_value, 0.0)

output[env_id] = {
'action': action,
Expand Down

0 comments on commit 7953c54

Please sign in to comment.