Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_fuzzy

Plugin, ACE table, Discussion thread
Dependence: None

Introduction
Calculation of fuzzy logic. It includes fuzzification, and fuzzy logic, but it does not have defuzzification part.

Usage
Sample capx
Define membership
Call "Action:0. Define membership (3 levels)", or "Action:0. Define membership (5 levels)", or "Action:0. Define membership (7 levels)" to define the memberships of an input variable.
图片
Memberships with 3 levels
Define rule
Call "Action:Add" under category of "0. Define rule", to add rule of fuzzy.
The definition of each rule is a string which composed by "Expression:AND", or "Expression:OR", or "Expression:NOT". Parameters of these expression is the membership of input variable, which is one of
  • "+++VAR" :  Positive Big
  • "++VAR" : Positive Medium
  • "+VAR" :  Positive Small
  • "VAR" : Zero
  • "-VAR" :  Negative Small
  • "--VAR" :  Negative Medium
  • "---VAR" :  Negative Big
User could add rule with the same name more then once, rules with the same name would be calculated by fuzzy-OR operation.
图片
Re-define rules
"Action:Clean all", or "Action:Clean" could be used to clean the rule(s), to re-define rules.
Input
Call "Action:Set variable value" to set variable.
Output
  1. After variables set, call "Action:Execute rules" to calculate grade of these rules in-order. The result of rule (i.e. grade of rule, a value between 0~1) will also become an input variable if it has been defined by "Action: Define membership".
  2. Get the grade of rule by "Expression:OutputGrade".
User need to defuzzify the result by himself.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About