Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run error #1

Open
DashStone opened this issue Apr 8, 2021 · 2 comments
Open

run error #1

DashStone opened this issue Apr 8, 2021 · 2 comments

Comments

@DashStone
Copy link

Thanks for your great work.

I'm facing a problem when I run the project.

the best GPU is  0  with free memories of  6918 
user name is luuu
/home/luuu/anaconda3/envs/rpg/lib/python3.6/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
  warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Logging to /tmp/openai-2021-04-08-12-57-01-080091
Creating dummy env object to get spaces
Process ForkProcess-2:
Process ForkProcess-5:
Process ForkProcess-3:
Process ForkProcess-6:
Process ForkProcess-1:
Process ForkProcess-7:
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/luuu/anaconda3/envs/rpg/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/luuu/baselines/baselines/common/vec_env/shmem_vec_env.py", line 125, in _subproc_worker
    pipe.send(_write_obs(env.reset()))
  File "/home/luuu/baselines/baselines/common/vec_env/shmem_vec_env.py", line 125, in _subproc_worker
    pipe.send(_write_obs(env.reset()))
  File "/home/luuu/baselines/baselines/common/vec_env/shmem_vec_env.py", line 125, in _subproc_worker
    pipe.send(_write_obs(env.reset()))
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 233, in reset
    observations = [self.parse_obs(self.agents[i], i) for i in range(self.num_agents)]
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 233, in reset
    observations = [self.parse_obs(self.agents[i], i) for i in range(self.num_agents)]
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 233, in reset
    observations = [self.parse_obs(self.agents[i], i) for i in range(self.num_agents)]
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 233, in <listcomp>
    observations = [self.parse_obs(self.agents[i], i) for i in range(self.num_agents)]
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 233, in <listcomp>
    observations = [self.parse_obs(self.agents[i], i) for i in range(self.num_agents)]
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 300, in parse_obs
    obs_f[-22] = (self.killed[1 - id] != 0)
  File "/home/luuu/liuqi/RPG/Agar/agar/Env.py", line 300, in parse_obs
    obs_f[-22] = (self.killed[1 - id] != 0)
IndexError: index 1 is out of bounds for axis 0 with size 1

Can you give me some suggestions?
Thanks a lot!

@zoeyuchao
Copy link
Member

@recordmp3 This seems an error of Agar, could u double check?

@recordmp3
Copy link
Collaborator

Maybe it's because you didn't set --num-controlled-agent=2? It looks like the length of the array self.killed is only 1 in your running result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants