Class UBlueprintPolicy
Class UBlueprintPolicy
- Defined in File BlueprintPolicy.h
Inheritance Relationships
Base Types
-
public UObject -
public IPolicy(Class IPolicy)
class UBlueprintPolicy : public UObject, public IPolicySource: 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
| Symbol | Details |
|---|---|
Think | Native implementation of Think that forwards to the Blueprint event. |
Think | Blueprint event for generating actions from observations. |
Init | Blueprint event for initializing the policy. |
Think
inline virtual bool Think(const TInstancedStruct<FPoint> &InObservations, TInstancedStruct<FPoint> &OutAction) overrideNative 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.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InObservations | const TInstancedStruct< FPoint > & | The observations from the environment. |
| 2 | — | OutAction | TInstancedStruct< 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.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InObservations | const TInstancedStruct< FPoint > & | The observations from the environment. |
| 2 | — | OutAction | TInstancedStruct< 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) overrideBlueprint 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.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InPolicyDefinition | const FInteractionDefinition & | The interaction definition specifying observation and action spaces. |
Attributes: virtual