unreal.ConditionalCompletion

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

Bases: LearningAgentsCompletion

A simple boolean completion. Used as a catch-all for situations where a more type-specific completion does not exist yet.

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_conditional_completion(agent_trainer, name='None', completion_mode=LearningAgentsCompletionEnum.TERMINATION) ConditionalCompletion

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

Parameters:
Returns:

The newly created completion.

Return type:

ConditionalCompletion

set_conditional_completion(agent_id=-1, is_completed) None

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

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

  • is_completed (bool) – Pass in true if condition is met. Otherwise, false.