Skip to content

采样的action出现错误 #2

Description

@liuda1064838990

请问进行action = model.random_action()的时候,有报错,报错内容如下:File "d:\mutienv\multiagent-particle-envs-master\multiagent\environment.py", line 174, in _set_action
agent.action.u[0] += action[0][1] - action[0][2]
IndexError: index 2 is out of bounds for axis 0 with size 2
action的维度是否不对?进行随机采样时的返回action的是否应该改成5列?
def random_action(self):
return np.random.uniform(low=-1, high=1, size=(self.n_agents, 2))#2
如果改成5列之后,后面还有需要更改的地方吗?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions