oxwhirl / smac

SMAC: The StarCraft Multi-Agent Challenge
MIT License
1.08k stars 228 forks source link

Can I change the speed of render? #32

Closed keenranger closed 4 years ago

keenranger commented 4 years ago

I want to know my agent works well by watching game, but game speed is so fast that I dont know whats happening.

I know that I can change the in-game speed by '+' and '-' key, but even if I slow down in-game speed, game is still too fast to watch.

Is there any command or something to slow down game speed??

GJHall commented 4 years ago

You can control the rate at which the agents train using the sc2.yaml config file: pymarl/src/config/envs/sc2.yaml

adjust the step multiplier to 1x. step_mul: 8

watch agents train.

I prefer to set to evaluate mode in the default.yaml and watch through there after I have completed training but this is the quicker way to view agent actions.

samvelyan commented 4 years ago

@GJHall step_mul actually corresponds to the number of game steps per agent step. Changing it should have a big impact on the policy.

@keenranger what you can do is you can import time and put a time.sleep(ms) in the step() function of the StarCraft2Env. This is probably the fastest way watching the agents' performance. Alternatively, you can safe a replay and then rewatch it.

Hope this helps.