Skip to content

Class UBlueprintPolicy

Class UBlueprintPolicy

  • Defined in File BlueprintPolicy.h

Inheritance Relationships

Base Types

class UBlueprintPolicy : public UObject, public IPolicy

Source: Source/Schola/Public/Policies/BlueprintPolicy.h

Dependencies: FInteractionDefinition, FPoint

Abstract base class for Blueprint-implementable policies.

This class allows policies to be implemented entirely in Blueprint, providing a convenient way to create custom decision-making logic without C++ code. Derive from this class in Blueprint and implement the Think and Init events to create a custom policy.


Public Functions

SymbolDetails
ThinkNative implementation of Think that forwards to the Blueprint event.
ThinkBlueprint event for generating actions from observations.
InitBlueprint event for initializing the policy.

Think

inline virtual bool Think(const TInstancedStruct<FPoint> &InObservations,
TInstancedStruct<FPoint> &OutAction) override

Native implementation of Think that forwards to the Blueprint event.

Parameters

  • InObservations – [in] The observations from the environment.

  • OutAction – [out] Output parameter that receives the generated action.

Returns:

True if inference succeeded.

#DirectionNameTypeDescription
1InObservationsconst TInstancedStruct< FPoint > &The observations from the environment.
2OutActionTInstancedStruct< FPoint > &Output parameter that receives the generated action.

Attributes: inline, virtual

Source: Source/Schola/Public/Policies/BlueprintPolicy.h

Think

void Think(const FInstancedStruct &InObservations, FInstancedStruct &OutAction)

Blueprint event for generating actions from observations.

Implement this event in Blueprint to define how observations are converted into actions.

Parameters

  • InObservations – [in] The observations from the environment.

  • OutAction – [out] Output parameter that receives the generated action.

#DirectionNameTypeDescription
1InObservationsconst TInstancedStruct< FPoint > &The observations from the environment.
2OutActionTInstancedStruct< FPoint > &Output parameter that receives the generated action.

Attributes: inline, virtual

Source: Source/Schola/Public/Policies/BlueprintPolicy.h

Init

virtual bool Init(const FInteractionDefinition &InPolicyDefinition) override

Blueprint event for initializing the policy.

Implement this event in Blueprint to set up the policy when it is first created or when the interaction definition changes.

Parameters

InPolicyDefinition – [in] The interaction definition specifying observation and action spaces.

Returns:

True if initialization succeeded, false otherwise.

#DirectionNameTypeDescription
1InPolicyDefinitionconst FInteractionDefinition &The interaction definition specifying observation and action spaces.

Attributes: virtual

Source: Source/Schola/Public/Policies/BlueprintPolicy.h