Answers.Body: <p>Fuzzy logic is based on regular boolean logic. Boolean logic means you are working with truth values of either true or false (or 1 or 0 if you prefer). Fuzzy logic is the same apart from you can have truth values that are in-between true and false, which is to say, you are working with any number between 0 (inclusive) and 1 (inclusive). The fact that you can have a 'partially true and partially false' truth value is where the word &quot;fuzzy&quot; comes from. Natural languages often use fuzzy logic like &quot;that balloon is red&quot; meaning that balloon could be any colour that is similar enough to red, or &quot;the shower is warm&quot;. Here is a rough diagram for how &quot;the temperature of the shower is warm&quot; could be represented in terms of fuzzy logic (the y axis being the truth value and the x-axis being the temperature):</p>
  <p><a href="https://i.sstatic.net/G7szY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/G7szY.png" alt="y-axis=truth value of statement about temperature, x-axis=temperature" /></a></p>
  <p>Fuzzy logic can be applied to boolean operations such as <strong>and</strong>, <strong>or</strong>, and <strong>not</strong>. Note that you can define the fuzzy logic operations in different ways. One way is with the min and max functions which return the lessermost and greatermost values of the two values inputted respectively. This would work as such:</p>
  <pre><code>A and B = min(A,B)
  A or B  = max(A,B)
  not A   = 1-A
  (where A and B are real values from 0 (inclusive) to 1 (inclusive))
  </code></pre>
  <p>When defined like this they are called the <strong>Zadeh operators</strong>.</p>
  <p>Another way would be to define <strong>and</strong> as the first argument times the second argument, which yields different outputs for the same inputs as the Zadeh <strong>and</strong> operator (<code>min(0.5,0.5)=0.5, 0.5*0.5=0.25</code>). Then other operators are derived based on the <strong>and</strong> and <strong>not</strong> operators. This would work as such:</p>
  <pre><code>A and B = A*B
  not A = 1-A
  A or B = not ((not A) and (not B)) = 1-((1-A)*(1-B)) = 1-(1-A)*(1-B)
  (where A and B are real values from 0 (inclusive) to 1 (inclusive))
  </code></pre>
  <p>You can then use the three &quot;basic fuzzy logic operations&quot; to build all other &quot;fuzzy logic operations&quot;, just like you can use the three &quot;basic boolean operations&quot; to build all other &quot;boolean logic operations&quot;.</p>
  <p>Note that the latter definition of the three basic operations is more in line with probability theory, so could be considered the more natural choice.</p>
  <p>Sources:
  <a href="https://en.wikipedia.org/wiki/Fuzzy_logic" rel="nofollow noreferrer">Fuzzy logic wikipedia</a>,
  <a href="https://en.wikipedia.org/wiki/Boolean_algebra" rel="nofollow noreferrer">Boolean algebra wikipedia</a>,
  <a href="https://www.youtube.com/watch?v=r804UF8Ia4c" rel="nofollow noreferrer">Explanation of fuzzy logic on Youtube</a></p>
  <p>Note: if anyone could suggest some more reliable sources in the comments, I will happily add them to the list (I understand that the current ones aren't too reliable).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2016-08-02T16:10:01.630Z
Answers.LastActivityDate: 2022-02-24T01:25:23.263Z
Answers.LastEditDate: 2022-02-24T01:25:23.263Z
Answers.UserDisplayName: god of llamas
Answers.Body: <p>It's analogous to analogue versus digital, or the many shades of gray in between black and white: when evaluating the truthiness of a result, in binary boolean it's either true or false (0 or 1), but when utilizing fuzzy logic, it's an estimated probability between 0 and 1 (such as 0.75 being mostly probably true). It's useful for making calculated decisions when all information needed isn't necessarily available.</p>
  
  <p><a href="https://en.wikipedia.org/wiki/Fuzzy_logic" rel="noreferrer">Wikipedia has a fantastic page for this</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-02T16:04:09.333Z
Answers.LastActivityDate: 2016-08-02T16:04:09.333Z
Answers.UserDisplayName: Jeff Puckett
Answers.Body: <p>Why is it useful? </p>
  
  <p>Many things we don't know for sure. We estimate and are often uncertain, but nearly never 100% sure. It may seem like a weakness, but because of this fuzzy approach we can function in this complex world and even behave quite intelligently. Hence it's a way to simplify things. And it gives you some leeway to fill the gaps appropriately, e.g. to adapt to slightly varying situations. 
  P.S.: In natural language we express this with quantitive terms like more, less, nearly, rather, immense and so on. But quantifying things is hard for us.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-05T12:47:24.167Z
Answers.LastActivityDate: 2018-12-05T12:47:24.167Z
Answers.UserDisplayName: EssenceBlue
Answers.Body: <p>It is making deductions based on probability and statistics, like humans make decisions all the time. We are never 100% sure the decision we have made is the right one but there is always some doubt present. Ai will definitely need to use it in some form.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-06T06:16:31.917Z
Answers.LastActivityDate: 2018-12-06T06:16:31.917Z
Answers.UserDisplayName: Tone Škoda
Answers.Body: <p>Fuzzy Logic is a way of dealing with uncertainties, which is something that computers don't do naturally which human do very well. The way we instantly think of dealing with things and the way that computers tend to deal with certain things is 'True' or 'False', or '1 or '0'. For example, you might classify someone is alive as alive ('True') or has passed away ('False'). We only have two options, there is no inbetween. With fuzzy logic, instead of going with 'True' or 'False', between that, we have what's called a degree of truth. So for example, when we look out the window, we might say "It's a bit cloudy today, maybe it's 0.5 'nice day' or 0.7 'nice day'". So essentially, with fuzzy logic we always have grey areas which vary from person-to-person.</p>
  
  <p>Source: <a href="https://youtu.be/r804UF8Ia4c" rel="nofollow noreferrer">https://youtu.be/r804UF8Ia4c</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T09:35:12.257Z
Answers.LastActivityDate: 2020-04-21T11:13:09.990Z
Answers.LastEditDate: 2020-04-21T11:13:09.990Z
Answers.UserDisplayName: Akmal Iftikar
Answers.Body: <p><em>As complexity rises, precise statements lose meaning and meaningful statements lose precision.</em> ( Lofti Zadeh ).</p>
  
  <p>Fuzzy logic deals with reasoning that is approximate rather than fixed and exact. This may make the reasoning more meaningful for a human:</p>
  
  <p><a href="https://i.sstatic.net/xdHPJ.png" rel="noreferrer"><img src="https://i.sstatic.net/xdHPJ.png" alt="Precision and significance - comic"></a></p>
  
  <hr>
  
  <p>Fuzzy logic is an extension of Boolean logic by Lotfi Zadeh in 1965 based on the
  mathematical theory of fuzzy sets, which is a generalization of the classical set theory.
  By introducing the notion of <em>degree in the verification</em> of a condition, thus enabling a
  condition to be in a state other than true or false, fuzzy logic provides a very valuable
  flexibility for reasoning, which makes it possible to take into account inaccuracies and
  uncertainties.</p>
  
  <p>One advantage of fuzzy logic in order to formalize human reasoning is that the rules
  are set in natural language. For example, here are some rules of conduct that a driver
  follows, assuming that he does not want to lose his driver’s licence:</p>
  
  <p><a href="https://i.sstatic.net/TM2UE.png" rel="noreferrer"><img src="https://i.sstatic.net/TM2UE.png" alt="Fuzzy logic decision table"></a></p>
  
  <p>Intuitively, it thus seems that the input variables like in this example are approximately
  appreciated by the brain, such as the degree of verification of a condition in fuzzy
  logic.</p>
  
  <hr>
  
  <p>I've written a short <a href="https://scholar.google.com/citations?view_op=view_citation&amp;hl=en&amp;user=kz2aIc8AAAAJ&amp;citation_for_view=kz2aIc8AAAAJ:eQOLeE2rZwMC" rel="noreferrer">introduction to fuzzy logic</a> that goes into a bit more details but should be very accessible.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T23:37:08.677Z
Answers.Text: Maybe you should say something regarding the relation between fuzzy logic and AI?!
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2016-08-02T16:04:39.867Z
Answers.LastActivityDate: 2020-05-26T17:15:36.130Z
Answers.LastEditDate: 2020-05-26T17:15:36.130Z
Answers.UserDisplayName: Franck Dernoncourt
Body: <p>I'm new to A.I. and I'd like to know in simple words, what is the fuzzy logic concept? How does it help, and when is it used?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-14T00:05:14.250Z
Comments.Text: https://www.studiecd.dk/cahiers_techniques/Fuzzy_logic.pdf your answers
Comments.UserDisplayName: Brian
Tags: <deep-neural-networks><terminology><fuzzy-logic>
Title: What is fuzzy logic?
UserDisplayName: kenorb
ThreadText: # What is fuzzy logic?
  
  (Asked by: username_0 on 2016-08-02)
  
  I'm new to A.I. and I'd like to know in simple words, what is the fuzzy logic concept? How does it help, and when is it used?
  
  **Tags:** deep-neural-networks, terminology, fuzzy-logic
  
  > **Comments:**
  > **username_1**: https://www.studiecd.dk/cahiers_techniques/Fuzzy_logic.pdf your answers  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_7 on 2016-08-02. Score: 54 | Accepted answer
  
  *As complexity rises, precise statements lose meaning and meaningful statements lose precision.* ( Lofti Zadeh ).
  
  Fuzzy logic deals with reasoning that is approximate rather than fixed and exact. This may make the reasoning more meaningful for a human:
  
  [![Precision and significance - comic](https://i.sstatic.net/xdHPJ.png)](https://i.sstatic.net/xdHPJ.png)
  
  ---
  
  Fuzzy logic is an extension of Boolean logic by Lotfi Zadeh in 1965 based on the
  mathematical theory of fuzzy sets, which is a generalization of the classical set theory.
  By introducing the notion of *degree in the verification* of a condition, thus enabling a
  condition to be in a state other than true or false, fuzzy logic provides a very valuable
  flexibility for reasoning, which makes it possible to take into account inaccuracies and
  uncertainties.
  
  One advantage of fuzzy logic in order to formalize human reasoning is that the rules
  are set in natural language. For example, here are some rules of conduct that a driver
  follows, assuming that he does not want to lose his driver’s licence:
  
  [![Fuzzy logic decision table](https://i.sstatic.net/TM2UE.png)](https://i.sstatic.net/TM2UE.png)
  
  Intuitively, it thus seems that the input variables like in this example are approximately
  appreciated by the brain, such as the degree of verification of a condition in fuzzy
  logic.
  
  ---
  
  I've written a short [introduction to fuzzy logic](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=kz2aIc8AAAAJ&citation_for_view=kz2aIc8AAAAJ:eQOLeE2rZwMC) that goes into a bit more details but should be very accessible.
  
  > **Comments:**
  > **username_8**: Maybe you should say something regarding the relation between fuzzy logic and AI?!  
  
  ---
  
  ### Answer by username_2 on 2016-08-02. Score: 22
  
  Fuzzy logic is based on regular boolean logic. Boolean logic means you are working with truth values of either true or false (or 1 or 0 if you prefer). Fuzzy logic is the same apart from you can have truth values that are in-between true and false, which is to say, you are working with any number between 0 (inclusive) and 1 (inclusive). The fact that you can have a 'partially true and partially false' truth value is where the word "fuzzy" comes from. Natural languages often use fuzzy logic like "that balloon is red" meaning that balloon could be any colour that is similar enough to red, or "the shower is warm". Here is a rough diagram for how "the temperature of the shower is warm" could be represented in terms of fuzzy logic (the y axis being the truth value and the x-axis being the temperature):
  
  [![y-axis=truth value of statement about temperature, x-axis=temperature](https://i.sstatic.net/G7szY.png)](https://i.sstatic.net/G7szY.png)
  
  Fuzzy logic can be applied to boolean operations such as **and**, **or**, and **not**. Note that you can define the fuzzy logic operations in different ways. One way is with the min and max functions which return the lessermost and greatermost values of the two values inputted respectively. This would work as such:
  
  ```
  A and B = min(A,B)
  A or B  = max(A,B)
  not A   = 1-A
  (where A and B are real values from 0 (inclusive) to 1 (inclusive))
  
  ```
  
  When defined like this they are called the **Zadeh operators**.
  
  Another way would be to define **and** as the first argument times the second argument, which yields different outputs for the same inputs as the Zadeh **and** operator (`min(0.5,0.5)=0.5, 0.5*0.5=0.25`). Then other operators are derived based on the **and** and **not** operators. This would work as such:
  
  ```
  A and B = A*B
  not A = 1-A
  A or B = not ((not A) and (not B)) = 1-((1-A)*(1-B)) = 1-(1-A)*(1-B)
  (where A and B are real values from 0 (inclusive) to 1 (inclusive))
  
  ```
  
  You can then use the three "basic fuzzy logic operations" to build all other "fuzzy logic operations", just like you can use the three "basic boolean operations" to build all other "boolean logic operations".
  
  Note that the latter definition of the three basic operations is more in line with probability theory, so could be considered the more natural choice.
  
  Sources:
  [Fuzzy logic wikipedia](https://en.wikipedia.org/wiki/Fuzzy_logic),
  [Boolean algebra wikipedia](https://en.wikipedia.org/wiki/Boolean_algebra),
  [Explanation of fuzzy logic on Youtube](https://www.youtube.com/watch?v=r804UF8Ia4c)
  
  Note: if anyone could suggest some more reliable sources in the comments, I will happily add them to the list (I understand that the current ones aren't too reliable).
  
  
  ---
  
  ### Answer by username_3 on 2016-08-02. Score: 10
  
  It's analogous to analogue versus digital, or the many shades of gray in between black and white: when evaluating the truthiness of a result, in binary boolean it's either true or false (0 or 1), but when utilizing fuzzy logic, it's an estimated probability between 0 and 1 (such as 0.75 being mostly probably true). It's useful for making calculated decisions when all information needed isn't necessarily available.
  
  [Wikipedia has a fantastic page for this](https://en.wikipedia.org/wiki/Fuzzy_logic).
  
  
  ---
  
  ### Answer by username_4 on 2018-12-05. Score: 1
  
  Why is it useful?
  
  Many things we don't know for sure. We estimate and are often uncertain, but nearly never 100% sure. It may seem like a weakness, but because of this fuzzy approach we can function in this complex world and even behave quite intelligently. Hence it's a way to simplify things. And it gives you some leeway to fill the gaps appropriately, e.g. to adapt to slightly varying situations.
  P.S.: In natural language we express this with quantitive terms like more, less, nearly, rather, immense and so on. But quantifying things is hard for us.
  
  
  ---
  
  ### Answer by username_5 on 2018-12-06. Score: 1
  
  It is making deductions based on probability and statistics, like humans make decisions all the time. We are never 100% sure the decision we have made is the right one but there is always some doubt present. Ai will definitely need to use it in some form.
  
  
  ---
  
  ### Answer by username_6 on 2020-04-21. Score: 1
  
  Fuzzy Logic is a way of dealing with uncertainties, which is something that computers don't do naturally which human do very well. The way we instantly think of dealing with things and the way that computers tend to deal with certain things is 'True' or 'False', or '1 or '0'. For example, you might classify someone is alive as alive ('True') or has passed away ('False'). We only have two options, there is no inbetween. With fuzzy logic, instead of going with 'True' or 'False', between that, we have what's called a degree of truth. So for example, when we look out the window, we might say "It's a bit cloudy today, maybe it's 0.5 'nice day' or 0.7 'nice day'". So essentially, with fuzzy logic we always have grey areas which vary from person-to-person.
  
  Source: <https://youtu.be/r804UF8Ia4c>
  
  
  ---
  
  