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

Question about _computeReward in Multi Agent environment #20

Closed
mfarrelm opened this issue Feb 9, 2021 · 1 comment
Closed

Question about _computeReward in Multi Agent environment #20

mfarrelm opened this issue Feb 9, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mfarrelm
Copy link

mfarrelm commented Feb 9, 2021

First of all, thank you for your work on this simulator. I have a question, why is it using index 0 on getDroneStateVector instead of i. Is it a typo or maybe there is another meaning behind it?

  rewards = {}
  states = np.array([self._getDroneStateVector(0) for i in range(self.NUM_DRONES)])
  rewards[0] = -1 * np.linalg.norm(np.array([1, 1, 1]) - states[0, 0:3])**2
  for i in range(1, self.NUM_DRONES):
      rewards[i] = -1 * np.linalg.norm(states[i-1, 0:3] - states[i, 0:3])**2
  return rewards

This is from LeaderFollowerAviary.py.

@JacopoPan JacopoPan added the bug Something isn't working label Feb 9, 2021
@JacopoPan
Copy link
Member

Thanks! It absolutely looks like a typo and had trickled to a couple of other places too. Should be fixed in the latest push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants