oxwhirl / smacv2

MIT License
197 stars 30 forks source link

Calculation of mean_test_win_rate #40

Closed dewet99 closed 8 months ago

dewet99 commented 8 months ago

I am trying to understand how the mean_test_win_rate is obtained. From my understanding, the environment keeps track of battles played and battles won, and return win_rate when calling the get_stats() method as won/played. As I understand it, the win rate will then accumulate over test episodes. For example, test iteration 1 consists of 32 episodes, and the agents win 4 of them. Win rate is then 4/32 = 0.125. Test iteration 2 consists of another 32 episodes, and the agents win 6 of them. The win rate then becomes 10/64 = 0.15625. Is my understanding of this correct, or where am I going wrong?

I am fairly certain that I am going wrong somewhere, because if you look at the QMIX results from the provided .pkl file, specifically "protoss_5_vs_5" "QMIX" seed number "2", then win rates are 0, 0, 0.125, 0 for the first 4 logging steps. This does not make sense, as if the agents win no episodes in the next training run, the win rate will decrease but it can never go back down to 0.

Could someone please provide some clarity on this?