C# Class Nez.AI.GOAP.ActionPlanner

GOAP based on https://github.com/stolk/GPGOAP
Show file Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
conditionNames string[]

Public Methods

Method Description
ActionPlanner ( ) : System.Text
addAction ( Action action ) : void
createWorldState ( ) : WorldState

convenince method for fetching a WorldState object

describe ( ) : string

Describe the action planner by listing all actions with pre and post conditions. For debugging purpose.

plan ( WorldState startState, WorldState goalState, List selectedNodes = null ) : Stack

Private Methods

Method Description
applyPostConditions ( ActionPlanner ap, int actionnr, WorldState fr ) : WorldState
findActionIndex ( Action action ) : int
findConditionNameIndex ( string conditionName ) : int
getPossibleTransitions ( WorldState fr ) : List

Method Details

ActionPlanner() public method

public ActionPlanner ( ) : System.Text
return System.Text

addAction() public method

public addAction ( Action action ) : void
action Action
return void

createWorldState() public method

convenince method for fetching a WorldState object
public createWorldState ( ) : WorldState
return WorldState

describe() public method

Describe the action planner by listing all actions with pre and post conditions. For debugging purpose.
public describe ( ) : string
return string

plan() public method

public plan ( WorldState startState, WorldState goalState, List selectedNodes = null ) : Stack
startState WorldState
goalState WorldState
selectedNodes List
return Stack

Property Details

conditionNames public property

Names associated with all world state atoms
public string[] conditionNames
return string[]