unreal.TimeObservation

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

Bases: LearningAgentsObservation

An observation of a time relative to another time.

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgents

  • File: LearningAgentsObservations.h

Editor Properties: (see get_editor_property/set_editor_property)

  • interactor (LearningAgentsInteractor): [Read-Only] Reference to the Interactor this observation is associated with.

classmethod add_time_observation(interactor, name='None', scale=1.000000) TimeObservation

Adds a new time observation to the given agent interactor. Call during ULearningAgentsInteractor::SetupObservations event.

Parameters:
  • interactor (LearningAgentsInteractor) – The agent interactor to add this observation to.

  • name (Name) – The name of this new observation. Used for debugging.

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

Returns:

The newly created observation.

Return type:

TimeObservation

set_time_observation(agent_id=-1, time, relative_time=0.000000) None

Sets the data for this observation. Call during ULearningAgentsInteractor::SetObservations event.

Parameters:
  • agent_id (int32) – The agent id this data corresponds to.

  • time (float) – The time currently being observed.

  • relative_time (float) – The time the provided time should be encoded relative to.