DecisionFlex
Utilty AI for Unity
 All Classes Namespaces Functions Variables Events Pages
Public Types | Public Member Functions | List of all members
TenPN.DecisionFlex.ContextFactory Class Referenceabstract

Produces IContext objects, used to evaulate UtilityConsiderations when making decisions. More...

Inheritance diagram for TenPN.DecisionFlex.ContextFactory:
TenPN.DecisionFlex.Demos.WeaponSelectionContextFactory TenPN.DecisionFlex.SingleContextFactory TenPN.DecisionFlex.Demos.AttributeContextFactory TenPN.DecisionFlex.Demos.UFOContextFactory

Public Types

enum  Logging { Enabled, Disabled }
 

Public Member Functions

abstract IList< IContextAllContexts (Logging loggingSetting)
 

Detailed Description

Produces IContext objects, used to evaulate UtilityConsiderations when making decisions.

Populate your IContext objects with the data and details that help your UtilityConsiderations produce scores.

You can return more than one consideration, which is useful for pairing targets with decisions, eg targets and weapons. Each will be scored against all your actions seperately. See WeaponSelectionContextFactory for an example. If you want to return just one context, you may prefer to use SingleContextFactory instead.

Member Function Documentation

abstract IList<IContext> TenPN.DecisionFlex.ContextFactory.AllContexts ( Logging  loggingSetting)
pure virtual
Returns
a list of IContext objects, each of which will be scored against the decision's actions seperately.
Parameters
loggingSettingif Logging.Enabled, DecisionFlex::m_isLoggingEnabled is true. You should print or display some debugging info.

Implemented in TenPN.DecisionFlex.Demos.WeaponSelectionContextFactory, and TenPN.DecisionFlex.SingleContextFactory.


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