create account | help/FAQ | contact | links | search | IRC | site news
 Everything Diaries Technology Science Culture Politics Media News Internet Op-Ed Fiction Meta MLP

 Fuzzy Logic (For Real This Time) By kraant in NewsMon Apr 10, 2000 at 09:22:51 AM EST Tags: Science (all tags) Since there was some interest shown and no-one is posting any articles lately. Here is a simple explanation of fuzzy logic. Enjoy :)

History

Fuzzy Logic was a theory invented by Dr Lotfi Zadeh to handle the inevitable uncertanty in complex systems in 1965.

Originaly fuzzy logic was a linguistic alternative to the "numerical" analysis of conventional logic (making the article that inspired this one more accurate in a historical sense than the people who wrote it thought.

In 1968 Dr Zadeh introduced the concept of the truth/falsehood being represented as a probablity which is still the definition most people have in mind when they think of fuzzy logic.

Largely ignored by the west for over 30 years fuzzy logic found many proponents in japan who developed various practical uses for it. Lately western academia and corporations have finaly sat up and taken notice.

As it stands Dr Zadeh prefers to think of fuzzy theory as a methodology for "fuzzifying" any system that produces a discrete result. (Such as calculus)

Theory

Imagine a set of say these vowels

F={"a", "e", "i", "o"}

The statement "There are consonants in set F" is false

The probability of there being consonants in set F is 0

The statement "Set F contains an 'a'" is true

The probability of F having an 'a' is 1

As can be seen there is a direct corrospondance between the truth/falsehood of a statement and its probability.

Now say that the set F was less well defined... Like the set F is comprised of vowels and definetly contains "a" however it is uncertain which other vowels are contained within.

Then the person figuring out the truth or falsehood of the various statements would have to figure out the probabilities of the various vowels being in the set F so they would be able to figure out how true as a probability between 0 and 1 any statements about set F would be.

This is how the discrete values 0 and 1 are fuzzed into a continuous form.

Uses
One of the first practical uses for fuzzy logic was for making better washing machines. This was by a japanese company as for a long time fuzzy logic was largely ignored in the western world due to "fuzzy" being viewed as a perjorative. Nowdays however fuzzy logic is used in everything from Artificial Life and Artificial Intelligence to Cameras and rice cookers.

I hope you all found this article informative and useful. A good place to continue learning about of Fuzzy Logic would be the comp.ai.fuzzy which has a very informative fuzzy logic FAQ from which much can be learnt.

Daniel

 Display: Threaded Minimal Nested Flat Flat Unthreaded Sort: Unrated, then Highest Highest Rated First Lowest Rated First Ignore Ratings Newest First Oldest First
 Fuzzy Logic (For Real This Time) | 12 comments (12 topical, editorial, 0 hidden)
 Info about fuzzylogic is good. Alth... (none / 0) (#1) by Zer0 on Mon Apr 10, 2000 at 06:22:45 AM EST

 Zer0 voted 1 on this story.Info about fuzzylogic is good. Altho i dont wish to program in it anytime soon. However, i have used Sets many a time in delphi, yet i fail understand your example on how it applys to fuzylogic (seems Logic to me!). Either that or its just probability math (which is still straight forward logic)
 Re: Info about fuzzylogic is good. Alth... (4.00 / 1) (#4) by fluffy grue on Mon Apr 10, 2000 at 10:12:38 AM EST

 Delphi sets are pure discrete mathematical (unordererd) sets, which would be good for logic programming if it weren't for the fact that, if they're unchanged from the Turbo Pascal days, they're fixed in size to 256 elements and can thus only use byte-sized data (chars, for example). They can't directly be used for fuzzy logic, which require that there be a pair of data for each member of the set, namely the value and the probability of being in there, though that can be worked around by having a set and an array[0..255] of real. However, fuzzy sets aren't the be-all end-all of fuzzy logic. Really, fuzzy logic is an extension of boolean logic, where instead of just 'true' and 'false' you have a range of probabilities. The 'and' operation is implemented through min, the 'or' operation is implemented through max. (Note that this is different than the way you operate on statistical probabilities, where the equivalent of 'A and B' is A*B and the equivalent of 'A or B' is 1-(1-A)*(1-B), because this is about levels of certainty and not predictions of events.) There are two things you can do with fuzzy-logic results in a system. Either the system requires discrete values, in which case you "defuzzify" (not my term, but it's what I'd call it to) by setting a threshold between true and false, or perhaps extending the system to accept "maybe" as an answer (so you could have [0...1/2,1/2...1] -> [false,true] or [0...3/8,3/8...5/8,5/8...1] -> [false,maybe,true]), or you could just work with the fuzzy values directly. For example, if you have a robotic system which is using a fuzzy logic-based motion planner, you can use the outputs of the fuzzy system as weightings for combining different movement rules. Hopefully this is a bit more accurate and well-rounded than the (IMO VERY incomplete) writeup given by kraant. --"Is not a quine" is not a quine.I have a master's degree in science![ Hug Your Trikuare ] [ Parent ]
 Re: Info about fuzzylogic is good. Alth... (3.00 / 1) (#6) by ramses0 on Mon Apr 10, 2000 at 12:45:27 PM EST

 You might appreciate this comment which describes some of fuzzy logic. eh... i'll just reproduce it here (hope nobody minds ;^)= I've hung out in the comp.ai.games for a while, and feel thus somewhat qualified to summarize fuzzy logic. Instead of "yes" or "no", being the only choices to describe something, you have a "percentage chance of this being the case". The easiest to understand example is with a boolean variable called "is_tall". I'm 6'2", so with standard boolean logic, "is_tall = TRUE;" is what you would type. Under fuzzy logic, you'd probably say... "fl_is_true = 90%;", which basically says: "90% of the time, yes, this person is tall". So fuzzy logic mean: "assigning probabilities to an event", and when you finally try to evaluate a fuzzy-logic statement, all of the probabilities collapse to give you a "true" or a "false" Another example: if( fl_is_tall ) { print "I think you're tall"; } else { print "You must be standing around basketball players"; } It is used in game AI to add some "non-determinism" to the game... I guess the theory is that every once in a while, the random "oops" (if examined logically) might give you the correct choice. Check out question number two on this fuzzy logic faq is really interesting, and it goes over the AND/OR/NOT operators and how it affects probabilities. And Steve Woodcock's Game AI Page is considered the #1 stopping point for AI and games. Check it out. --Robert [ rate all comments , for great justice | sell.com ][ Parent ]
 Re: Info about fuzzylogic is good. Alth... (2.00 / 1) (#8) by fluffy grue on Mon Apr 10, 2000 at 02:28:22 PM EST

 Fuzzy logic is useful for a hell of a lot more than nondeterminism in games. In fact, nondeterminism in games is best left to good ol' probability, rather than fuzzy logic. Fuzzy logic isn't random or nondeterministic. It's great for control systems (such as thermostats, car engine computers, nuclear reactors, bologna slicers, etc.) and for expert systems (which are really an abstraction of control systems). Anything you garner from comp.ai.games will be horribly skewed. :) --"Is not a quine" is not a quine.I have a master's degree in science![ Hug Your Trikuare ] [ Parent ]
 The probability of the set "Slashdo... (3.00 / 1) (#3) by inspire on Mon Apr 10, 2000 at 08:18:55 AM EST

 inspire voted 1 on this story.The probability of the set "Slashdot comments" containing a "hot grits troll" is 1. -- What is the helix?
 metacomment: Well, it's not the bes... (none / 0) (#2) by eann on Mon Apr 10, 2000 at 09:09:40 AM EST

 eann voted 1 on this story.metacomment: Well, it's not the best explanation I've ever heard, but I'm lazy...er...busy enough that I don't feel like trying to do better. :) Fuzzy systems are very interesting; I'd love to see some discussion about how they could be applied to improve UIs, etc. metacomet: a mountain in northern Connecticut. Our scientific power has outrun our spiritual power. We have guided missiles and misguided men. —MLK \$email =~ s/0/o/; # The K5 cabal is out to get you.
 Re: Fuzzy Logic (For Real This Time) (4.00 / 1) (#5) by Matthew Guenther on Mon Apr 10, 2000 at 10:20:47 AM EST

 They've been doing a lot with fuzzy logic in autonomous manufacturing facilities, with an eye for using it in space exploration. A paper I was reading described an prototype for an oxygen production plant on Mars using fuzzy logic controllers. To test it they left it out the middle of the desert for a while, and during that time a lightening storm swept over it and fried some circuits and instrumentation. The fuzzy logic controller was apparently "smart" enough to know that it had been damaged and the data it was recieving from it's sensors was probably wrong. It gave up control of the plant and the fail-safe systems were able execute a controlled shutdown, saving the facility. This surprised the experimenters as this was not a situation they had explicitly programmed the controller to respond to. Situations like this illustrates why fuzzy logic and neural nets have a big future. Although they're not actually artificial intelligence, they are generally intelligent enough to do many useful things, and without human intervention. And they're a whole lot easier to implement. MBG
 Re: Fuzzy Logic (For Real This Time) (3.00 / 1) (#7) by dgfitch on Mon Apr 10, 2000 at 02:15:06 PM EST

 Nailed it with that last paragraph. I'm stumbling through a "hard math" fuzzy logic textbook for no apparent reason, and it's tough recalling what exactly the point is. Fuzzy logic allows almost human approximation, or other "close-enough" constructs. Compared to true AI, fuzzy logic is pie. [ Parent ]
 Re: Fuzzy Logic (For Real This Time) (4.00 / 1) (#10) by jrennie on Mon Apr 10, 2000 at 05:55:50 PM EST

 mguenther@netcom.ca wrote: Situations like this illustrates why fuzzy logic and neural nets have a big future. Although they're not actually artificial intelligence, they are generally intelligent enough to do many useful things, and without human intervention. Hmm.... neural nets have been around for quite some time now. Even though they had a resurgance in the 80s and early 90s, most people that I know doing classification/prediction/regression these days are focusing on better founded techniques. Support Vector Machines were quite the rage at one recent Machine Learning conference. Statistical techniques (such as SVMs) seem to do just as well, if not better, without requiring the heuristic tuning that neural nets often require. Jason Rennie jrennie@ai.mit.edu [ Parent ]
 Re: Fuzzy Logic (For Real This Time) (none / 0) (#9) by jrennie on Mon Apr 10, 2000 at 05:48:28 PM EST

 I have yet to figure out why people are excited by the idea of fuzzy logic. As far as I can tell, it's a heuristic-based way to generate real values for something that is usually dealt with in terms of binary values. Probability and Statistics generally provides a solid foundation for dealing with a continuously-valued random variables. The Machine Learning literature has many methods for making decisions based on past data. Statistical Decision Theory also deals with such problems. Does anyone know how fuzzy logic significantly differs from these fields? Jason Rennie jrennie@ai.mit.edu
 Re: Fuzzy Logic (For Real This Time) (none / 0) (#11) by cthulhu on Mon Apr 10, 2000 at 07:26:19 PM EST

 I think one of the more important concepts of fuzzy logic that is often missed out on is set membership. Probabilistic systems ask what is the probability that x is true or false; P(x) (I'll keep things to boolean values for simplicity). More complex probabilistic systems, like a naive bayes system, start asking questions like what is the probability of x given that I know y; P(x|y). But, when it's all done and said, x is either true or false, and P(x=true) + P(x=false) = 1. Fuzzy set theory however, asks the question how true is x, or how false is x. This is like saying someone is old. Well, relative to your age (say 25) someone who is 50 is kind of old, but not really old. According to probabilistic logic, they are old or they are not old. Fuzzy set theory provides a measure for partial set membership that may or may not sum to 1. Therefore P(x=true)+P(x=false) could be less than 1, equal to 1, or greater than 1.
 Re: Fuzzy Logic (For Real This Time) (none / 0) (#12) by jrennie on Tue Apr 11, 2000 at 07:40:19 AM EST

 cthulhu wrote: Fuzzy set theory however, asks the question how true is x, or how false is x. This is like saying someone is old. Well, relative to your age (say 25) someone who is 50 is kind of old, but not really old. According to probabilistic logic, they are old or they are not old. This is easy to translate into a random variable. Consider a random variable, X, that takes on real values between 0 and 1. X can then be used to describe how old a person is. You can even describe the underlying distribution of oldness values; this lets you calculate the average oldness of a person given no background knowledge. Given other random variables and joint distributions with X, one can talk about the oldness of people who fit other criterion (average oldness of a person who reads kiro5hin, for example). Jason Rennie jrennie@ai.mit.edu [ Parent ]
 Fuzzy Logic (For Real This Time) | 12 comments (12 topical, 0 editorial, 0 hidden)
 Display: Threaded Minimal Nested Flat Flat Unthreaded Sort: Unrated, then Highest Highest Rated First Lowest Rated First Ignore Ratings Newest First Oldest First