unreal.LearningAgentsRecorder

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

Bases: LearningAgentsManagerListener

A component that can be used to create recordings of training data for imitation learning.

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgentsTraining

  • File: LearningAgentsRecorder.h

Editor Properties: (see get_editor_property/set_editor_property)

  • interactor (LearningAgentsInteractor): [Read-Only] The agent interactor this recorder is associated with.

  • is_recording (bool): [Read-Only] True if recording is currently in-progress. Otherwise, false.

  • is_setup (bool): [Read-Only] True if this object has been setup. Otherwise, false.

  • manager (LearningAgentsManager): [Read-Only] The manager this object is associated with.

  • recording (LearningAgentsRecording): [Read-Only] The current recording object.

  • visual_logger_objects (Map[Name, LearningAgentsVisualLoggerObject]): [Read-Only] The visual logger objects associated with this listener.

add_experience() None

While recording, adds the current buffered observations and actions of the added agents to the internal buffer. Call this after GatherObservations and either EvaluateAgentController (if recording a human/AI demonstration) or DecodeAndSampleActions (if recording from another policy).

begin_recording() None

Begins the recording of the observations and actions of each added agent.

end_recording() None

Ends the recording of the observations and actions of each agent and stores them in the current recording object.

end_recording_and_discard() None

Ends the recording of the observations and actions of each agent and discards them.

get_interactor() LearningAgentsInteractor

Get Interactor

Return type:

LearningAgentsInteractor

get_recording_asset() LearningAgentsRecording

Gets the current recording object. Note: this may be empty until EndRecording has been called.

Return type:

LearningAgentsRecording

is_recording() bool

Returns true if recording is active; Otherwise, false.

Return type:

bool

classmethod make_recorder(manager, interactor, class_=None, name="Recorder", recorder_path_settings=[["../../../Engine/Intermediate/"], "Recordings"], recording_asset=None, reinitialize_recording=True) -> (LearningAgentsRecorder, manager=LearningAgentsManager, interactor=LearningAgentsInteractor)

Constructs this object and runs the setup functions for the underlying data storage. pram: bReinitializeRecording If to reinitialize the recording asset

Parameters:
Returns:

manager (LearningAgentsManager): The agent manager we are using.

interactor (LearningAgentsInteractor): The agent interactor we are recording with.

Return type:

tuple

setup_recorder(manager, interactor, recorder_path_settings=[["../../../Engine/Intermediate/"], "Recordings"], recording_asset=None, reinitialize_recording=True) -> (manager=LearningAgentsManager, interactor=LearningAgentsInteractor)

Initializes this object and runs the setup functions for the underlying data storage. pram: bReinitializeRecording If to reinitialize the recording asset

Parameters:
Returns:

manager (LearningAgentsManager): The agent manager we are using.

interactor (LearningAgentsInteractor): The agent interactor we are recording with.

Return type:

tuple