<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=Fuzzy_Logic</id>
	<title>Fuzzy Logic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=Fuzzy_Logic"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Fuzzy_Logic&amp;action=history"/>
	<updated>2026-05-03T20:27:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Fuzzy_Logic&amp;diff=1318&amp;oldid=prev</id>
		<title>Redspark at 02:21, 30 January 2025</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Fuzzy_Logic&amp;diff=1318&amp;oldid=prev"/>
		<updated>2025-01-30T02:21:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 02:21, 30 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l53&quot; &gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In terms of logical truth, the situation is the same.  If we consider A to be the degree to which &amp;quot;Bob is tall&amp;quot; is true, and B to be the degree to which &amp;quot;Bob is fat&amp;quot; is true, then &amp;lt;c&amp;gt;A and B&amp;lt;/c&amp;gt; produces the degree to which &amp;quot;Bob is tall and fat&amp;quot; can be considered true; and &amp;lt;c&amp;gt;A or B&amp;lt;/c&amp;gt; represents the truth of &amp;quot;Bob is tall or fat&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In terms of logical truth, the situation is the same.  If we consider A to be the degree to which &amp;quot;Bob is tall&amp;quot; is true, and B to be the degree to which &amp;quot;Bob is fat&amp;quot; is true, then &amp;lt;c&amp;gt;A and B&amp;lt;/c&amp;gt; produces the degree to which &amp;quot;Bob is tall and fat&amp;quot; can be considered true; and &amp;lt;c&amp;gt;A or B&amp;lt;/c&amp;gt; represents the truth of &amp;quot;Bob is tall or fat&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Language]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Redspark</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Fuzzy_Logic&amp;diff=815&amp;oldid=prev</id>
		<title>JoeStrout: Created page with &quot;One of the unique features of MiniScript is that it handles not only [https://en.wikipedia.org/wiki/Boolean_algebra Boolean] logic, but also [https://en.wikipedia.org/wiki/Fuz...&quot;</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Fuzzy_Logic&amp;diff=815&amp;oldid=prev"/>
		<updated>2021-11-05T23:08:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;One of the unique features of MiniScript is that it handles not only [https://en.wikipedia.org/wiki/Boolean_algebra Boolean] logic, but also [https://en.wikipedia.org/wiki/Fuz...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;One of the unique features of MiniScript is that it handles not only [https://en.wikipedia.org/wiki/Boolean_algebra Boolean] logic, but also [https://en.wikipedia.org/wiki/Fuzzy_logic fuzzy logic].  Fuzzy logic is a superset of ordinary Boolean logic, which allows the computer to correctly process logical statements involving not only [[true]] and [[false]], but also varying degrees of truth in between.&lt;br /&gt;
&lt;br /&gt;
== Brief History of Fuzzy Logic ==&lt;br /&gt;
&lt;br /&gt;
Classic logic states that every proposition is either true or false — a claim that goes all the way back to Aristotle [https://en.wikipedia.org/wiki/Law_of_excluded_middle].  This was formalized most famously by George Boole in a book called ''The Mathematical Analysis of Logic'', giving us what is now known as Boolean logic.  In most computer languages today, a variable that can hold only ''true'' or ''false'' is called a Boolean variable.&lt;br /&gt;
&lt;br /&gt;
However, mathematicians began to chip away at this rigid formalism in the early 20th century, starting with Jan Łukasiewicz's three-valued logic in 1920.  This was then generalized to n-valued logic (for any finite n), and eventually to infinitely-many-valued logic in 1930 by by Łukasiewicz and Alfred Tarski.  However this new, more sophisticated form of logical reasoning did not really catch on until the 1965 proposal of &amp;quot;fuzzy set theory&amp;quot; by computer scientist Lotfi Zadeh at the University of California, Berkeley.  As part of his treatment of fuzzy set membership, Zadeh further developed and clarified fuzzy logic, which allows propositions to have various degrees of truth besides completely true or false.&lt;br /&gt;
&lt;br /&gt;
A systematic mathematical study of particular types of fuzzy logics began in 1998 with a monograph called ''Metamathematics of Fuzzy Logic'' by Petr Hájek.  Many other mathematicians and logicians have contributed to the field since then.  Meanwhile, fuzzy logic has found extensive applications in science and industry, used in everything from experimental analysis to toaster ovens.&lt;br /&gt;
&lt;br /&gt;
== Fuzzy Logic in MiniScript ==&lt;br /&gt;
&lt;br /&gt;
MiniScript represents all truth values as a [[number]] between 0 and 1, inclusive.  The keyword [[true]] equates to 1, and [[false]] is the same as 0.  But the logical operators [[and]], [[or]], and [[not]] are all defined in a way that works logically and consistently with any number in this range.  (In technical terms, MiniScript implements a [https://en.wikipedia.org/wiki/T-norm_fuzzy_logics T-norm fuzzy logic].)&lt;br /&gt;
&lt;br /&gt;
While logicians have defined these operators in various ways depending on the application, MiniScript defines them in a way that is also consistent with probability theory:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| x and y || x * y&lt;br /&gt;
|-&lt;br /&gt;
| x or y || 1 - (1-x) * (1-y)&lt;br /&gt;
|-&lt;br /&gt;
| not x || 1 - x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that when the variables involved are all exactly 0 ([[false]]) or 1 ([[true]]), this produces the standard Boolean truth tables:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0 and 0 == 0 || 0 or 0 == 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 and 1 == 0 || 0 or 1 == 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 and 0 == 0 || 1 or 0 == 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 and 1 == 1 || 1 or 1 == 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, given values between 0 and 1, MiniScript produces mathematically sensible in-between answers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0 and 0.2 == 0 || 0 or 0.2 == 0.2&lt;br /&gt;
|-&lt;br /&gt;
| 0.5 and 0.2 == 0.1 || 0.5 or 0.2 == 0.6&lt;br /&gt;
|-&lt;br /&gt;
| 1 and 0.2 == 0.2 || 1 or 0.2 == 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interpretation ==&lt;br /&gt;
&lt;br /&gt;
MiniScript's definition of [[and]], [[or]] and [[not]] can be interpreted in terms of probability or fuzzy-logic truth.  For example, suppose there are two independent events: event A will happen with a probability of 0.5, and event B has a probability of 0.2.  Then the probability that they will ''both'' happen is &amp;lt;c&amp;gt;A and B&amp;lt;/c&amp;gt; which is 0.1; the probability that at least one will happen is &amp;lt;c&amp;gt;A or B&amp;lt;/c&amp;gt;, or 0.6.  The probability that event B will ''not'' happen is simply &amp;lt;c&amp;gt;not B&amp;lt;/c&amp;gt;, or 0.8.&lt;br /&gt;
&lt;br /&gt;
In terms of logical truth, the situation is the same.  If we consider A to be the degree to which &amp;quot;Bob is tall&amp;quot; is true, and B to be the degree to which &amp;quot;Bob is fat&amp;quot; is true, then &amp;lt;c&amp;gt;A and B&amp;lt;/c&amp;gt; produces the degree to which &amp;quot;Bob is tall and fat&amp;quot; can be considered true; and &amp;lt;c&amp;gt;A or B&amp;lt;/c&amp;gt; represents the truth of &amp;quot;Bob is tall or fat&amp;quot;.&lt;/div&gt;</summary>
		<author><name>JoeStrout</name></author>
		
	</entry>
</feed>