C# Class UnityAI.Core.Fuzzy.FuzzyRule

Mostrar archivo Open project: unityai/unityai-core Class Usage Examples

Public Methods

Method Description
FuzzyRule ( FuzzyRuleBase rb, string name, FuzzyClause lhsClauses, FuzzyClause rhs ) : System

Create a new Fuzzy Rule

ToString ( ) : string

String Value of this Rule

Private Methods

Method Description
AddRdReference ( int id ) : void

Adds to variables references by this rule

AddWrReference ( int id ) : void

Adds to variables set by this rule

Fire ( double alphaCut, System workingSet ) : void

If this is an unconditional rule (there are no antecedents), simply evaluates the consequent for its side-effects.

If this is a conditional rule (there are antecedents), evaluates the antecedents:

  • If the value of an antecedent clause is below the alphacut threshold, the rule does not fire.
  • Keep track of the minimum truthvalue returned when evaluating each antecedent clause.
  • Pass the minimum to the correlation method ('eval' on the consequent clause).
  • Update working memory to show that the variable in the consequent clause has changed.

FuzzyRule ( FuzzyRuleBase rb, string name, FuzzyClause rhs ) : System

Create a new Fuzzy Rule

Reset ( ) : void

Resets the Rule

Method Details

FuzzyRule() public method

Create a new Fuzzy Rule
public FuzzyRule ( FuzzyRuleBase rb, string name, FuzzyClause lhsClauses, FuzzyClause rhs ) : System
rb FuzzyRuleBase
name string
lhsClauses FuzzyClause
rhs FuzzyClause
return System

ToString() public method

String Value of this Rule
public ToString ( ) : string
return string