Skip to content

Commit

Permalink
resubmit smacv2
Browse files Browse the repository at this point in the history
  • Loading branch information
strivebfq committed Oct 10, 2023
1 parent ede4246 commit f1746f9
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 428 deletions.
4 changes: 2 additions & 2 deletions examples/smacv2/custom_vecinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, *args, **kwargs):
def statistics(self, buffer: Any) -> Dict[str, Any]:
info_dict = super().statistics(buffer)

'''for step_info in self.infos:
"""for step_info in self.infos:
for singe_env_info in step_info:
assert isinstance(singe_env_info, dict), "singe_env_info must be dict"
Expand All @@ -47,7 +47,7 @@ def statistics(self, buffer: Any) -> Dict[str, Any]:
], "game_state in the final_info must be win or lose"
self.win_history.append(
singe_env_info["final_info"]["game_state"] == "win"
)'''
)"""

if len(self.win_history) > 0:
info_dict["win_rate"] = np.mean(self.win_history)
Expand Down
Loading

0 comments on commit f1746f9

Please sign in to comment.