Interface IPlannerScheduler
Interface marking an implementation of the planner scheduler.
Namespace: Unity.AI.Planner
Syntax
public interface IPlannerScheduler : IDisposable
Properties
CurrentJobHandle
The job handle for the current planning jobs.
Declaration
JobHandle CurrentJobHandle { get; }
Property Value
Type | Description |
---|---|
JobHandle |
CurrentPlanRequest
The current plan request for which the planning jobs are scheduled.
Declaration
IPlanRequest CurrentPlanRequest { get; }
Property Value
Type | Description |
---|---|
IPlanRequest |
Methods
RequestPlan(IStateKey, Action<IPlan>, PlannerSettings)
Initiates and returns a new plan request.
Declaration
IPlanRequest RequestPlan(IStateKey rootState, Action<IPlan> onRequestComplete = null, PlannerSettings settings = null)
Parameters
Type | Name | Description |
---|---|---|
IStateKey | rootState | The root or initial state of the plan |
Action<IPlan> | onRequestComplete | A callback to be invoked once the request has completed |
PlannerSettings | settings | Settings to configure the planning process |
Returns
Type | Description |
---|---|
IPlanRequest | Returns the plan request to run |
Schedule(JobHandle, Boolean)
Schedules a single iteration of the planning process.
Declaration
JobHandle Schedule(JobHandle inputDeps, bool forceComplete)
Parameters
Type | Name | Description |
---|---|---|
JobHandle | inputDeps | |
Boolean | forceComplete | Option to force the completion of the previously scheduled planning jobs. |
Returns
Type | Description |
---|---|
JobHandle |
SetCumulativeRewardEstimator<TEstimator>(TEstimator)
Assigns the cumulative reward estimator to be used by the planner. This procedure will reset the current plan.
Declaration
void SetCumulativeRewardEstimator<TEstimator>(TEstimator estimator)
where TEstimator : struct, ICumulativeRewardEstimator
Parameters
Type | Name | Description |
---|---|---|
TEstimator | estimator | The instance of the cumulative reward estimator to be used. |
Type Parameters
Name | Description |
---|---|
TEstimator | The type of cumulative reward estimator. If an incorrect type is used, an error will be logged. |
SetTerminationEvaluator<TEvaluator>(TEvaluator)
Assigns the state termination evaluator to be used by the planner. This procedure will reset the current plan.
Declaration
void SetTerminationEvaluator<TEvaluator>(TEvaluator evaluator)
where TEvaluator : struct, ITerminationEvaluator
Parameters
Type | Name | Description |
---|---|---|
TEvaluator | evaluator | The instance of the state termination evaluator to be used. |
Type Parameters
Name | Description |
---|---|
TEvaluator | The type of termination evaluator. If an incorrect type is used, an error will be logged. |
UpdatePlanRequestRootState(IStateKey)
Sets the starting state of the current plan request to the specified state.
Declaration
void UpdatePlanRequestRootState(IStateKey newRootState)
Parameters
Type | Name | Description |
---|---|---|
IStateKey | newRootState | The key for the new root state of the plan. |