![]() |
Grail (C#)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
An abstract class to implement that is responsible for translating an in-game world state to a plan-space world state. and from abstract plan to behavior sequence
It serves as a translation layer between the planning AI and the rest of the game.
More...
Public Member Functions | |
| DomainTranslator (bool isDomainReusable=true) | |
| Constructs a DomainTranslator instance. More... | |
| abstract Plan | TranslatePlan (AIEntity entity, Planner.AbstractPlan plan, Goal goal) |
| Creates a Behavior-based plan to apply in the game based on the plan constructed in the abstract planning space. Keep in mind that a single Action does not have to correspond to a single Behavior - your plan translation logic can be arbitrary. More... | |
| WorldState | GetWorldState (AIEntity entity, Goal goal) |
Protected Member Functions | |
| abstract List< IPlannerObject > | GeneratePlannerObjects (AIEntity entity, Goal goal) |
| abstract List< WorldObjectType > | CreateObjectTypes (AIEntity entity, Goal goal) |
| abstract void | AddActionTemplates (AIEntity entity, Domain domain, Goal goal) |
| virtual void | SetWorldStateParameters (AIEntity entity, WorldState state, Goal goal) |
Inside this method, the initial WorldState parameters should be set. Use state.SetParameter. More... | |
Properties | |
| ObjectIndexBinding | Binding [get] |
| Returns the (IPlannerObject <-> WorldObject) index binding. More... | |
An abstract class to implement that is responsible for translating an in-game world state to a plan-space world state. and from abstract plan to behavior sequence
It serves as a translation layer between the planning AI and the rest of the game.
|
inline |
Constructs a DomainTranslator instance.
| isDomainReusable | if set to true, the planner will assume that the planning domain remains constant and can be reused - as a result addActionTemplates and createObjectTypes will be invoked only once. |
|
protectedpure virtual |
Inside this method, action templates for all possible actions should be added to the Domain. Use Domain.AddActionTemplate
|
protectedpure virtual |
|
protectedpure virtual |
This method should return a vector of IPlannerObject instances that correspond to in-game objects. An ObjectIndexBinding instance will be created from the returned objects.
|
inlineprotectedvirtual |
Inside this method, the initial WorldState parameters should be set. Use state.SetParameter.
| entity | The AIEntity which uses the planner. |
| state | The current state in the planning space. |
| goal | The goal to plan actions to. |
|
pure virtual |
Creates a Behavior-based plan to apply in the game based on the plan constructed in the abstract planning space.
Keep in mind that a single Action does not have to correspond to a single Behavior - your plan translation logic can be arbitrary.
| entity | The AIEntity that utilizes planning for behavior selection. |
| plan | The abstract plan (from the planning space). |
| goal | The goal for which the plan was constructed. |
|
get |
Returns the (IPlannerObject <-> WorldObject) index binding.