unreal.PlanarPositionDifferenceCompletion
¶
- class unreal.PlanarPositionDifferenceCompletion(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
LearningAgentsCompletion
A completion for if two positions differ by some threshold in a plane, e.g. if the agent gets too far from a starting position.
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_planar_position_difference_completion(agent_trainer, name='None', threshold=100.000000, completion_mode=LearningAgentsCompletionEnum.TERMINATION, axis0=[1.000000, 0.000000, 0.000000], axis1=[0.000000, 1.000000, 0.000000]) PlanarPositionDifferenceCompletion ¶
Adds a new planar position difference completion to the given trainer. The axis parameters define the plane. 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) – If the distance becomes greater than this threshold, then the episode will complete.
completion_mode (LearningAgentsCompletionEnum) – The completion mode.
axis0 (Vector) – The forward axis of the plane.
axis1 (Vector) – The right axis of the plane.
- Returns:
The newly created completion.
- Return type: