starry-sky6688 / MARL-Algorithms

Implementations of IQL, QMIX, VDN, COMA, QTRAN, MAVEN, CommNet, DyMA-CL, and G2ANet on SMAC, the decentralised micromanagement scenario of StarCraft II
1.46k stars 283 forks source link

def forward(self, q_values, states): # states的shape为(episode_num, max_episode_len, state_shape) # 传入的q_values是三维的,shape为(episode_num, max_episode_len, n_agents) #79

Closed zhouweiqing-star closed 2 years ago

zhouweiqing-star commented 2 years ago

def forward(self, q_values, states): # states的shape为(episode_num, max_episode_len, state_shape)

传入的q_values是三维的,shape为(episode_num, max_episode_len, n_agents)

作者您好,我从知乎来的,想问您一个问题,q_values是从哪里传入的啊,RNN返回的是q啊

starry-sky6688 commented 2 years ago

你发的这个函数应该是qmix_net吧,他是qmix训练的时候才用的,q_values是用来决策的rnn传过来的;

具体看这里的代码吧:https://github.com/starry-sky6688/StarCraft/blob/2c07045f294ad4eeb5ab8a8d25cf43d0efea4cb3/policy/qmix.py#L93