Interface IGoapPlanner
The GOAP Planner is the "final product" that
the agents use to obtain their action plan. This
components weights the different actions available
against each other and returns the cheapest action
plan (if one could be computed)
Namespace: Mars.Components.Services.Planning
Assembly: Mars.Components.dll
Syntax
public interface IGoapPlanner
Properties
| Improve this Doc View SourceGoals
All goals are managed here
Declaration
IList<IGoapGoal> Goals { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IGoapGoal> |
Methods
| Improve this Doc View SourceAddAction(IGoapAction)
Add new actions to the available action list
Declaration
void AddAction(IGoapAction action)
Parameters
Type | Name | Description |
---|---|---|
IGoapAction | action | the new action |
AddGoal(IGoapGoal)
Add a new goal to the planner
Declaration
void AddGoal(IGoapGoal goal)
Parameters
Type | Name | Description |
---|---|---|
IGoapGoal | goal | the new goal |
Plan()
Centerpiece of the planner. This weights the actions
against each other and returns the action list the
agentStates will perform
Declaration
IList<IGoapAction> Plan()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<IGoapAction> | A list of actions if a executable path through the action tree could be found, otherwise a list with a single element, which indicates the reason why no plan of actions could be found. |
Plan(IGoapGoal[])
Alternative method to find a plan for given goals. Added goals of the planner are ignored.
Declaration
IList<IGoapAction> Plan(params IGoapGoal[] goals)
Parameters
Type | Name | Description |
---|---|---|
IGoapGoal[] | goals |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<IGoapAction> | A list of actions if a executable path through the action tree could be found, otherwise a list with a single element, which indicates the reason why no plan of actions could be found. |
RemoveAction(IGoapAction)
Remove an action from the list of available actions
Declaration
void RemoveAction(IGoapAction action)
Parameters
Type | Name | Description |
---|---|---|
IGoapAction | action | the action to remove |
RemoveGoal(IGoapGoal)
Remove a goal from the planner
Declaration
void RemoveGoal(IGoapGoal goal)
Parameters
Type | Name | Description |
---|---|---|
IGoapGoal | goal | the goal to remove |