Skip to content

Commit

Permalink
R15 fix elo (#5151)
Browse files Browse the repository at this point in the history
* add group done to ELO computation

* add not interrupted
  • Loading branch information
andrewcoh authored Mar 17, 2021
1 parent ab18283 commit 65c1550
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ml-agents/mlagents/trainers/ghost/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ def _process_trajectory(self, trajectory: Trajectory) -> None:
i.e. in asymmetric games. We assume the last reward determines the winner.
:param trajectory: Trajectory.
"""
if trajectory.done_reached:
if (
trajectory.done_reached
and trajectory.all_group_dones_reached
and not trajectory.interrupted
):
# Assumption is that final reward is >0/0/<0 for win/draw/loss
final_reward = (
trajectory.steps[-1].reward + trajectory.steps[-1].group_reward
Expand Down

0 comments on commit 65c1550

Please sign in to comment.