C# Class UnityAI.Core.Planning.PartialOrderPlan

Show file Open project: unityai/unityai-core Class Usage Examples

Public Methods

Method Description
AddAction ( Action action ) : void

Add an Action to the Plan

AddCausalLink ( Action from, Predicate achieves, Action to ) : void

Add a Causal Link

AddOrderingConstraint ( Action before, Action after ) : void

Add an Ordering Constraint

PartialOrderPlan ( IEnumerable initState, IEnumerable goalState ) : System

Partial Order Plan

PickOpenPrecondition ( ) : ActionPredicatePair

Randomly pick an open precondition

RemoveAction ( Action action, ActionPredicatePair actionPredicatePair ) : void

Remove the Action

Private Methods

Method Description
CheckLoop ( Action before, Action after ) : bool

Check for a loop

CheckPlanConsistent ( Action action ) : void

Check the Plan for Consistency

SortAction ( ) : List

TODO: Just temporary sort action method

Method Details

AddAction() public method

Add an Action to the Plan
public AddAction ( Action action ) : void
action Action Action to Add
return void

AddCausalLink() public method

Add a Causal Link
public AddCausalLink ( Action from, Predicate achieves, Action to ) : void
from Action From Action
achieves Predicate The Predicate that Achieves
to Action To Action
return void

AddOrderingConstraint() public method

Add an Ordering Constraint
public AddOrderingConstraint ( Action before, Action after ) : void
before Action Before Action
after Action After Action
return void

PartialOrderPlan() public method

Partial Order Plan
public PartialOrderPlan ( IEnumerable initState, IEnumerable goalState ) : System
initState IEnumerable Init State
goalState IEnumerable Goal State
return System

PickOpenPrecondition() public method

Randomly pick an open precondition
public PickOpenPrecondition ( ) : ActionPredicatePair
return ActionPredicatePair

RemoveAction() public method

Remove the Action
public RemoveAction ( Action action, ActionPredicatePair actionPredicatePair ) : void
action Action Action to Remove
actionPredicatePair ActionPredicatePair Action-Predicate Pair
return void