oxwhirl / smac

SMAC: The StarCraft Multi-Agent Challenge
MIT License
1.04k stars 227 forks source link

How to judge win or lose #41

Closed starry-sky6688 closed 4 years ago

starry-sky6688 commented 4 years ago

Hi, I'm wondering how to judge win or lose.

I judged it by comparing the cumulative rewards with 19.9,it says, if cumulative rewards > 19.9, I think it wins,is it right?

Because I find the cumulative rewards is sometimes like 19.9999999, so I don't use 20.

Looking forward to your reply.

samvelyan commented 4 years ago

Hi there!

The step() function in StarCraft2Env returns all the necessary information after each timestep. You can check if the episode has terminated (second return value of step() function) and the info dictionary includes battle_won=True (third return value of step() function).

Hope this helps.