unreal.LearningAgentsRecording¶
- class unreal.LearningAgentsRecording(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
DataAssetData asset representing an array of records.
C++ Source:
Plugin: LearningAgents
Module: LearningAgentsTraining
File: LearningAgentsRecording.h
Editor Properties: (see get_editor_property/set_editor_property)
new_schema_name(Name): [Read-Write] The schema name. Used in combination with the “AppendSchema” and “AppendRecording” buttons in the editor.new_tag(GameplayTag): [Read-Write] The tag to apply to new records. Used in combination with the “AppendRecording” and “Append All Recordings from Folder” buttons in the editor.recording_file(FilePath): [Read-Write] A recording file. Used in combination with the “AppendRecording” button in the editor.recording_folder(DirectoryPath): [Read-Write] A folder containing .record files to load. Used in combination with the “Append All Recordings From Folder” button in the editor.records(Array[LearningAgentsRecord]): [Read-Write] Set of records.schema_file(FilePath): [Read-Write] A schema file. Used in combination with the “AppendSchema” button in the editor.schemas(Map[Name, LearningAgentsSchema]): [Read-Write] Map of schemas.
- append_recording_from_file(file, schema_name, tag) None¶
Append to this recording from a file.
- Parameters:
file (FilePath)
schema_name (Name)
tag (GameplayTag)
- append_recording_to_asset(recording_asset) None¶
Appends this recording to the given recording asset
- Parameters:
recording_asset (LearningAgentsRecording)
- get_action_vector(record, step) -> (out_action_vector=Array[float], out_action_compatibility_hash=int32)¶
Get the Action Vector associated with a particular step of a given recording
- Parameters:
record (int32) – Index of the record in the array of records.
step (int32) – Step of the recording
- Returns:
out_action_vector (Array[float]): Output Action Vector
out_action_compatibility_hash (int32): Output Compatibility Hash for the given Action Vector
- Return type:
tuple
- get_observation_vector(record, step) -> (out_observation_vector=Array[float], out_observation_compatibility_hash=int32)¶
Get the Observation Vector associated with a particular step of a given recording
- Parameters:
record (int32) – Index of the record in the array of records.
step (int32) – Step of the recording
- Returns:
out_observation_vector (Array[float]): Output Observation Vector
out_observation_compatibility_hash (int32): Output Compatibility Hash for the given Observation Vector
- Return type:
tuple
- get_record_num() int32¶
Get the number of records
- Return type:
int32
- get_record_step_num(record) int32¶
Get the number of steps in a given record
- Parameters:
record (int32)
- Return type:
int32
- load_recording_from_asset(recording_asset) None¶
Loads this recording from the given recording asset
- Parameters:
recording_asset (LearningAgentsRecording)
- load_recording_from_file(file, schema_name, tag) Array[LearningAgentsRecord]¶
Load this recording from a file.
- Parameters:
file (FilePath)
schema_name (Name)
tag (GameplayTag)
- Returns:
out_records (Array[LearningAgentsRecord]):
- Return type:
- save_recording_to_asset(recording_asset) None¶
Saves this recording to the given recording asset
- Parameters:
recording_asset (LearningAgentsRecording)