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

Bug fixes for Issue #818 #836

Merged
merged 9 commits into from
Oct 23, 2022
Merged

Conversation

BolunDai0216
Copy link
Contributor

@BolunDai0216 BolunDai0216 commented Oct 22, 2022

Description

  • Changed the action space to [-1, 1]. Internally the action space is [-1, 1] * purser_max_accel.
  • Changed the default max velocity and max acceleration of the pursuer to [-0.2, -0.2] and [-0.02, 0.02]
  • Changed color of food and poison.
  • Made the mass of food smaller by changing its density to 0.01

Fixes # 818

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Comment on lines 139 to 140
low=np.float32(-4 * np.sqrt(2)),
high=np.float32(4 * np.sqrt(2)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what are these magic numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should be $\pm\sqrt{2}$, the max speed is defined for $v_{x}$ and $v_y$, so the max magnitude for the speed $v = [v_x, v_y]$ would be $\sqrt{v_x^2 + v_y^2} = \sqrt{2}v_\mathrm{max}$

Copy link
Member

@jjshoots jjshoots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@WillDudley
Copy link
Contributor

lgtm :) thanks for this

@WillDudley WillDudley merged commit a223e49 into Farama-Foundation:master Oct 23, 2022
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

Successfully merging this pull request may close these issues.

3 participants