Grail (C#)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Planners.ActionTemplate Class Reference

A class representing an action that can be simulated by a planner. More...

Public Member Functions

delegate bool PreconditionFunction (List< WorldObject > worldObjects, WorldState state)
 
delegate void EffectFunction (List< WorldObject > worldObjects, WorldState state)
 
delegate float CostFunction (List< WorldObject > worldObjects, WorldState state)
 
 ActionTemplate (string name, List< int > actionParameterTypes)
 
List< ActionGenerateActions (WorldState state)
 

Public Attributes

string Name => name
 

Properties

PreconditionFunction Preconditions [get, set]
 
EffectFunction Effects [get, set]
 
CostFunction Cost [get, set]
 
int TypeID [get, set]
 

Detailed Description

A class representing an action that can be simulated by a planner.

Property Documentation

◆ Cost

CostFunction Grail.Planners.ActionTemplate.Cost
getset

A function returning execution cost of the action, given a world state Represented as a function returing a number representing the action's cost, accepting a vector of action arguments (WorldObjects) and the current WorldState reference

◆ Effects

EffectFunction Grail.Planners.ActionTemplate.Effects
getset

A function applied to a world state each time this action is performed in a planner iteration Represented as a function returning void and accepting a vector of action arguments (WorldObjects) and the current WorldState reference

◆ Preconditions

PreconditionFunction Grail.Planners.ActionTemplate.Preconditions
getset

A precondition function that will be checked to verify legality of the action. Represented as a boolean function accepting a vector of action arguments (WorldObjects) and the current WorldState reference


The documentation for this class was generated from the following file: