unreal.TimeElapsedCompletion

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

Bases: LearningAgentsCompletion

A completion for if a given amount of time has elapsed.

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgentsTraining

  • File: LearningAgentsCompletions.h

Editor Properties: (see get_editor_property/set_editor_property)

  • agent_trainer (LearningAgentsTrainer): [Read-Only] Reference to the Trainer this completion is associated with.

classmethod add_time_elapsed_completion(agent_trainer, name='None', threshold=10.000000, completion_mode=LearningAgentsCompletionEnum.TERMINATION) TimeElapsedCompletion

Adds a new time elapsed completion to the given trainer. Call during ULearningAgentsTrainer::SetupCompletions event.

Parameters:
  • agent_trainer (LearningAgentsTrainer) – The trainer to add this completion to.

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

  • threshold (float) – How much time should be elapsed for the completion to trigger.

  • completion_mode (LearningAgentsCompletionEnum) – The completion mode.

Returns:

The newly created completion.

Return type:

TimeElapsedCompletion

set_time_elapsed_completion(agent_id=-1, time) None

Sets the data for this completion. Call during ULearningAgentsTrainer::SetCompletions event.

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

  • time (float) – The amount of time that has passed