Interface IPlan<TStateKey, TActionKey>
An interface that marks an implementation of a data structure used by the planner to store the results of planning
Namespace: Unity.AI.Planner
Syntax
public interface IPlan<TStateKey, TActionKey> : IDisposable where TStateKey : struct
Type Parameters
| Name | Description |
|---|---|
| TStateKey | StateKey type |
| TActionKey | ActionKey type |
Properties
RootStateKey
A key to access the root state of the plan
Declaration
TStateKey RootStateKey { get; }
Property Value
| Type | Description |
|---|---|
| TStateKey |
Methods
GetOptimalAction(TStateKey, out TActionKey)
Returns the key for the optimal action for the given state.
Declaration
bool GetOptimalAction(TStateKey stateKey, out TActionKey actionKey)
Parameters
| Type | Name | Description |
|---|---|---|
| TStateKey | stateKey | Key for state to access |
| TActionKey | actionKey | Key to hold optimal action key |
Returns
| Type | Description |
|---|---|
| System.Boolean | Whether an optimal action was found |
Reset(TStateKey)
Resets the plan with a new state for the root
Declaration
void Reset(TStateKey rootStateKey)
Parameters
| Type | Name | Description |
|---|---|---|
| TStateKey | rootStateKey | State key corresponding to the state for the new plan root |
UpdatePlan(TStateKey)
Updates the root state to the given state
Declaration
void UpdatePlan(TStateKey rootStateKey)
Parameters
| Type | Name | Description |
|---|---|---|
| TStateKey | rootStateKey | State key corresponding to the state for the new plan root |