unreal.LearningAgentsObservations

class unreal.LearningAgentsObservations(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Learning Agents Observations

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgents

  • File: LearningAgentsObservations.h

classmethod find_enum_by_name(name) Enum

Find an Enum type by Name. This can be used to find Enum types defined in C++. This call can be expensive so the result should be cached.

Parameters:

name (str) –

Return type:

Enum

classmethod get_angle_observation(object, element, relative_angle=0.000000, tag='AngleObservation') float or None

Get Angle Observation

Parameters:
Returns:

out_angle (float):

Return type:

float or None

classmethod get_angle_observation_radians(object, element, relative_angle=0.000000, tag='AngleObservation') float or None

Get Angle Observation Radians

Parameters:
Returns:

out_angle (float):

Return type:

float or None

classmethod get_array_observation(object, element, max_num, tag='ArrayObservation') Array[LearningAgentsObservationObjectElement] or None

Get Array Observation

Parameters:
Returns:

out_elements (Array[LearningAgentsObservationObjectElement]):

Return type:

Array[LearningAgentsObservationObjectElement] or None

classmethod get_array_observation_num(object, element, tag='ArrayObservation') int32 or None

Get Array Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_bitmask_observation(object, element, enum, tag='BitmaskObservation') int32 or None

Get Bitmask Observation

Parameters:
Returns:

out_bitmask_value (int32):

Return type:

int32 or None

classmethod get_bool_observation(object, element, tag='BoolObservation') bool or None

Get Bool Observation

Parameters:
Returns:

out_value (bool):

Return type:

bool or None

classmethod get_continuous_observation(object, element, tag='ContinuousObservation') Array[float] or None

Get Continuous Observation

Parameters:
Returns:

out_values (Array[float]):

Return type:

Array[float] or None

classmethod get_continuous_observation_num(object, element, tag='ContinuousObservation') int32 or None

Get Continuous Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_count_observation(object, element, max_num, tag='CountObservation') int32 or None

Get Count Observation

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_direction_along_spline_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionAlongSplineObservation') Vector or None

Get Direction Along Spline Observation

Parameters:
Returns:

out_direction (Vector):

Return type:

Vector or None

classmethod get_direction_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionObservation') Vector or None

Get Direction Observation

Parameters:
Returns:

out_direction (Vector):

Return type:

Vector or None

classmethod get_either_observation(object, element, tag='EitherObservation') (out_either=LearningAgentsEitherObservation, out_element=LearningAgentsObservationObjectElement) or None

Get Either Observation

Parameters:
Returns:

out_either (LearningAgentsEitherObservation):

out_element (LearningAgentsObservationObjectElement):

Return type:

tuple or None

classmethod get_encoding_observation(object, element, tag='EncodingObservation') LearningAgentsObservationObjectElement or None

Get Encoding Observation

Parameters:
Returns:

out_element (LearningAgentsObservationObjectElement):

Return type:

LearningAgentsObservationObjectElement or None

classmethod get_enum_observation(object, element, enum, tag='EnumObservation') uint8 or None

Get Enum Observation

Parameters:
Returns:

out_enum_value (uint8):

Return type:

uint8 or None

classmethod get_exclusive_discrete_observation(object, element, tag='ExclusiveDiscreteObservation') int32 or None

Get Exclusive Discrete Observation

Parameters:
Returns:

out_index (int32):

Return type:

int32 or None

classmethod get_exclusive_union_observation(object, element, tag='ExclusiveUnionObservation') (out_element_name=Name, out_element=LearningAgentsObservationObjectElement) or None

Get Exclusive Union Observation

Parameters:
Returns:

out_element_name (Name):

out_element (LearningAgentsObservationObjectElement):

Return type:

tuple or None

classmethod get_float_observation(object, element, float_scale=1.000000, tag='FloatObservation') float or None

Get Float Observation

Parameters:
Returns:

out_value (float):

Return type:

float or None

classmethod get_inclusive_discrete_observation(object, element, tag='InclusiveDiscreteObservation') Array[int32] or None

Get Inclusive Discrete Observation

Parameters:
Returns:

out_indices (Array[int32]):

Return type:

Array[int32] or None

classmethod get_inclusive_discrete_observation_num(object, element, tag='InclusiveDiscreteObservation') int32 or None

Get Inclusive Discrete Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_inclusive_union_observation(object, element, tag='InclusiveUnionObservation') Map[Name, LearningAgentsObservationObjectElement] or None

Get Inclusive Union Observation

Parameters:
Returns:

out_elements (Map[Name, LearningAgentsObservationObjectElement]):

Return type:

Map[Name, LearningAgentsObservationObjectElement] or None

classmethod get_inclusive_union_observation_num(object, element, tag='InclusiveUnionObservation') int32 or None

Get Inclusive Union Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_inclusive_union_observation_to_arrays(object, element, tag='InclusiveUnionObservation') (out_element_names=Array[Name], out_elements=Array[LearningAgentsObservationObjectElement]) or None

Get Inclusive Union Observation to Arrays

Parameters:
Returns:

out_element_names (Array[Name]):

out_elements (Array[LearningAgentsObservationObjectElement]):

Return type:

tuple or None

classmethod get_location_along_spline_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='LocationAlongSplineObservation') Vector or None

Get Spline Observations

Parameters:
Returns:

out_location (Vector):

Return type:

Vector or None

classmethod get_location_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='LocationObservation') Vector or None

Get Location Observation

Parameters:
Returns:

out_location (Vector):

Return type:

Vector or None

classmethod get_map_observation(object, element, tag='MapObservation') Map[LearningAgentsObservationObjectElement, LearningAgentsObservationObjectElement] or None

Get Map Observation

Parameters:
Returns:

out_elements (Map[LearningAgentsObservationObjectElement, LearningAgentsObservationObjectElement]):

Return type:

Map[LearningAgentsObservationObjectElement, LearningAgentsObservationObjectElement] or None

classmethod get_map_observation_num(object, element, tag='MapObservation') int32 or None

Get Map Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_map_observation_to_arrays(object, element, tag='MapObservation') (out_keys=Array[LearningAgentsObservationObjectElement], out_values=Array[LearningAgentsObservationObjectElement]) or None

Get Map Observation to Arrays

Parameters:
Returns:

out_keys (Array[LearningAgentsObservationObjectElement]):

out_values (Array[LearningAgentsObservationObjectElement]):

Return type:

tuple or None

classmethod get_null_observation(object, element, tag='NullObservation') bool

Get Basic Observations

Parameters:
Return type:

bool

classmethod get_optional_observation(object, element, tag='OptionalObservation') (out_option=LearningAgentsOptionalObservation, out_element=LearningAgentsObservationObjectElement) or None

Get Optional Observation

Parameters:
Returns:

out_option (LearningAgentsOptionalObservation):

out_element (LearningAgentsObservationObjectElement):

Return type:

tuple or None

classmethod get_pair_observation(object, element, tag='PairObservation') (out_key=LearningAgentsObservationObjectElement, out_value=LearningAgentsObservationObjectElement) or None

Get Pair Observation

Parameters:
Returns:

out_key (LearningAgentsObservationObjectElement):

out_value (LearningAgentsObservationObjectElement):

Return type:

tuple or None

classmethod get_proportion_along_ray_observation(object, element, tag='ProportionAlongRayObservation') float or None

Get Ray Cast Observations

Parameters:
Returns:

out_proportion (float):

Return type:

float or None

classmethod get_proportion_along_spline_observation(object, element, tag='ProportionAlongSplineObservation') (out_is_closed_loop=bool, out_angle=float, out_propotion=float) or None

Get Proportion Along Spline Observation

Parameters:
Returns:

out_is_closed_loop (bool):

out_angle (float):

out_propotion (float):

Return type:

tuple or None

classmethod get_rotation_observation(object, element, relative_rotation=[0.000000, 0.000000, 0.000000], tag='RotationObservation') Rotator or None

Get Rotation Observation

Parameters:
Returns:

out_rotation (Rotator):

Return type:

Rotator or None

classmethod get_rotation_observation_as_quat(object, element, relative_rotation, tag='RotationObservation') Quat or None

Get Rotation Observation as Quat

Parameters:
Returns:

out_rotation (Quat):

Return type:

Quat or None

classmethod get_scale_observation(object, element, relative_scale=[1.000000, 1.000000, 1.000000], tag='ScaleObservation') Vector or None

Get Scale Observation

Parameters:
Returns:

out_scale (Vector):

Return type:

Vector or None

classmethod get_set_observation(object, element, tag='SetObservation') Set[LearningAgentsObservationObjectElement] or None

Get Set Observation

Parameters:
Returns:

out_elements (Set[LearningAgentsObservationObjectElement]):

Return type:

Set[LearningAgentsObservationObjectElement] or None

classmethod get_set_observation_num(object, element, tag='SetObservation') int32 or None

Get Set Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_set_observation_to_array(object, element, tag='SetObservation') Array[LearningAgentsObservationObjectElement] or None

Get Set Observation to Array

Parameters:
Returns:

out_elements (Array[LearningAgentsObservationObjectElement]):

Return type:

Array[LearningAgentsObservationObjectElement] or None

classmethod get_static_array_observation(object, element, tag='StaticArrayObservation') Array[LearningAgentsObservationObjectElement] or None

Get Static Array Observation

Parameters:
Returns:

out_elements (Array[LearningAgentsObservationObjectElement]):

Return type:

Array[LearningAgentsObservationObjectElement] or None

classmethod get_static_array_observation_num(object, element, tag='StaticArrayObservation') int32 or None

Get Static Array Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_struct_observation(object, element, tag='StructObservation') Map[Name, LearningAgentsObservationObjectElement] or None

Get Struct Observation

Parameters:
Returns:

out_elements (Map[Name, LearningAgentsObservationObjectElement]):

Return type:

Map[Name, LearningAgentsObservationObjectElement] or None

classmethod get_struct_observation_num(object, element, tag='StructObservation') int32 or None

Get Struct Observation Num

Parameters:
Returns:

out_num (int32):

Return type:

int32 or None

classmethod get_struct_observation_to_arrays(object, element, tag='StructObservation') (out_element_names=Array[Name], out_elements=Array[LearningAgentsObservationObjectElement]) or None

Get Struct Observation to Arrays

Parameters:
Returns:

out_element_names (Array[Name]):

out_elements (Array[LearningAgentsObservationObjectElement]):

Return type:

tuple or None

classmethod get_transform_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='TransformObservation') Transform or None

Get Transform Observation

Parameters:
Returns:

out_transform (Transform):

Return type:

Transform or None

classmethod get_velocity_observation(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], velocity_scale=200.000000, tag='VelocityObservation') Vector or None

Get Velocity Observation

Parameters:
Returns:

out_velocity (Vector):

Return type:

Vector or None

classmethod log_observation(object, element) None

Logs an Observation Object Element. Useful for debugging.

Parameters:
classmethod make_angle_observation(object, angle, relative_angle=0.000000, tag='AngleObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new angle observation. Angles should be given in degrees.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • angle (float) – The angle of interest to the agent.

  • relative_angle (float) – The angle the provided angle should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_angle_observation_radians(object, angle, relative_angle=0.000000, tag='AngleObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new angle observation. Angles should be given in radians.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • angle (float) – The angle of interest to the agent.

  • relative_angle (float) – The angle the provided angle should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_array_observation(object, elements, max_num, tag='ArrayObservation') LearningAgentsObservationObjectElement

Make a new array observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • elements (Array[LearningAgentsObservationObjectElement]) – The sub-observations. The number of elements here must be less than or equal to the maximum that was given during Specify.

  • max_num (int32) – The maximum number of elements possible for this observation. Must match what was given during Specify.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_bitmask_observation(object, enum, bitmask_value, tag='BitmaskObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new bitmask observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • enum (Enum) – The enum type for this observation. Must match what was given during Specify.

  • bitmask_value (int32) – The bitmask value.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_bool_observation(object, value, tag='BoolObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new bool observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • value (bool) –

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_continuous_observation(object, values, tag='ContinuousObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new continuous observation. The size of Values must match the Size given during Specify.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • values (Array[float]) – The observation values.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_count_observation(object, num, max_num, tag='CountObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new count observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • num (int32) – The number of items. Must be less than or equal to MaxNum.

  • max_num (int32) – The maximum number of items possible.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_direction_along_spline_observation(object, spline_component, distance_along_spline, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionAlongSplineObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_arrow_length=100.000000, visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new direction along spline observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • spline_component (SplineComponent) – The spline to observe.

  • distance_along_spline (float) – The distance along that spline.

  • relative_transform (Transform) – The transform the provided direction should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_arrow_length (float) – The length of the arrow to display to represent the direction.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_direction_observation(object, direction, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_direction_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_arrow_length=100.000000, visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new direction observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • direction (Vector) – The direction of interest to the agent.

  • relative_transform (Transform) – The transform the provided direction should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_direction_location (Vector) – A location for the visual logger to display the direction in the world.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_arrow_length (float) – The length of the arrow to display to represent the direction.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_either_a_observation(object, a, tag='EitherObservation') LearningAgentsObservationObjectElement

Make a new either A observation. Use this to provide option A.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_either_b_observation(object, b, tag='EitherObservation') LearningAgentsObservationObjectElement

Make a new either B observation. Use this to provide option B.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_either_observation(object, element, either, tag='EitherObservation') LearningAgentsObservationObjectElement

Make a new either observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_encoding_observation(object, element, tag='EncodingObservation') LearningAgentsObservationObjectElement

Make a new encoding observation. This must be used in conjunction with SpecifyEncodingObservation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_enum_observation(object, enum, enum_value, tag='EnumObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new enum observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • enum (Enum) – The enum type for this observation. Must match what was given during Specify.

  • enum_value (uint8) – The enum value.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_exclusive_discrete_observation(object, discrete_index, size, tag='ExclusiveDiscreteObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new exclusive discrete observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • discrete_index (int32) – The index of the discrete observation. Values must be smaller than the given Size.

  • size (int32) – The size of the discrete observation. Must be equal to the size given during Specify.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_exclusive_union_observation(object, element_name, element, tag='ExclusiveUnionObservation') LearningAgentsObservationObjectElement

Make a new exclusive union observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_float_observation(object, value, float_scale=1.000000, tag='FloatObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new float observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • value (float) – The new value of this observation.

  • float_scale (float) – Used to normalize the data for this observation.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_inclusive_discrete_observation(object, discrete_indices, size, tag='InclusiveDiscreteObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new inclusive discrete observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • discrete_indices (Array[int32]) – The indices of the discrete observations. All values must be smaller than the given Size.

  • size (int32) – The size of the discrete observation. Must be equal to the size given during Specify.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_inclusive_union_observation(object, elements, tag='InclusiveUnionObservation') LearningAgentsObservationObjectElement

Make a new inclusive union observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_inclusive_union_observation_from_arrays(object, element_names, elements, tag='InclusiveUnionObservation') LearningAgentsObservationObjectElement

Make a new inclusive union observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_location_along_spline_observation(object, spline_component, distance_along_spline, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='LocationAlongSplineObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new location along spline observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • spline_component (SplineComponent) – The spline to observe.

  • distance_along_spline (float) – The distance along that spline.

  • relative_transform (Transform) – The transform the provided location should be encoded relative to.

  • location_scale (float) – Used to normalize the transform’s location for this observation.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_location_observation(object, location, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='LocationObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new location observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • location (Vector) – The location of interest to the agent.

  • relative_transform (Transform) – The transform the provided location should be encoded relative to.

  • location_scale (float) – Used to normalize the data for this observation.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_map_observation(object, map, tag='MapObservation') LearningAgentsObservationObjectElement

Make a new map observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_map_observation_from_arrays(object, keys, values, tag='MapObservation') LearningAgentsObservationObjectElement

Make a new map observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_null_observation(object, tag='NullObservation') LearningAgentsObservationObjectElement

Make a new null observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_optional_null_observation(object, tag='OptionalObservation') LearningAgentsObservationObjectElement

Make a new null optional observation. Use this to provide a null optional observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_optional_observation(object, element, option, tag='OptionalObservation') LearningAgentsObservationObjectElement

Make a new optional observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_optional_valid_observation(object, element, tag='OptionalObservation') LearningAgentsObservationObjectElement

Make a new valid optional observation. Use this to provide a valid optional observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_pair_observation(object, key, value, tag='PairObservation') LearningAgentsObservationObjectElement

Make a new pair observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_proportion_along_ray_observation(object, ray_start, ray_end, ray_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], collision_channel=CollisionChannel.ECC_WORLD_STATIC, tag='ProportionAlongRayObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new proportion along ray observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • ray_start (Vector) – The local ray start location.

  • ray_end (Vector) – The local ray end location.

  • ray_transform (Transform) – The transform to use to transform the local ray starts and ends into the world space.

  • collision_channel (CollisionChannel) – The collision channel to collide against.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_proportion_along_spline_observation(object, spline_component, distance_along_spline, tag='ProportionAlongSplineObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new proportion along spline observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • spline_component (SplineComponent) – The spline to observe.

  • distance_along_spline (float) – The distance along that spline.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_rotation_observation(object, rotation, relative_rotation=[0.000000, 0.000000, 0.000000], tag='RotationObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_rotation_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new rotation observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • rotation (Rotator) – The rotation of interest to the agent.

  • relative_rotation (Rotator) – The rotation the provided rotation should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_rotation_location (Vector) – A location for the visual logger to display the rotation in the world.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_rotation_observation_from_quat(object, rotation, relative_rotation, tag='RotationObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_rotation_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new rotation observation from a quaternion.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • rotation (Quat) – The rotation of interest to the agent.

  • relative_rotation (Quat) – The rotation the provided rotation should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_rotation_location (Vector) – A location for the visual logger to display the rotation in the world.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_scale_observation(object, scale, relative_scale=[1.000000, 1.000000, 1.000000], tag='ScaleObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_scale_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new scale observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • scale (Vector) – The scale of interest to the agent.

  • relative_scale (Vector) – The scale the provided scale should be encoded relative to.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_scale_location (Vector) – A location for the visual logger to display the scale in the world.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_set_observation(object, elements, tag='SetObservation') LearningAgentsObservationObjectElement

Make a new set observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_set_observation_from_array(object, elements, tag='SetObservation') LearningAgentsObservationObjectElement

Make a new set observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_static_array_observation(object, elements, tag='StaticArrayObservation') LearningAgentsObservationObjectElement

Make a new static array observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_struct_observation(object, elements, tag='StructObservation') LearningAgentsObservationObjectElement

Make a new struct observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_struct_observation_from_arrays(object, element_names, elements, tag='StructObservation') LearningAgentsObservationObjectElement

Make a new struct observation.

Parameters:
Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_transform_observation(object, transform, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], location_scale=100.000000, tag='TransformObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new transform observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • transform (Transform) – The transform of interest to the agent.

  • relative_transform (Transform) – The transform the provided transform should be encoded relative to.

  • location_scale (float) – Used to normalize the transform’s location for this observation.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod make_velocity_observation(object, velocity, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], velocity_scale=200.000000, tag='VelocityObservation', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_velocity_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[1.000000, 0.000000, 0.000000, 1.000000]) LearningAgentsObservationObjectElement

Make a new velocity observation.

Parameters:
  • object (LearningAgentsObservationObject) – The Observation Object

  • velocity (Vector) – The velocity of interest to the agent.

  • relative_transform (Transform) – The transform the provided velocity should be encoded relative to.

  • velocity_scale (float) – Used to normalize the data for this observation.

  • tag (Name) – The tag of the corresponding observation. Must match the tag given during Specify.

  • visual_logger_enabled (bool) – When true, debug data will be sent to the visual logger.

  • visual_logger_listener (LearningAgentsManagerListener) – The listener object which is making this observation. This must be set to use logging.

  • visual_logger_agent_id (int32) – The agent id associated with this observation.

  • visual_logger_velocity_location (Vector) – A location for the visual logger to display the velocity in the world.

  • visual_logger_location (Vector) – A location for the visual logger information in the world.

  • visual_logger_color (LinearColor) – The color for the visual logger display.

Returns:

The newly created observation object element.

Return type:

LearningAgentsObservationObjectElement

classmethod project_transform_onto_ground_plane(transform, local_forward_vector=[1.000000, 0.000000, 0.000000], ground_plane_height=0.000000) Transform

Project a transform onto the ground plane, leaving just rotation around the vertical axis

Parameters:
Return type:

Transform

classmethod specify_angle_observation(schema, tag='AngleObservation') LearningAgentsObservationSchemaElement

Specifies a new angle observation. This will be encoded as a 2-dimension Cartesian vector so that 0 and 350 are close to each other in the encoded space.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_array_observation(schema, element, max_num, attention_encoding_size=32, attention_head_num=4, value_encoding_size=32, tag='ArrayObservation') LearningAgentsObservationSchemaElement

Specifies a new array observation. This represents an observation made up of an Array of some other observation. This Array can be variable in size (up to some fixed maximum size) and the order of elements is taken into consideration. Internally this observation uses Attention so can be slower to evaluate and more difficult to train than other observation types. For this reason it should be used sparingly.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • element (LearningAgentsObservationSchemaElement) – The sub-observation that represents elements of this array.

  • max_num (int32) – The maximum number of elements that can be included in the array.

  • attention_encoding_size (int32) – The encoding size used by the attention mechanism.

  • attention_head_num (int32) – The number of heads used by the attention mechanism.

  • value_encoding_size (int32) – The output encoding size used by the attention mechanism.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_bitmask_observation(schema, enum, tag='BitmaskObservation') LearningAgentsObservationSchemaElement

Specifies a new bitmask observation. This represents an inclusive choice from elements of the given Enum. To use this with an Enum defined in C++ use the FindEnumByName convenience function.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_bool_observation(schema, tag='BoolObservation') LearningAgentsObservationSchemaElement

Specifies a new bool observation. A true or false observation.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_continuous_observation(schema, size, tag='ContinuousObservation') LearningAgentsObservationSchemaElement

Specifies a new continuous observation. This represents an observation made up of several float values.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • size (int32) – The number of float values in the observation.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_count_observation(schema, tag='CountObservation') LearningAgentsObservationSchemaElement

Specifies a new count observation. This represents a count of something such as the size of, or index into, an array.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_direction_along_spline_observation(schema, tag='DirectionAlongSplineObservation') LearningAgentsObservationSchemaElement

Specifies a new direction along spline observation. This observes the direction of the spline at the given distance along that spline.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_direction_observation(schema, tag='DirectionObservation') LearningAgentsObservationSchemaElement

Specifies a new direction observation. Allows an agent to observe the direction of some entity.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_either_observation(schema, a, b, encoding_size=128, tag='EitherObservation') LearningAgentsObservationSchemaElement

Specifies a new either observation. This represents an observation which will be either sub-observation A or sub-observation B.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_encoding_observation(schema, element, encoding_size=128, hidden_layer_num=1, activation_function=LearningAgentsActivationFunction.ELU, tag='EncodingObservation') LearningAgentsObservationSchemaElement

Specifies a new encoding observation. This represents an observation which will be an encoding of another sub-observation using a small neural network.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_enum_observation(schema, enum, tag='EnumObservation') LearningAgentsObservationSchemaElement

Specifies a new enum observation. This represents an exclusive choice from elements of the given Enum. To use this with an Enum defined in C++ use the FindEnumByName convenience function.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_exclusive_discrete_observation(schema, size, tag='ExclusiveDiscreteObservation') LearningAgentsObservationSchemaElement

Specifies a new exclusive discrete observation. This represents a discrete observation which is an exclusive selection from multiple choices.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • size (int32) – The number of discrete options in the observation.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_exclusive_union_observation(schema, elements, encoding_size=128, tag='ExclusiveUnionObservation') LearningAgentsObservationSchemaElement

Specifies a new exclusive union observation. This represents an observation which is exclusively chosen from a set of named sub-observations. In other words, when this observation is created, you only need to provide one observation from the given sub-observations.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_exclusive_union_observation_from_arrays(schema, element_names, elements, encoding_size=128, tag='ExclusiveUnionObservation') LearningAgentsObservationSchemaElement

Specifies a new exclusive union observation. This represents an observation which is exclusively chosen from a set of named sub-observations. In other words, when this observation is created, you only need to provide one observation from the given sub-observations.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • element_names (Array[Name]) – The names of the sub-observations that make up this union.

  • elements (Array[LearningAgentsObservationSchemaElement]) – The corresponding sub-observations that make up this union. Must be the same size as ElementNames.

  • encoding_size (int32) – The encoding size used to encode each sub-observation.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_float_observation(schema, tag='FloatObservation') LearningAgentsObservationSchemaElement

Specifies a new float observation. A simple observation which can be used as a catch-all for situations where a type-specific observation does not exist.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_inclusive_discrete_observation(schema, size, tag='InclusiveDiscreteObservation') LearningAgentsObservationSchemaElement

Specifies a new inclusive discrete observation. This represents a discrete observation which is an inclusive selection from multiple choices.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • size (int32) – The number of discrete options in the observation.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_inclusive_union_observation(schema, elements, attention_encoding_size=32, attention_head_num=4, value_encoding_size=32, tag='InclusiveUnionObservation') LearningAgentsObservationSchemaElement

Specifies a new inclusive union observation. This represents an observation which is inclusively chosen from a set of named sub-observations. In other words, when this observation is created, you can provide any combination of observations from the given sub-observations. Internally this observation uses Attention so can be slower to evaluate and more difficult to train than other observation types. For this reason it should be used sparingly.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • elements (Map[Name, LearningAgentsObservationSchemaElement]) – The sub-observations that make up this union.

  • attention_encoding_size (int32) – The encoding size used by the attention mechanism.

  • attention_head_num (int32) – The number of heads used by the attention mechanism.

  • value_encoding_size (int32) – The output encoding size used by the attention mechanism.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_inclusive_union_observation_from_arrays(schema, element_names, elements, attention_encoding_size=32, attention_head_num=4, value_encoding_size=32, tag='InclusiveUnionObservation') LearningAgentsObservationSchemaElement

Specifies a new inclusive union observation. This represents an observation which is inclusively chosen from a set of named sub-observations. In other words, when this observation is created, you can provide any combination of observations from the given sub-observations. Internally this observation uses Attention so can be slower to evaluate and more difficult to train than other observation types. For this reason it should be used sparingly.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • element_names (Array[Name]) – The names of the sub-observations that make up this union.

  • elements (Array[LearningAgentsObservationSchemaElement]) – The corresponding sub-observations that make up this union. Must be the same size as ElementNames.

  • attention_encoding_size (int32) – The encoding size used by the attention mechanism.

  • attention_head_num (int32) – The number of heads used by the attention mechanism.

  • value_encoding_size (int32) – The output encoding size used by the attention mechanism.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_location_along_spline_observation(schema, tag='LocationAlongSplineObservation') LearningAgentsObservationSchemaElement

Specifies a new location along spline observation. This observes the location of the spline at the given distance along that spline.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_location_observation(schema, tag='LocationObservation') LearningAgentsObservationSchemaElement

Specifies a new location observation. Allows an agent to observe the location of some entity.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_map_observation(schema, key_element, value_element, max_num, attention_encoding_size=32, attention_head_num=4, value_encoding_size=32, tag='MapObservation') LearningAgentsObservationSchemaElement

Specifies a new map observation. This represents an observation made up of a Map of some other key and pair observations. This Map can be variable in size (up to some fixed maximum size) and elements are considered unordered. Internally this observation uses Attention so can be slower to evaluate and more difficult to train than other observation types. For this reason it should be used sparingly.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • key_element (LearningAgentsObservationSchemaElement) – The sub-observation that represents keys in this map.

  • value_element (LearningAgentsObservationSchemaElement) – The sub-observation that represents values in this map.

  • max_num (int32) – The maximum number of elements that can be included in the map.

  • attention_encoding_size (int32) – The encoding size used by the attention mechanism.

  • attention_head_num (int32) – The number of heads used by the attention mechanism.

  • value_encoding_size (int32) – The output encoding size used by the attention mechanism.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_null_observation(schema, tag='NullObservation') LearningAgentsObservationSchemaElement

Specifies a new null observation. This represents an empty observation and can be useful when an observation is needed which has no value.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_optional_observation(schema, element, encoding_size=128, tag='OptionalObservation') LearningAgentsObservationSchemaElement

Specifies a new optional observation. This represents an observation which may or may not be provided.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_pair_observation(schema, key, value, tag='PairObservation') LearningAgentsObservationSchemaElement

Specifies a new pair observation. This represents an observation made up of two sub-observations.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_proportion_along_ray_observation(schema, tag='ProportionAlongRayObservation') LearningAgentsObservationSchemaElement

Specifies a new proportion along ray observation. This observes how far a you can travel along a ray before collision. Rays that can travel the full distance are encoded as zero, while rays that collide instantly are encoded as one.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_proportion_along_spline_observation(schema, tag='ProportionAlongSplineObservation') LearningAgentsObservationSchemaElement

Specifies a new proportion along spline observation. This observes the proportion along a spline at the given distance. For looped splines this will be treated effectively like an angle between 0 and 360 degrees and encoded appropriately so that 0 and 350 are close to each other in the encoded space, while for non-looped splines this will be treated as a value between 0 and 1.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_rotation_observation(schema, tag='RotationObservation') LearningAgentsObservationSchemaElement

Specifies a new rotation observation. Allows an agent to observe the rotation of some entity. Rotations are encoded as two columns of the rotation matrix to ensure there is no discontinuity in the encoding.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_scale_observation(schema, tag='ScaleObservation') LearningAgentsObservationSchemaElement

Specifies a new scale observation. Allows an agent to observe the scale of some entity. Negative scales are not supported by this observation type.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_set_observation(schema, element, max_num, attention_encoding_size=32, attention_head_num=4, value_encoding_size=32, tag='SetObservation') LearningAgentsObservationSchemaElement

Specifies a new set observation. This represents an observation made up of a Set of some other observation. This Set can be variable in size (up to some fixed maximum size) and elements are considered unordered. Internally this observation uses Attention so can be slower to evaluate and more difficult to train than other observation types. For this reason it should be used sparingly.

Parameters:
  • schema (LearningAgentsObservationSchema) – The Observation Schema

  • element (LearningAgentsObservationSchemaElement) – The sub-observation that represents elements of this array.

  • max_num (int32) – The maximum number of elements that can be included in the set.

  • attention_encoding_size (int32) – The encoding size used by the attention mechanism.

  • attention_head_num (int32) – The number of heads used by the attention mechanism.

  • value_encoding_size (int32) – The output encoding size used by the attention mechanism.

  • tag (Name) – The tag of this new observation. Used during observation object validation and debugging.

Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_static_array_observation(schema, element, num, tag='StaticArrayObservation') LearningAgentsObservationSchemaElement

Specifies a new static array observation. This represents an observation made up of a fixed-size array of some other observation.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_struct_observation(schema, elements, tag='StructObservation') LearningAgentsObservationSchemaElement

Specifies a new struct observation. This represents a group of named sub-observations.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_struct_observation_from_arrays(schema, element_names, elements, tag='StructObservation') LearningAgentsObservationSchemaElement

Specifies a new struct observation. This represents a group of named sub-observations.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_transform_observation(schema, tag='TransformObservation') LearningAgentsObservationSchemaElement

Specifies a new transform observation. Allows an agent to observe the transform of some entity.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod specify_velocity_observation(schema, tag='VelocityObservation') LearningAgentsObservationSchemaElement

Specifies a new velocity observation. Allows an agent to observe the velocity of some entity.

Parameters:
Returns:

The newly created observation schema element.

Return type:

LearningAgentsObservationSchemaElement

classmethod validate_observation_object_matches_schema(schema, schema_element, object, object_element) bool

Validates that the given observation object matches the schema. Will log errors on objects that don’t match.

Parameters:
Returns:

true if the object matches the schema

Return type:

bool