Fuzzy associative matrix
Encyclopedia
A fuzzy associative matrix expresses fuzzy logic
Fuzzy logic
Fuzzy logic is a form of many-valued logic; it deals with reasoning that is approximate rather than fixed and exact. In contrast with traditional logic theory, where binary sets have two-valued logic: true or false, fuzzy logic variables may have a truth value that ranges in degree between 0 and 1...

 rules in tabular form. These rules usually take two variables as input, mapping cleanly to a two-dimensional matrix, although theoretically a matrix of any number of dimensions is possible.

Let's suppose we want to write fuzzy logic rules for a video game monster. We decide to start with two variables: hit points (HP) and firepower (FP). We might start with this:
HP/FP Very low HP Low HP Medium HP High HP Very high HP
Very weak FP Retreat! Retreat! Defend Defend Attack
Weak FP Retreat! Defend Defend Attack Attack
Medium FP Retreat! Defend Attack Attack Full attack!
High FP Retreat! Defend Attack Attack Full attack!
Very high FP Defend Attack Attack Full attack! Full attack!


This translates to:

IF MonsterHP IS VeryLowHP AND MonsterFP IS VeryWeakFP THEN Retreat
IF MonsterHP IS LowHP AND MonsterFP IS VeryWeakFP THEN Retreat
IF MonsterHP IS MediumHP AND MonsterFP is VeryWeakFP THEN Defend

...and so on. Multiple rules can fire at once, and very often, they will. The distinction between "very low" and "low" is probably fuzzy at many points, and at such points, both rules will fire. If it is more "very low" than it is low, then the "very low" rule will generate a stronger response. The program will evaluate all the rules that fire and use an appropriate defuzzification
Defuzzification
Defuzzification is the process of producing a quantifiable result in fuzzy logic, given fuzzy sets and corresponding membership degrees. It is typically needed in fuzzy control systems. These will have a number of rules that transform a number of variables into a fuzzy result, that is, the result...

 method to generate its actual response.

An implementation of this system might use either the matrix or the explicit IF/THEN form. The matrix makes it easy to visualize the system, but it also makes it impossible to add a third variable just for one rule, so it is less flexible.

There is no inherent pattern in the matrix. It appears as if the rules were just made up, and indeed they were. This is both a strength and a weakness of fuzzy logic in general. It is often impractical or impossible to find an exact set of rules or formulae for dealing with a specific situation. For a sufficiently complex game, a mathematician would not be able to study the system and figure out a mathematically accurate set of rules. However, this weakness is intrinsic to the realities of the situation, not of fuzzy logic itself. The strength of the system is that even if one of the rules is wrong, even greatly wrong, other rules that are correct are likely to fire as well and they may compensate for the error.

This does not mean a fuzzy system should be sloppy. Depending on the system, it might get away with being sloppy, but it will underperform. While the rules are fairly arbitrary, they should be chosen carefully. If possible, an expert should decide on the rules, and the sets and rules should be tested vigorously and refined as needed. In this way, a fuzzy system is like an expert system
Expert system
In artificial intelligence, an expert system is a computer system that emulates the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, like an expert, and not by following the procedure of a developer as is the case in...

. (Fuzzy logic is used in many true expert systems, as well.)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK