Crystal AI  1.0.0
Crystal.IBehaviour Interface Reference

Interface to Behaviours. More...

Inheritance diagram for Crystal.IBehaviour:
Crystal.ICompositeConsideration Crystal.IConsideration Crystal.IAiPrototype< IConsideration > Crystal.Behaviour

Public Member Functions

bool AddOption (string optionId)
 Adds the option associated with optionId, if one exists. More...
 
IAction Select (IContext context)
 Selects an T:Crystal.IOption from this behaviour and returns its associated action. More...
 
- Public Member Functions inherited from Crystal.ICompositeConsideration
bool AddConsideration (IConsideration consideration)
 Add the specified consideration. More...
 
bool AddConsideration (string considerationId)
 Add the consideration associated with the given Id. More...
 
- Public Member Functions inherited from Crystal.IConsideration
void Consider (IContext context)
 Calculates the utility given the specified context. More...
 
- Public Member Functions inherited from Crystal.IAiPrototype< IConsideration >
Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 

Properties

ISelector Selector [get, set]
 T:Crystal.ISelector More...
 
- Properties inherited from Crystal.ICompositeConsideration
IMeasure Measure [get, set]
 The measure to be used to evaluate the utility of this consideration. More...
 
- Properties inherited from Crystal.IConsideration
string NameId [get]
 A unique named identifier for this consideration. More...
 
Utility DefaultUtility [get, set]
 Gets or sets the default utility. More...
 
Utility Utility [get]
 Returns the utility for this consideration. More...
 
float Weight [get, set]
 The weight of this consideration. More...
 
bool IsInverted [get, set]
 If true, then the output of the associated evaluator is inverted, in effect, inverting the consideration. More...
 

Detailed Description

Interface to Behaviours.

See also
T:Crystal.ICompositeConsideration

Member Function Documentation

bool Crystal.IBehaviour.AddOption ( string  optionId)

Adds the option associated with optionId, if one exists.

Parameters
optionIdThe option identifier.
Returns
Returns true if the option was successfully added, false otherwise.

Implemented in Crystal.Behaviour.

IAction Crystal.IBehaviour.Select ( IContext  context)

Selects an T:Crystal.IOption from this behaviour and returns its associated action.

Parameters
contextThe context.
Returns
The action associated with the selected option.

Implemented in Crystal.Behaviour.

Property Documentation

ISelector Crystal.IBehaviour.Selector
getset

T:Crystal.ISelector

The selector used in this behaviour. Note this cannot be null and because of this if a null value set is attempted this is simply ignored and the previous value is retained.


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