GOBActionNode is a special action type for GoalOrientedBehavior. GOBActionNodes are used to predict the change in world state caused by execution of their associated actions. The predictions are fed into the goal evaluation step and used to calculate an overall utility. GOB then chooses an action based on maximum overall utility. More...
Public Member Functions | |
GOBActionNode (string nodeName) | |
Even though GOBActionNode is built as a decorator, we want it to appear similar to a regular node. Unlike regular decorators, it can have its own name. | |
void | SetAction (BTNode child) |
Set the action that should be performed when this GOBAction is selected. | |
override void | AddChild (BTNode child) |
AddChild for GOBActionNode simply sets the single child action to be taken. | |
override void | RemoveChild (string actionName) |
RemoveChild for GOBActionNode simply sets the single child onde to null. It does not bother to check that the actionName matches. | |
override ActionResult | Start (Core.Agent agent, float deltaTime) |
Action.Start passthrough. | |
override ActionResult | Execute (Core.Agent agent, float deltaTime) |
Action.Execute passthrough. | |
override ActionResult | Stop (Core.Agent agent, float deltaTime) |
Action.Stop passthrough. | |
ActionContext | CalculateUtilities (float deltaTime) |
CalculateUtilities creates a new ActionContext with the expected future value of variables after taking this GOBAction. Time based variables use deltaTime for t. | |
bool | CanActivate (float deltaTime) |
CanActivate determines whether this GOBAction is available. | |
Public Attributes | |
const string | NODETYPE = "task" |
float | lastScore |
The last score associated with this Action in overall GOB execution. | |
bool | lastCanActivate |
A marker indicating whether the GOBAction could activate during the last evaluation. | |
Protected Attributes | |
BTNode | actionNode = null |
We only allow a single child node, similar to a decorator. |
GOBActionNode is a special action type for GoalOrientedBehavior. GOBActionNodes are used to predict the change in world state caused by execution of their associated actions. The predictions are fed into the goal evaluation step and used to calculate an overall utility. GOB then chooses an action based on maximum overall utility.
GOBActionNode has been designed to fit into the BehaviorTree structure and can be used as a description of otherwise regular behavior tree nodes
RAIN.GOB.GOBTree.GOBActionNode.GOBActionNode | ( | string | nodeName | ) |
Even though GOBActionNode is built as a decorator, we want it to appear similar to a regular node. Unlike regular decorators, it can have its own name.
nodeName |
override void RAIN.GOB.GOBTree.GOBActionNode.AddChild | ( | BTNode | child | ) | [virtual] |
AddChild for GOBActionNode simply sets the single child action to be taken.
child | The new child |
Reimplemented from RAIN.BehaviorTrees.BTNode.
ActionContext RAIN.GOB.GOBTree.GOBActionNode.CalculateUtilities | ( | float | deltaTime | ) |
CalculateUtilities creates a new ActionContext with the expected future value of variables after taking this GOBAction. Time based variables use deltaTime for t.
deltaTime | The time used for t in embedded expressions |
bool RAIN.GOB.GOBTree.GOBActionNode.CanActivate | ( | float | deltaTime | ) |
CanActivate determines whether this GOBAction is available.
deltaTime | A timestep to use when evaluating conditionals |
override ActionResult RAIN.GOB.GOBTree.GOBActionNode.Execute | ( | Core.Agent | agent, |
float | deltaTime | ||
) |
Action.Execute passthrough.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
override void RAIN.GOB.GOBTree.GOBActionNode.RemoveChild | ( | string | actionName | ) | [virtual] |
RemoveChild for GOBActionNode simply sets the single child onde to null. It does not bother to check that the actionName matches.
actionName | Name of the child node to remove |
Reimplemented from RAIN.BehaviorTrees.BTNode.
void RAIN.GOB.GOBTree.GOBActionNode.SetAction | ( | BTNode | child | ) |
Set the action that should be performed when this GOBAction is selected.
child |
override ActionResult RAIN.GOB.GOBTree.GOBActionNode.Start | ( | Core.Agent | agent, |
float | deltaTime | ||
) |
Action.Start passthrough.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
override ActionResult RAIN.GOB.GOBTree.GOBActionNode.Stop | ( | Core.Agent | agent, |
float | deltaTime | ||
) |
Action.Stop passthrough.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
BTNode RAIN.GOB.GOBTree.GOBActionNode.actionNode = null [protected] |
We only allow a single child node, similar to a decorator.
A marker indicating whether the GOBAction could activate during the last evaluation.
The last score associated with this Action in overall GOB execution.