Interface ICustomReward<TStateData>
Custom implementation of a reward
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
public interface ICustomReward<TStateData>
where TStateData : struct, IStateData
Type Parameters
| Name | Description |
|---|---|
| TStateData | State data Type |
Methods
SetCustomReward(TStateData, ActionKey, TStateData, ref Single)
Modify the value of a reward for a given state and action
Declaration
void SetCustomReward(TStateData originalState, ActionKey action, TStateData newState, ref float reward)
Parameters
| Type | Name | Description |
|---|---|---|
| TStateData | originalState | State before effects were applied |
| ActionKey | action | Key index of the action evaluated |
| TStateData | newState | State after effects were applied |
| System.Single | reward | Base reward |