PKU-MARL / HARL

Official implementation of HARL algorithms based on PyTorch.
484 stars 59 forks source link

运行HASAC时的奇怪错误 #53

Open BUPT-zeld151 opened 5 days ago

BUPT-zeld151 commented 5 days ago

在off_policy_base_runner的第101行有这么一行代码: self.action_spaces[agent_id].seed(algo_args["seed"]["seed"] + agent_id + 1) 这行代码会报错,内容为AttributeError: 'Box' object has no attribute 'seed' 我检查了self.action_spaces[agent_id],输出为Box(4,) 所以这行代码是写错了吗? 还是说HASAC不适用于mamujoco环境?

guazimao commented 4 days ago

Hi, the 'Box' object should have the parameter 'seed'. Please refer to the official document. Also, running HASAC in mamujoco works fine for us. I think your issue might be due to not having the correct version of gym installed. You could try reinstalling gym==0.21.0 and see if that resolves the problem.

BUPT-zeld151 commented 3 days ago

gym==0.21.0

Thanks. The problem is solved by installing gym==0.21.0. However, it is noticable that gym 0.21.0 also requires setuptools==65.5.0, wheel==0.38.0 and pip<24 (for example pip==20.0.2). Just mention for further reference.