Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is fuzzy logic?

I'm working with a couple of AI algorithms at school and I find people use the words Fuzzy Logic to explain any situation that they can solve with a couple of cases. When I go back to the books I just read about how instead of a state going from On to Off it's a diagonal line and something can be in both states but in different "levels".

I've read the wikipedia entry and a couple of tutorials and even programmed stuff that "uses fuzzy logic" (an edge detector and a 1-wheel self-controlled robot) and still I find it very confusing going from Theory to Code... for you, in the less complicated definition, what is fuzzy logic?

like image 494
DFectuoso Avatar asked Dec 30 '08 06:12

DFectuoso


People also ask

What is meant by fuzzy logic?

Fuzzy logic is an approach to computing based on "degrees of truth" rather than the usual "true or false" (1 or 0) Boolean logic on which the modern computer is based. The idea of fuzzy logic was first advanced by Lotfi Zadeh of the University of California at Berkeley in the 1960s.

What is fuzzy logic with example?

In more simple words, A Fuzzy logic stat can be 0, 1 or in between these numbers i.e. 0.17 or 0.54. For example, In Boolean, we may say glass of hot water ( i.e 1 or High) or glass of cold water i.e. (0 or low), but in Fuzzy logic, We may say glass of warm water (neither hot nor cold).

What is fuzzy logic in machine learning?

Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept of partial truth — truth values between “completely true” and “completely false.

What is fuzzy logic in data science?

Fuzzy Logic is defined as a many-valued logic form which may have truth values of variables in any real number between 0 and 1. It is the handle concept of partial truth. In real life, we may come across a situation where we can't decide whether the statement is true or false.


2 Answers

Fuzzy logic is logic where state membership is, essentially, a float with range 0..1 instead of an int 0 or 1. The mileage you get out of it is that things like, for example, the changes you make in a control system are somewhat naturally more fine-tuned than what you'd get with naive binary logic.

An example might be logic that throttles back system activity based on active TCP connections. Say you define "a little bit too many" TCP connections on your machine as 1000 and "a lot too many" as 2000. At any given time, your system has a "too many TCP connections" state from 0 (<= 1000) to 1 (>= 2000), which you can use as a coefficient in applying whatever throttling mechanisms you have available. This is much more forgiving and responsive to system behavior than naive binary logic that only knows how to determine "too many", and throttle completely, or "not too many", and not throttle at all.

like image 75
chaos Avatar answered Oct 12 '22 18:10

chaos


I'd like to add to the answers (that have been modded up) that, a good way to visualize fuzzy logic is follows:

Traditionally, with binary logic you would have a graph whose membership function is true or false whereas in a fuzzy logic system, the membership function is not.

 1|  |   /\  |  /  \  | /    \ 0|/      \  ------------    a  b c   d 

Assume for a second that the function is "likes peanuts"

 a. kinda likes peanuts b. really likes peanuts c. kinda likes peanuts d. doesn't like peanuts 

The function itself doesn't have to be triangular and often isn't (it's just easier with ascii art).

A fuzzy system will likely have many of these, some even overlapping (even opposites) like so:

 1|   A    B  |   /\  /\      A = Likes Peanuts  |  /  \/  \     B = Doesn't Like Peanuts  | /   /\   \ 0|/   /  \   \  ------------   a  b  c d 

so now c is "kind likes peanuts, kinda doesn't like peanuts" and d is "really doesn't like peanuts"

And you can program accordingly based on that info.

Hope this helps for the visual learners out there.

like image 37
Steven Evers Avatar answered Oct 12 '22 17:10

Steven Evers