|
|
|
|
|
|
for the correct number of agents and ensures the type. |
|
|
|
""" |
|
|
|
_expected_shape = (n_agents, self.continuous_size) |
|
|
|
if actions.continuous.shape != _expected_shape: |
|
|
|
if self.continuous_size > 0 and actions.continuous.shape != _expected_shape: |
|
|
|
raise UnityActionException( |
|
|
|
f"The behavior {name} needs a continuous input of dimension " |
|
|
|
f"{_expected_shape} for (<number of agents>, <action size>) but " |
|
|
|
|
|
|
if actions.discrete.shape != _expected_shape: |
|
|
|
if self.discrete_size > 0 and actions.discrete.shape != _expected_shape: |
|
|
|
raise UnityActionException( |
|
|
|
f"The behavior {name} needs a discrete input of dimension " |
|
|
|
f"{_expected_shape} for (<number of agents>, <action size>) but " |
|
|
|