unreal.LearningAgentsActions
¶
- class unreal.LearningAgentsActions(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Learning Agents Actions
C++ Source:
Plugin: LearningAgents
Module: LearningAgents
File: LearningAgentsActions.h
- classmethod get_angle_action(object, element, relative_angle=0.000000, angle_scale=90.000000, tag='AngleAction', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_angle_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[0.000000, 0.000000, 1.000000, 1.000000]) float or None ¶
Get the value for an angle action. Returned angle is in degrees.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_angle (float) – The relative angle to transform the angle by.
angle_scale (float) – The scale used to control the overall magnitude of the outputted scale action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
visual_logger_angle_location (Vector) – A location for the visual logger to display the angle 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:
true if the provided Element is the correct type, otherwise false.
out_angle (float): The output angle value.
- Return type:
float or None
- classmethod get_angle_action_radians(object, element, relative_angle=0.000000, angle_scale=1.570796, tag='AngleAction', visual_logger_enabled=False, visual_logger_listener=None, visual_logger_agent_id=-1, visual_logger_angle_location=[0.000000, 0.000000, 0.000000], visual_logger_location=[0.000000, 0.000000, 0.000000], visual_logger_color=[0.000000, 0.000000, 1.000000, 1.000000]) float or None ¶
Get the value for an angle action. Returned angle is in radians.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_angle (float) – The relative angle to transform the angle by.
angle_scale (float) – The scale used to control the overall magnitude of the outputted scale action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
visual_logger_angle_location (Vector) – A location for the visual logger to display the angle 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:
true if the provided Element is the correct type, otherwise false.
out_angle (float): The output angle value.
- Return type:
float or None
- classmethod get_bitmask_action(object, element, enum, tag='BitmaskAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) int32 or None ¶
Get the bitmask value of a bitmask action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
enum (Enum) – The Enum
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_bitmask_value (int32): The output bitmask value.
- Return type:
int32 or None
- classmethod get_bool_action(object, element, tag='BoolAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) bool or None ¶
Get the value for a bool action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_value (bool): The output bool value.
- Return type:
bool or None
- classmethod get_continuous_action(object, element, tag='ContinuousAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Array[float] or None ¶
Get the values of a continuous action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_values (Array[float]): The output values.
- Return type:
- classmethod get_continuous_action_num(object, element, tag='ContinuousAction') int32 or None ¶
Get the number of values in a continuous action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_num (int32): The output number of values.
- Return type:
int32 or None
- classmethod get_direction_action(object, element, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Vector or None ¶
Get the value for a direction action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_transform (Transform) – The relative transform to transform the direction by.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_direction (Vector): The output direction value.
- Return type:
Vector or None
- classmethod get_either_action(object, element, tag='EitherAction') (out_either=LearningAgentsEitherAction, out_element=LearningAgentsActionObjectElement) or None ¶
Get the sub-action of an either action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_either (LearningAgentsEitherAction): The output either specifier.
out_element (LearningAgentsActionObjectElement): The output sub-action.
- Return type:
tuple or None
- classmethod get_encoding_action(object, element, tag='EncodingAction') LearningAgentsActionObjectElement or None ¶
Get the sub-action of an encoding action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_element (LearningAgentsActionObjectElement): The output sub-action.
- Return type:
- classmethod get_enum_action(object, element, enum, tag='EnumAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) uint8 or None ¶
Get the enum value of an enum action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
enum (Enum) – The Enum
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_enum_value (uint8): The output enum value.
- Return type:
uint8 or None
- classmethod get_exclusive_discrete_action(object, element, tag='DiscreteExclusiveAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) int32 or None ¶
Get the index for an exclusive discrete action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_index (int32): The output index.
- Return type:
int32 or None
- classmethod get_exclusive_union_action(object, element, tag='ExclusiveUnionAction') (out_element_name=Name, out_element=LearningAgentsActionObjectElement) or None ¶
Get the chosen sub-action for an exclusive union action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_element_name (Name):
out_element (LearningAgentsActionObjectElement): The output sub-action.
- Return type:
tuple or None
- classmethod get_float_action(object, element, float_scale=1.000000, tag='FloatAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) float or None ¶
Get the value for a float action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
float_scale (float) – The scale used to control the overall magnitude of the outputted float action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_value (float): The output float value.
- Return type:
float or None
- classmethod get_inclusive_discrete_action(object, element, tag='DiscreteInclusiveAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Array[int32] or None ¶
Get the indices for an inclusive discrete action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_indices (Array[int32]): The output indices.
- Return type:
Array[int32] or None
- classmethod get_inclusive_discrete_action_num(object, element, tag='DiscreteInclusiveAction') int32 or None ¶
Get the number of indices for an inclusive discrete action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_num (int32): The output number of indices.
- Return type:
int32 or None
- classmethod get_inclusive_union_action(object, element, tag='InclusiveUnionAction') Map[Name, LearningAgentsActionObjectElement] or None ¶
Get the chosen sub-actions for an inclusive union action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_elements (Map[Name, LearningAgentsActionObjectElement]): The output sub-actions.
- Return type:
Map[Name, LearningAgentsActionObjectElement] or None
- classmethod get_inclusive_union_action_num(object, element, tag='InclusiveUnionAction') int32 or None ¶
Get the number of sub-actions for an inclusive union action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_num (int32): The output number of sub-actions.
- Return type:
int32 or None
- classmethod get_inclusive_union_action_to_arrays(object, element, tag='InclusiveUnionAction') (out_element_names=Array[Name], out_elements=Array[LearningAgentsActionObjectElement]) or None ¶
Get the chosen sub-actions for an inclusive union action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_element_names (Array[Name]): The output sub-action names.
out_elements (Array[LearningAgentsActionObjectElement]): The output sub-actions.
- Return type:
tuple or None
- classmethod get_location_action(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='LocationAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Vector or None ¶
Get the value for a location action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_transform (Transform) – The relative transform to transform the location by.
location_scale (float) – The scale used to control the overall magnitude of the outputted location action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_location (Vector): The output location value.
- Return type:
Vector or None
- classmethod get_null_action(object, element, tag='NullAction') bool ¶
Get a null action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
- Return type:
- classmethod get_optional_action(object, element, tag='OptionalAction') (out_option=LearningAgentsOptionalAction, out_element=LearningAgentsActionObjectElement) or None ¶
Get the sub-action of an option action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_option (LearningAgentsOptionalAction): The output optional specifier.
out_element (LearningAgentsActionObjectElement): The output sub-action.
- Return type:
tuple or None
- classmethod get_pair_action(object, element, tag='PairAction') (out_key=LearningAgentsActionObjectElement, out_value=LearningAgentsActionObjectElement) or None ¶
Get the sub-actions of a pair action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_key (LearningAgentsActionObjectElement): The output key sub-element.
out_value (LearningAgentsActionObjectElement): The output value sub-element.
- Return type:
tuple or None
- classmethod get_rotation_action(object, element, relative_rotation=[0.000000, 0.000000, 0.000000], rotation_scale=90.000000, tag='RotationAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Rotator or None ¶
Get the value for a rotation action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_rotation (Rotator) – The relative rotation to transform the rotation by.
rotation_scale (float) – The scale used to control the overall magnitude of the outputted rotation action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_rotation (Rotator): The output rotation value.
- Return type:
Rotator or None
- classmethod get_rotation_action_as_quat(object, element, relative_rotation, rotation_scale=90.000000, tag='RotationAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Quat or None ¶
Get the value for a rotation action as a quaternion.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_rotation (Quat) – The relative rotation to transform the rotation by.
rotation_scale (float) – The scale used to control the overall magnitude of the outputted rotation action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_rotation (Quat): The output rotation value.
- Return type:
Quat or None
- classmethod get_scale_action(object, element, relative_scale=[1.000000, 1.000000, 1.000000], scale=1.000000, tag='ScaleAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Vector or None ¶
Get the value for a scale action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_scale (Vector) – The relative scale to transform the scale by.
scale (float) – The scale used to control the overall magnitude of the outputted scale action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_scale (Vector): The output scale value.
- Return type:
Vector or None
- classmethod get_static_array_action(object, element, tag='StaticArrayAction') Array[LearningAgentsActionObjectElement] or None ¶
Get the entries of a static array action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_elements (Array[LearningAgentsActionObjectElement]): The output sub-elements.
- Return type:
Array[LearningAgentsActionObjectElement] or None
- classmethod get_static_array_action_num(object, element, tag='StaticArrayAction') int32 or None ¶
Get the number of entries in a static array action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_num (int32): The output number of entries.
- Return type:
int32 or None
- classmethod get_struct_action(object, element, tag='StructAction') Map[Name, LearningAgentsActionObjectElement] or None ¶
Get the sub-actions for a struct action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_elements (Map[Name, LearningAgentsActionObjectElement]): The output sub-actions.
- Return type:
Map[Name, LearningAgentsActionObjectElement] or None
- classmethod get_struct_action_num(object, element, tag='StructAction') int32 or None ¶
Get the number of sub-actions for a struct action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_num (int32): The output number of sub-actions.
- Return type:
int32 or None
- classmethod get_struct_action_to_arrays(object, element, tag='StructAction') (out_element_names=Array[Name], out_elements=Array[LearningAgentsActionObjectElement]) or None ¶
Get the sub-actions for a struct action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
tag (Name) – The tag of the corresponding action. Must match the tag given during Specify.
- Returns:
true if the provided Element is the correct type, otherwise false.
out_element_names (Array[Name]): The output sub-action names.
out_elements (Array[LearningAgentsActionObjectElement]): The output sub-actions.
- Return type:
tuple or None
- classmethod get_transform_action(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, rotation_scale=1.000000, scale_scale=1.000000, tag='TransformAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Transform or None ¶
Get the value for a transform action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_transform (Transform) – The relative transform.
location_scale (float) – The scale used to control the overall magnitude of the outputted location action.
rotation_scale (float) – The scale used to control the overall magnitude of the outputted rotation action.
scale_scale (float) – The scale used to control the overall magnitude of the outputted scale action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_transform (Transform): The output transform value.
- Return type:
Transform or None
- classmethod get_velocity_action(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='VelocityAction', 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=[0.000000, 0.000000, 1.000000, 1.000000]) Vector or None ¶
Get the value for a velocity action.
- Parameters:
object (LearningAgentsActionObject) – The Action Object
element (LearningAgentsActionObjectElement) – The Action Object Element
relative_transform (Transform) – The relative transform to transform the velocity by.
velocity_scale (float) – The scale used to control the overall magnitude of the outputted velocity action.
tag (Name) – The tag of the corresponding action. 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 action. This must be set to use logging.
visual_logger_agent_id (int32) – The agent id associated with this action.
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:
true if the provided Element is the correct type, otherwise false.
out_velocity (Vector): The output velocity value.
- Return type:
Vector or None
- classmethod log_action(object, element) None ¶
Logs an Action Object Element. Useful for debugging.
- Parameters:
object (LearningAgentsActionObject) – Action Object
element (LearningAgentsActionObjectElement) –
- classmethod make_angle_action(object, angle, relative_angle=0.000000, angle_scale=90.000000, tag='AngleAction') LearningAgentsActionObjectElement ¶
Make Angle Action
- Parameters:
object (LearningAgentsActionObject) –
angle (float) –
relative_angle (float) –
angle_scale (float) –
tag (Name) –
- Return type:
- classmethod make_angle_action_radians(object, angle, relative_angle=0.000000, angle_scale=1.570796, tag='AngleAction') LearningAgentsActionObjectElement ¶
Make Angle Action Radians
- Parameters:
object (LearningAgentsActionObject) –
angle (float) –
relative_angle (float) –
angle_scale (float) –
tag (Name) –
- Return type:
- classmethod make_bitmask_action(object, enum, bitmask_value, tag='BitmaskAction') LearningAgentsActionObjectElement ¶
Make Bitmask Action
- Parameters:
object (LearningAgentsActionObject) –
enum (Enum) –
bitmask_value (int32) –
tag (Name) –
- Return type:
- classmethod make_bool_action(object, value, tag='BoolAction') LearningAgentsActionObjectElement ¶
Make Bool Action
- Parameters:
object (LearningAgentsActionObject) –
value (bool) –
tag (Name) –
- Return type:
- classmethod make_continuous_action(object, values, tag='ContinuousAction') LearningAgentsActionObjectElement ¶
Make Continuous Action
- Parameters:
object (LearningAgentsActionObject) –
tag (Name) –
- Return type:
- classmethod make_direction_action(object, direction, relative_transform=[[0.000000, 0.000000, 0.000000], [-0.000000, 0.000000, 0.000000], [1.000000, 1.000000, 1.000000]], tag='DirectionAction') LearningAgentsActionObjectElement ¶
Make Direction Action
- Parameters:
object (LearningAgentsActionObject) –
direction (Vector) –
relative_transform (Transform) –
tag (Name) –
- Return type:
- classmethod make_either_a_action(object, a, tag='EitherAction') LearningAgentsActionObjectElement ¶
Make Either AAction
- Parameters:
object (LearningAgentsActionObject) –
tag (Name) –
- Return type:
- classmethod make_either_action(object, element, either, tag='EitherAction') LearningAgentsActionObjectElement ¶
Make Either Action
- Parameters:
object (LearningAgentsActionObject) –
element (LearningAgentsActionObjectElement) –
either (LearningAgentsEitherAction) –
tag (Name) –
- Return type:
- classmethod make_either_b_action(object, b, tag='EitherAction') LearningAgentsActionObjectElement ¶
Make Either BAction
- Parameters:
object (LearningAgentsActionObject) –
tag (Name) –
- Return type:
- classmethod make_encoding_action(object, element, tag='EncodingAction') LearningAgentsActionObjectElement ¶
Make Encoding Action
- Parameters:
object (LearningAgentsActionObject) –
element (LearningAgentsActionObjectElement) –
tag (Name) –
- Return type:
- classmethod make_enum_action(object, enum, enum_value, tag='EnumAction') LearningAgentsActionObjectElement ¶
Make Enum Action
- Parameters:
object (LearningAgentsActionObject) –
enum (Enum) –
enum_value (uint8) –
tag (Name) –
- Return type:
- classmethod make_exclusive_discrete_action(object, index, tag='DiscreteExclusiveAction') LearningAgentsActionObjectElement ¶
Make Exclusive Discrete Action
- Parameters:
object (LearningAgentsActionObject) –
index (int32) –
tag (Name) –
- Return type:
- classmethod make_exclusive_union_action(object, element_name, element, tag='ExclusiveUnionAction') LearningAgentsActionObjectElement ¶
Make Exclusive Union Action
- Parameters:
object (LearningAgentsActionObject) –
element_name (Name) –
element (LearningAgentsActionObjectElement) –
tag (Name) –
- Return type:
- classmethod make_float_action(object, value, float_scale=1.000000, tag='FloatAction') LearningAgentsActionObjectElement ¶
Make Float Action
- Parameters:
object (LearningAgentsActionObject) –
value (float) –
float_scale (float) –
tag (Name) –
- Return type:
- classmethod make_inclusive_discrete_action(object, indices, tag='DiscreteInclusiveAction') LearningAgentsActionObjectElement ¶
Make Inclusive Discrete Action
- Parameters:
object (LearningAgentsActionObject) –
indices (Array[int32]) –
tag (Name) –
- Return type:
- classmethod make_inclusive_union_action(object, elements, tag='InclusiveUnionAction') LearningAgentsActionObjectElement ¶
Make Inclusive Union Action
- Parameters:
object (LearningAgentsActionObject) –
elements (Map[Name, LearningAgentsActionObjectElement]) –
tag (Name) –
- Return type:
- classmethod make_inclusive_union_action_from_arrays(object, element_names, elements, tag='InclusiveUnionAction') LearningAgentsActionObjectElement ¶
Make Inclusive Union Action from Arrays
- Parameters:
object (LearningAgentsActionObject) –
elements (Array[LearningAgentsActionObjectElement]) –
tag (Name) –
- Return type:
- classmethod make_location_action(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='LocationAction') LearningAgentsActionObjectElement ¶
Make Location Action
- Parameters:
object (LearningAgentsActionObject) –
location (Vector) –
relative_transform (Transform) –
location_scale (float) –
tag (Name) –
- Return type:
- classmethod make_null_action(object, tag='NullAction') LearningAgentsActionObjectElement ¶
Make Null Action
- Parameters:
object (LearningAgentsActionObject) –
tag (Name) –
- Return type:
- classmethod make_optional_action(object, element, option, tag='OptionalAction') LearningAgentsActionObjectElement ¶
Make Optional Action
- Parameters:
object (LearningAgentsActionObject) –
element (LearningAgentsActionObjectElement) –
option (LearningAgentsOptionalAction) –
tag (Name) –
- Return type:
- classmethod make_optional_null_action(object, tag='OptionalAction') LearningAgentsActionObjectElement ¶
Make Optional Null Action
- Parameters:
object (LearningAgentsActionObject) –
tag (Name) –
- Return type:
- classmethod make_optional_valid_action(object, element, tag='OptionalAction') LearningAgentsActionObjectElement ¶
Make Optional Valid Action
- Parameters:
object (LearningAgentsActionObject) –
element (LearningAgentsActionObjectElement) –
tag (Name) –
- Return type:
- classmethod make_pair_action(object, key, value, tag='PairAction') LearningAgentsActionObjectElement ¶
Make Pair Action
- Parameters:
object (LearningAgentsActionObject) –
value (LearningAgentsActionObjectElement) –
tag (Name) –
- Return type:
- classmethod make_rotation_action(object, rotation, relative_rotation=[0.000000, 0.000000, 0.000000], rotation_scale=90.000000, tag='RotationAction') LearningAgentsActionObjectElement ¶
Make Rotation Action
- Parameters:
object (LearningAgentsActionObject) –
rotation (Rotator) –
relative_rotation (Rotator) –
rotation_scale (float) –
tag (Name) –
- Return type:
- classmethod make_rotation_action_from_quat(object, rotation, relative_rotation, rotation_scale=90.000000, tag='RotationAction') LearningAgentsActionObjectElement ¶
Make Rotation Action from Quat
- Parameters:
object (LearningAgentsActionObject) –
rotation (Quat) –
relative_rotation (Quat) –
rotation_scale (float) –
tag (Name) –
- Return type:
- classmethod make_scale_action(object, scale, relative_scale=[1.000000, 1.000000, 1.000000], tag='ScaleAction') LearningAgentsActionObjectElement ¶
Make Scale Action
- Parameters:
object (LearningAgentsActionObject) –
scale (Vector) –
relative_scale (Vector) –
tag (Name) –
- Return type:
- classmethod make_static_array_action(object, elements, tag='StaticArrayAction') LearningAgentsActionObjectElement ¶
Make Static Array Action
- Parameters:
object (LearningAgentsActionObject) –
elements (Array[LearningAgentsActionObjectElement]) –
tag (Name) –
- Return type:
- classmethod make_struct_action(object, elements, tag='StructAction') LearningAgentsActionObjectElement ¶
Make Struct Action
- Parameters:
object (LearningAgentsActionObject) –
elements (Map[Name, LearningAgentsActionObjectElement]) –
tag (Name) –
- Return type:
- classmethod make_struct_action_from_arrays(object, element_names, elements, tag='StructAction') LearningAgentsActionObjectElement ¶
Make Struct Action from Arrays
- Parameters:
object (LearningAgentsActionObject) –
elements (Array[LearningAgentsActionObjectElement]) –
tag (Name) –
- Return type:
- classmethod make_transform_action(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='TransformAction') LearningAgentsActionObjectElement ¶
Make Transform Action
- Parameters:
object (LearningAgentsActionObject) –
transform (Transform) –
relative_transform (Transform) –
location_scale (float) –
tag (Name) –
- Return type:
- classmethod make_velocity_action(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='VelocityAction') LearningAgentsActionObjectElement ¶
Make Velocity Action
- Parameters:
object (LearningAgentsActionObject) –
velocity (Vector) –
relative_transform (Transform) –
velocity_scale (float) –
tag (Name) –
- Return type:
- classmethod specify_angle_action(schema, tag='AngleAction') LearningAgentsActionSchemaElement ¶
Specifies a new angle action. This represents an action which is an angle sampled from a Gaussian distribution centered around zero.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_bitmask_action(schema, enum, prior_probabilities, tag='BitmaskAction') LearningAgentsActionSchemaElement ¶
Specifies a new bitmask action. This represents an action which is an inclusive choice from entries of an Enum, sampled from a Bernoulli distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
enum (Enum) – The Enum type.
prior_probabilities (Map[uint8, float]) – The prior probabilities of each enum element. Can be left empty to use a probability of 0.5 for each element.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_bitmask_action_from_array(schema, enum, prior_probabilities, tag='BitmaskAction') LearningAgentsActionSchemaElement ¶
Specifies a new bitmask action. This represents an action which is an inclusive choice from entries of an Enum, sampled from a Bernoulli distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
enum (Enum) – The Enum type.
prior_probabilities (Array[float]) – The prior probabilities of each enum element. Can be left empty to use a probability of 0.5 for each element.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_bool_action(schema, prior_probability=0.500000, tag='BoolAction') LearningAgentsActionSchemaElement ¶
Specifies a new bool action. This represents an action which is either true or false.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
prior_probability (float) – The prior probability of this action being true.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_continuous_action(schema, size, tag='ContinuousAction') LearningAgentsActionSchemaElement ¶
Specifies a new continuous action. This represents an action made up of several float values sampled from a Gaussian distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
size (int32) – The number of float values in the action.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_direction_action(schema, tag='DirectionAction') LearningAgentsActionSchemaElement ¶
Specifies a new direction action. This represents an action which is a direction sampled from a Gaussian distribution and normalized.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_either_action(schema, a, b, prior_probability_of_a=0.500000, tag='EitherAction') LearningAgentsActionSchemaElement ¶
Specifies a new either action. This represents an action which is either action A or action B.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
a (LearningAgentsActionSchemaElement) – The sub-action A.
b (LearningAgentsActionSchemaElement) – The sub-action B.
prior_probability_of_a (float) – The prior probability of sampling action A over action B.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_encoding_action(schema, element, encoding_size=128, hidden_layer_num=1, activation_function=LearningAgentsActivationFunction.ELU, tag='EncodingAction') LearningAgentsActionSchemaElement ¶
Specifies a new encoding action. This represents an action which will be a decoding of another sub-action using a small neural network.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
element (LearningAgentsActionSchemaElement) – The sub-action.
encoding_size (int32) – The encoding size used to decode this sub-action.
hidden_layer_num (int32) – The number of hidden layers used to decode this sub-action.
activation_function (LearningAgentsActivationFunction) – The activation function used to decode this sub-action.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_enum_action(schema, enum, prior_probabilities, tag='EnumAction') LearningAgentsActionSchemaElement ¶
Specifies a new enum action. This represents an action which is an exclusive choice from entries of an Enum, sampled from a Categorical distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
enum (Enum) – The Enum type.
prior_probabilities (Map[uint8, float]) – The prior probabilities of each enum element. Can be left empty to use a uniform distribution over elements. Should sum to one.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_enum_action_from_array(schema, enum, prior_probabilities, tag='EnumAction') LearningAgentsActionSchemaElement ¶
Specifies a new enum action. This represents an action which is an exclusive choice from entries of an Enum, sampled from a Categorical distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
enum (Enum) – The Enum type.
prior_probabilities (Array[float]) – The prior probabilities of each enum element. Can be left empty to use a uniform distribution over elements. Should sum to one.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_exclusive_discrete_action(schema, size, prior_probabilities, tag='DiscreteExclusiveAction') LearningAgentsActionSchemaElement ¶
Specifies a new exclusive discrete action. This represents an action which is an exclusive choice from a number of discrete options, sampled from a Categorical distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
size (int32) – The number of discrete options in the action.
prior_probabilities (Array[float]) – The prior probabilities of each option. Can be left empty to use a uniform distribution over options. Should sum to one.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_exclusive_union_action(schema, elements, prior_probabilities, tag='ExclusiveUnionAction') LearningAgentsActionSchemaElement ¶
Specifies a new exclusive union action. This represents an action which is an exclusive choice from a number of named sub-actions, sampled from a Categorical distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Map[Name, LearningAgentsActionSchemaElement]) – The sub-actions.
prior_probabilities (Map[Name, float]) – The prior probabilities of each option. Can be left empty to use a uniform distribution over options. Should sum to one.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_exclusive_union_action_from_arrays(schema, element_names, elements, prior_probabilities, tag='ExclusiveUnionAction') LearningAgentsActionSchemaElement ¶
Specifies a new exclusive union action. This represents an action which is an exclusive choice from a number of named sub-actions, sampled from a Categorical distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Array[LearningAgentsActionSchemaElement]) – The corresponding sub-actions. Must be the same size as ElementNames.
prior_probabilities (Array[float]) – The prior probabilities of each option. Can be left empty to use a uniform distribution over options. Should sum to one.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_float_action(schema, tag='FloatAction') LearningAgentsActionSchemaElement ¶
Specifies a new float action. This represents an action which is a single float sampled from a Gaussian distribution. It can be used as a catch-all for situations where a type-specific action does not exist.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_inclusive_discrete_action(schema, size, prior_probabilities, tag='DiscreteInclusiveAction') LearningAgentsActionSchemaElement ¶
Specifies a new inclusive discrete action. This represents an action which is an inclusive choice from a number of discrete options, sampled from a Bernoulli distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
size (int32) – The number of discrete options in the action.
prior_probabilities (Array[float]) – The prior probabilities of each option. Can be left empty to use a probability of 0.5 for each option.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_inclusive_union_action(schema, elements, prior_probabilities, tag='InclusiveUnionAction') LearningAgentsActionSchemaElement ¶
Specifies a new inclusive union action. This represents an action which is an inclusive choice from a number of named sub-actions, sampled from a Bernoulli distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Map[Name, LearningAgentsActionSchemaElement]) – The sub-actions.
prior_probabilities (Map[Name, float]) – The prior probabilities of each option. Can be left empty to use a probability of 0.5 for each option.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_inclusive_union_action_from_arrays(schema, element_names, elements, prior_probabilities, tag='InclusiveUnionAction') LearningAgentsActionSchemaElement ¶
Specifies a new inclusive union action. This represents an action which is an inclusive choice from a number of named sub-actions, sampled from a Bernoulli distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Array[LearningAgentsActionSchemaElement]) – The corresponding sub-actions. Must be the same size as ElementNames.
prior_probabilities (Array[float]) – The prior probabilities of each option. Can be left empty to use a probability of 0.5 for each option.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_location_action(schema, tag='LocationAction') LearningAgentsActionSchemaElement ¶
Specifies a new location action. This represents an action which is a location sampled from a Gaussian distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_null_action(schema, tag='NullAction') LearningAgentsActionSchemaElement ¶
Specifies a new null action. This represents an empty action and can be useful when an action is needed which does nothing.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_optional_action(schema, element, prior_probability=0.500000, tag='OptionalAction') LearningAgentsActionSchemaElement ¶
Specifies a new optional action. This represents an action which may or may not be generated.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
element (LearningAgentsActionSchemaElement) – The sub-action.
prior_probability (float) –
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_pair_action(schema, key, value, tag='PairAction') LearningAgentsActionSchemaElement ¶
Specifies a new pair action. This represents an action which is made up of a key and value sub-actions.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
key (LearningAgentsActionSchemaElement) – The key sub-action.
value (LearningAgentsActionSchemaElement) – The value sub-action.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_rotation_action(schema, tag='RotationAction') LearningAgentsActionSchemaElement ¶
Specifies a new rotation action. This represents an action which is a rotation sampled from a Gaussian distribution in the angle-axis space.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_scale_action(schema, tag='ScaleAction') LearningAgentsActionSchemaElement ¶
Specifies a new scale action. This represents an action which is a scale sampled from a Gaussian distribution in the log space.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_static_array_action(schema, element, num, tag='StaticArrayAction') LearningAgentsActionSchemaElement ¶
Specifies a new static array action. This represents an action which is a fixed sized array of some sub-action.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
element (LearningAgentsActionSchemaElement) – The sub-action.
num (int32) – The number of elements in the array.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_struct_action(schema, elements, tag='StructAction') LearningAgentsActionSchemaElement ¶
Specifies a new struct action. This represents an action which is made up of a number of named sub-actions.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Map[Name, LearningAgentsActionSchemaElement]) – The sub-actions.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_struct_action_from_arrays(schema, element_names, elements, tag='StructAction') LearningAgentsActionSchemaElement ¶
Specifies a new struct action. This represents an action which is made up of a number of named sub-actions.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
elements (Array[LearningAgentsActionSchemaElement]) – The corresponding sub-actions. Must be the same size as ElementNames.
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_transform_action(schema, tag='TransformAction') LearningAgentsActionSchemaElement ¶
Specifies a new transform action.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod specify_velocity_action(schema, tag='VelocityAction') LearningAgentsActionSchemaElement ¶
Specifies a new velocity action. This represents an action which is a velocity sampled from a Gaussian distribution.
- Parameters:
schema (LearningAgentsActionSchema) – The Action Schema
tag (Name) – The tag of this new action. Used during action object validation and debugging.
- Returns:
The newly created action schema element.
- Return type:
- classmethod validate_action_object_matches_schema(schema, schema_element, object, object_element) bool ¶
Validates that the given action object matches the schema. Will log errors on objects that don’t match.
- Parameters:
schema (LearningAgentsActionSchema) – Action Schema
schema_element (LearningAgentsActionSchemaElement) – Action Schema Element
object (LearningAgentsActionObject) – Action Object
object_element (LearningAgentsActionObjectElement) – Action Object Element
- Returns:
true if the object matches the schema
- Return type: