Closed ouyangshixiong closed 3 years ago
Please do not include the 'obs_agent_id' and 'obs_last_action' into the input. You should refer to default.yaml and set these two options to false.
无论从配置上看还是从debug输出看,这两个参数都是False。另外,我建议您回答问题时候最好带上原因(或者解释),这样方便其他人理解你的thinking。请看下面的截图:
I think you might get the wrong version of SMAC. Please check whether you get the original version of Starcraft2.py.. If everything is good, the shape of reshaped_obs should be (5,11,5) in 5m_vs_6m.
Besides, the output of arranged_obs.size() should be [1,5,55]. The first dimension is for the batchsize and the second dimension is for the agent number. While in your output, this number is 3. In my mind, size [1,3,30] looks like the pattern for battle scenario 3m. You should check whether you have set this map name in your configuration file.
Thank you for your quick answer. At my side the input size actually is [1,3,30] I think the battle scenario may be 3m. Because I didnot know how to set this param: "with env_args.map_name=5m_vs_6m" with in vscode( VSCode can not recongnize such args, as I show in my first post ), So do you known how to pass such param into program in VSCode. I only known pass params such as pattern xx=xx, I have no idea on how to pass params such as pattern "with xx"
Add a screenshot for better understand :
@ouyangshixiong you can try to set the args in launch.json as this to pass params like "with env_args.map_name=5m_vs_6m" It seems like a special way for sacred to update the params
Thank you. The issue is fixed for me now.
我尝试debug您的代码。 1.VSCode配置(无法配置README.md 里面要求的参数:_with env_args.map_name=5m_vs6m):
2.使用CPU运行 3.发现basic_controller.py的方法_build_inputs_transformer有数组尺寸错误问题:
显然,arranged_obs摊平的尺寸为90。 下面这行代码试图把它的尺寸修改为(-1,11,5)
reshaped_obs = arranged_obs.view(-1, 1 + (self.args.enemy_num - 1) + self.args.ally_num, self.args.token_dim)
这显然是不行的,麻烦您抽空帮忙解答。截图如下