Skip to content

Commit

Permalink
fix: prevent array length error in win_rate_plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriCat committed Dec 13, 2022
1 parent de6c32f commit db9bc20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/win_rate_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def get_wp_list(path):
for opponent in opponents:
wp_list = averaged_wp_lists[opponent]
start = start_epoch[opponent]
# ax.plot(clipped_epoch_list[start:], wp_list[start:], label=opponent)
ax.plot(clipped_game_list[start:], wp_list[start:], label=opponent)
end = min(min(len(clipped_epoch_list), len(clipped_game_list)), len(wp_list))
# ax.plot(clipped_epoch_list[start:end], wp_list[start:end], label=opponent)
ax.plot(clipped_game_list[start:end], wp_list[start:end], label=opponent)
last_win_rate[opponent] = wp_list[-1]

ax.set_xlabel('Games', size=14)
Expand Down

0 comments on commit db9bc20

Please sign in to comment.