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

Add Normalization into Solo 8 Base Environment #47

Merged
merged 7 commits into from
Mar 10, 2021
Merged

Conversation

goobta
Copy link
Member

@goobta goobta commented Feb 8, 2021

The observation factory and the base RL class have been modified so that the respective spaces are valued in [-1, 1]

@goobta goobta added the new feature New feature or request label Feb 8, 2021
@coveralls
Copy link

coveralls commented Feb 8, 2021

Pull Request Test Coverage Report for Build 630006467

  • 67 of 67 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 97.664%

Totals Coverage Status
Change from base Build 541483350: 0.2%
Covered Lines: 1087
Relevant Lines: 1113

💛 - Coveralls

Copy link
Contributor

@mahajanrevant mahajanrevant left a comment

Choose a reason for hiding this comment

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

Minor 2 comments. Feel free to ignore them and I can merge it in without them

a = np.array(values)
low = obs.observation_space.low
hi = obs.observation_space.high
values = (2 * (a - low)) / (hi - low) - 1
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a minor comment but add an extra parenthesis for clarity?
values = ((2 * (a - low)) / (hi - low)) - 1

Copy link
Member Author

Choose a reason for hiding this comment

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

done

a = np.array(action)
low = self._action_space.low
hi = self._action_space.high
action = low + ((a + 1) * (hi - low)) / 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about parenthesis to make it easier to read

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@goobta
Copy link
Member Author

goobta commented Mar 7, 2021

All comments should be addressed.

Copy link
Contributor

@mahajanrevant mahajanrevant left a comment

Choose a reason for hiding this comment

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

LGTM

@goobta goobta merged commit 0b1270f into master Mar 10, 2021
@goobta goobta deleted the goobta-normalization branch March 11, 2021 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants