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

A little problem #1

Closed
JiahengZeng opened this issue Nov 19, 2021 · 1 comment
Closed

A little problem #1

JiahengZeng opened this issue Nov 19, 2021 · 1 comment

Comments

@JiahengZeng
Copy link

Hello, I'm a graduate student in grade one. I'm very interested in your article and code. I installed the environment according to your instructions and ran your code without adjusting any code content and by default. The following error occurred:

Traceback (most recent call last):
File "algos/maTT/run_script.py", line 181, in
results = train(seed, save_dir)
File "algos/maTT/run_script.py", line 90, in train
doubleQlearning(
File "/home/zjh/scalableMARL/algos/maTT/dql.py", line 362, in doubleQlearning
batch = replay_buffer.sample_batch(batch_size)#, env.num_targets)
File "/home/zjh/scalableMARL/algos/maTT/replay_buffer.py", line 104, in sample_batch
return self._encode_sample(batch_size, idxes, nb_targets)
File "/home/zjh/scalableMARL/algos/maTT/replay_buffer.py", line 64, in _encode_sample
batch['obs'][i] = obs_t
ValueError: could not broadcast input array from shape (2,6) into shape (2,5)

I will study your code carefully. But since you are more familiar with your code, are there some small problems that you can solve immediately? If it runs successfully, I believe it can better help me understand the code. Thank you

@christopher-hsu
Copy link
Owner

Thank you for the question, it should be fixed now! The issue was in "envs/maTTenv/env/setTracking-v0.py", line 55. The self.limit['state'] had the incorrect number of dimensions and was in fact missing one.

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

2 participants