chris-chris / pysc2-examples

StarCraft II - pysc2 Deep Reinforcement Learning Examples
Apache License 2.0
758 stars 355 forks source link

DeprecationWarning: screen_size_px and minimap_size_px are deprecated. #20

Open YuWentao95 opened 6 years ago

YuWentao95 commented 6 years ago

Hi! I tried to run the train_mineral_shards.py using pycharm on the windows 7, the error is : Traceback (most recent call last): File "D:\Anaconda3\lib\multiprocessing\process.py", line 258, in _bootstrap self.run() File "D:\Anaconda3\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "C:\Users\Administrator.SC-201608140925\Desktop\pysc2-examples-master\common\vec_env\subproc_vec_env.py", line 20, in worker minimap_size_px=(32, 32)) as env: File "D:\Anaconda3\lib\site-packages\pysc2\env\sc2_env.py", line 182, in init "screen_size_px and minimap_size_px are deprecated. Use the feature " DeprecationWarning: screen_size_px and minimap_size_px are deprecated. Use the feature or rgb variants instead. Make sure to check your observations too since they also switched from screen/minimap to feature and rgb variants. I hope someone can answer my question, thank you!

Weihnachtshase commented 6 years ago

I got the same issue

mongolia19 commented 6 years ago

@YuWentao95 You should use the new way: AGENT_INTERFACE_FORMAT = sc2_env.AgentInterfaceFormat( feature_dimensions=sc2_env.Dimensions(screen=32, minimap=32) ) pass this into the SC2Env constructor: with sc2_env.SC2Env( map_name="DefeatZerglingsAndBanelings", step_mul=step_mul, visualize=True, game_steps_per_episode=steps * step_mul, agent_interface_format=AGENT_INTERFACE_FORMAT) as env:

braveryCHR commented 5 years ago

mconv1 = layers.conv2d(tf.transpose(minimap, [0, 2, 3, 1]), num_outputs=16, kernel_size=8, stride=4, scope='mconv1')