Skip to content

API for sending custom protobuf messages to and from Unity. #1595

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

Merged
merged 18 commits into from
Mar 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename custom_output to custom_outputs.
  • Loading branch information
malmaud committed Mar 27, 2019
commit 17b680c6718196c84ec08a925d369fd556c64777
6 changes: 3 additions & 3 deletions ml-agents/mlagents/envs/brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class BrainInfo:
def __init__(self, visual_observation, vector_observation, text_observations, memory=None,
reward=None, agents=None, local_done=None,
vector_action=None, text_action=None, max_reached=None, action_mask=None, custom_output=None):
vector_action=None, text_action=None, max_reached=None, action_mask=None, custom_outputs=None):
"""
Describes experience at current step of all agents linked to a brain.
"""
Expand All @@ -26,7 +26,7 @@ def __init__(self, visual_observation, vector_observation, text_observations, me
self.previous_vector_actions = vector_action
self.previous_text_actions = text_action
self.action_masks = action_mask
self.custom_output = custom_output
self.custom_outputs = custom_outputs

@staticmethod
def process_pixels(image_bytes, gray_scale):
Expand Down Expand Up @@ -88,7 +88,7 @@ def from_agent_proto(agent_info_list, brain_params):
vector_action=np.array([x.stored_vector_actions for x in agent_info_list]),
text_action=[x.stored_text_actions for x in agent_info_list],
max_reached=[x.max_step_reached for x in agent_info_list],
custom_output=[x.custom_output for x in agent_info_list],
custom_outputs=[x.custom_output for x in agent_info_list],
action_mask=mask_actions
)
return brain_info
Expand Down