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

Added a stochastic action wrapper along with its test #355

Merged
merged 13 commits into from
May 31, 2023

Conversation

BolunDai0216
Copy link
Collaborator

Description

This PR adds a new wrapper that makes the action stochastic. In the wrapper, the user can specify the probability that a random action is applied, along with what kind of random action is applied (it can either be a truly random action sampled from the action space or a user-specified action).

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • 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

@pseudo-rnd-thoughts
Copy link
Member

@BolunDai0216 Why should we add this as a random action in minigrid rather than gymnasium?

@BolunDai0216
Copy link
Collaborator Author

BolunDai0216 commented May 31, 2023

@BolunDai0216 Why should we add this as a random action in minigrid rather than gymnasium?

It is to make the library more complete. Additionally, in the future, we can update the wrapper to specifically handle random action needs in Miniworld instead. If it is in gymnasium, it would need to be more general such that it is applicable to all gymnasium related libraries.

Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

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

We can include this in minigrid and move it to gymnasium later if we think that it is important

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 3a6e9cc into Farama-Foundation:master May 31, 2023
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.

2 participants