|
|
|
|
|
|
BehaviorSpec, |
|
|
|
DecisionSteps, |
|
|
|
TerminalSteps, |
|
|
|
SensorType, |
|
|
|
) |
|
|
|
from mlagents_envs.exception import UnityObservationException |
|
|
|
from mlagents_envs.timers import hierarchical_timer, timed |
|
|
|
|
|
|
tuple(DimensionProperty(dim) for dim in obs.dimension_properties) |
|
|
|
for obs in agent_info.observations |
|
|
|
] |
|
|
|
sensor_types = [obs.sensor_type for obs in agent_info.observations] |
|
|
|
sensor_types = [SensorType(obs.sensor_type) for obs in agent_info.observations] |
|
|
|
for obs_shape, dim_p, sensor_type in zip(observation_shape, dim_props, sensor_types) |
|
|
|
for obs_shape, dim_p, sensor_type in zip( |
|
|
|
observation_shape, dim_props, sensor_types |
|
|
|
) |
|
|
|
] |
|
|
|
# proto from communicator < v1.3 does not set action spec, use deprecated fields instead |
|
|
|
if ( |
|
|
|