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

Created methods that return the size of different features to the user #27

Merged
merged 5 commits into from
Mar 5, 2020

Conversation

douglasrizzo
Copy link
Contributor

While reading the code to understand what the observation vector is composed of, I found the opportunity to implement methods inside the StarCraft2Env class to expose how much of the observation is composed of agent movement features, enemy features, ally features and agent features. This may help other users interpret or separate the observation vector in its smaller components, in case they deem it necessary.

The methods I created also removed redundant code in situations where the size of the observation vector was calculated in different parts of the code (e.g. inside get_obs() and get_obs_size()).

Lastly, I took the opportunity to briefly describe in the docstring what the observation vector is composed of.

@douglasrizzo
Copy link
Contributor Author

I forgot to mention I have made a few assertion tests to make sure the new methods return the same values that were provided by SMAC before my changes. I also installed my version of the package and ran the random agent with success.

@samvelyan
Copy link
Collaborator

Thanks for the contribution @douglasrizzo. I'll take a close look and merge changes.

@samvelyan samvelyan self-assigned this Mar 3, 2020
@samvelyan samvelyan merged commit ea59bed into oxwhirl:master Mar 5, 2020
@douglasrizzo douglasrizzo deleted the feature-sizes branch July 29, 2020 17:54
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