Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
conditions in each rule. Notice, too, that the into fuzzy rules. While there are algorithms (WokeUpThisMorning and NapLength)
fuzzy logic system is completely for deriving the fuzzy rules from data, here that predicts when the kids will become
deterministic: when given the same inputs we are only concerned with the more usual sleepy (BedTime). In contrast to the last
twice, its output will be exactly the same. method of building them manually. example, in which the fuzzy contrast
While a statistical regression or neural enhancer made a decision (that is
network could have solved this problem, An Example with Two Inputs “correct” only in terms of the policy we
they (in contrast to the fuzzy rule-based In my home, one daily challenge is created), this system makes a prediction
system) require an extensive set of examples putting the kids to bed. We have found (subject to some inaccuracies when
from which to learn the appropriate that putting children to bed when they compared to the actual experience).
mapping of pixel brightness from low- are ready to fall asleep helps. We have also The input, WokeUpThisMorning is
contrast to high-contrast. Fuzzy rules, on the found that when they are ready to fall the number of hours since midnight. In
other hand, mimic an existing base of asleep depends on (among other things) other words, if the child woke at 8:30am,
human knowledge. Construction of the when they woke up this morning (which WokeUpThisMorning is 8.5. The other
fuzzy rule base does not require an extensive indicates roughly how much sleep they input variable, NapLength, indicates the
database of “correct” mappings from input received the previous night) and how long length of the afternoon nap in hours. The
to output (although these would be helpful they napped during the afternoon. time to be predicted, BedTime, indicates
in validating its performance). Instead, it Consulting an expert (my wife), I built a hours after noon (8.75 would mean
requires some type of knowledge to translate fuzzy logic system using these two inputs 8:45pm). As in the previous example, we
fuzzy terms each, yielding a maximum of and (NapLength is Short) in the fuzzy rule editor of the Fuzzy Logic
nine possible combinations with one term then (BedTime is Early) Toolbox. The expert on children’s bed times
from each variable. Nine rules are not If (WokeUpThisMorning is Normal) is not an expert in fuzzy logic (although she
difficult to manage, but consider how and (NapLength is Normal) is a mechanical engineer), but she had no
unwieldy four input variables with seven then (BedTime is Normal) difficulty defining the fuzzy terms or the
terms each would be, with potentially 2,401 If (WokeUpThisMorning is Normal) fuzzy rules. In this case, we used trapezoidal
distinct rules! There is no requirement to and (NapLength is Long) shapes to specify the fuzzy terms and the
define every possible rule at this level of then (BedTime is Late) system output was verified as producing
granularity. Since this system is so small, it If (WokeUpThisMorning is Late) appropriate (reasonably accurate) predictions
was developed with all 9 combinations: and (NapLength is Short) (see figure 4 for a graph of the system’s
If (WokeUpThisMorning is Early) then (BedTime is Early) output).
and (NapLength is Short) If (WokeUpThisMorning is Late) Though simple, this example
then (BedTime is Early) and (NapLength is Normal) illustrates the interaction of inputs in the
If (WokeUpThisMorning is Early) then (BedTime is Late) fuzzy rule base and is extensible to much
and (NapLength is Normal) If (WokeUpThisMorning is Late) larger problems. Again, not every possible
then (BedTime is Normal) and (NapLength is Long) fine-grained combination of input terms
If (WokeUpThisMorning is Early) then (BedTime is Late) needs its own rule. One rule may cover
and (NapLength is Long) These rules capture the relevant many such combinations. For instance,
then (BedTime is Late) knowledge in a very natural manner. These we can replace rules 3, 6 and 9 above by
If (WokeUpThisMorning is Normal) rules have been listed exactly as they appear the single rule “If(NapLength is Long)