-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Replaced get_behavior_names and get_behavior_spec with behavior_specs property #3946
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
Conversation
Making it a property is much cleaner. Just curious as to the reason for creating |
Using Mapping allows me to have this property be read only. |
Mapping is read-only (as opposed to MutableMapping), so using Mapping as the return type should be sufficient and you could just return |
Would you recommend dropping the |
I think BehaviorMapping is overkill, but I'm not strongly opposed to it. I think having |
gym-unity/gym_unity/envs/__init__.py
Outdated
@@ -49,7 +49,7 @@ def __init__( | |||
self._env = unity_env | |||
|
|||
# Take a single step so that the brain information will be sent over | |||
if not self._env.get_behavior_names(): | |||
if len(self._env.behavior_specs) == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: pretty sure you can do if not self._env.behavior_specs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Any documentation/examples that need to change too?
Yes, coming soon |
Co-authored-by: Chris Elion <[email protected]>
@chriselion Made the documentation changes. |
Proposed change(s)
Replaced get_behavior_names and get_behavior_spec with behavior_specs property
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments