
Fuzzy Logic - YungSven
https://en.wikipedia.org/wiki/Fuzzy_logic
======
pjbk
Back in the 90s when neural networks and fuzzy logic were the rage and were
going to solve all problems of human mankind (déjà vu?), I stumbled upon this
nice course put together by Texas A&M in the form of an "ebook" (aka Win3.1
application). Lofti Zadeh himself was a contributor. I looked it up in my
bookmarks and I cannot believe that the site is still up:

[http://faculty.petra.ac.id/resmana/private/fuzzy](http://faculty.petra.ac.id/resmana/private/fuzzy)

I was very interested in training neural networks to find out optimal fuzzy
parameters for robotic control systems as an alternative to gain scheduling.
There were some cool small companies making nifty scientific apps that I
remember evaluating (Aptronix and Neuralogix come to my mind).

~~~
badsectoracula
Out of curiosity i downloaded and downloaded the tutorial and it looks to be
more of a hyperlinked multimedia(ish) application, similar to something you'd
see made in Hypercard (which makes sense since it seems to be made in ToolBook
which essentially was a Hypercard clone for Windows 3.1) and less of something
like a PDF, something you'd see in an Amazon Kindle or something you'd see as
an EPUB (which is what i think most people would associate with ebooks
nowadays).

I made a quick capture under VBox with Windows 3.1 for others to see, (though
i think it should also work under Wine and otya128's winevdm port to Windows
10):

[http://runtimeterror.com/pages/badsector/nyan/gimme/webm/fuz...](http://runtimeterror.com/pages/badsector/nyan/gimme/webm/fuzzylogicwin31tutorial.webm)

EDIT: i started reading it now for real and i have to say it is a very
interesting way to teach. In theory the hyperlinked approach would work fine
in the web, but i cannot think of anything similar in practice. The closest i
can think of was some interactive examples in a blog post i found some years
ago about making a 2D game.

~~~
aasasd
I've seen stuff like that back in the early- to mid-2000s. It seems, of
course, that most of such ‘multimedia programs’ were educational packages for
kids.

But most of all, this reminds me of PowerPoint presentations, which iirc were
sometimes similarly made for use at home and with educational content. Also
olde .HLP and .CHM ‘books’ were employed in this vein.

~~~
badsectoracula
I guess you could make something similar with PowerPoint and "jump to slide"
actions and VBA macros, but i haven't seen any HLP or CHM (even though CHM
could technically do it via JavaScript) that work like that.

Still, what i found interesting was mainly the way this was presented in bite-
sized pieces (via the pages that couldn't arbitrarily extend via scrolling),
combined with clear graphs/pictures and interactivity (not just hyperlinking,
but also end-of-chapter quizzes and in a couple of cases showing values
changing live as you move your mouse over them).

Technically simple stuff, of course, and certainly done before (i mean,
ToolBook was made in 1989 and is still around, so chances are someone is using
it :-P), but not something i see often, which seems to be a shame. I had only
heard the name "fuzzy logic" before, but after reading that presentation (just
the fundamentals) i got a decent idea about what they are and it was easy to
follow the tutorial. In comparison the same URL has a bunch of PDFs, including
a text-only tutorial that seemed to describe more or less the same stuff.
However i could only glaze over before closing it since i just couldn't focus
on it. The interactive stuff is just so much more attractive :-P

------
jblazevic
A team I was a part of at the uni made a fuzzy logic-based robot for a soft
computing course, almost 20 years ago it seems. I rember that we were able to
accomplish seemingly complex behavior (light tracking with obstacle avoidance)
with only a few very simple fuzzy logic rules. Seems the project page is still
up, along with the source code, schematics and documentation (in Croatian):
[http://www.zemris.fer.hr/predmeti/nenr/](http://www.zemris.fer.hr/predmeti/nenr/)

------
sacado2
Since we're talking about non-classical logics, I also like modal logic, which
deals with uncertainty too, but in a very different way. Here, facts /
assertions are not associated with a numeric value, but with a modality, a
symbol, meaning "it is possible that F is true", "it is not necessary that F
is true", "F is usually true", "F was true yesterday", or "I know I don't know
whether F is true or false".

[https://en.wikipedia.org/wiki/Modal_logic](https://en.wikipedia.org/wiki/Modal_logic)

It has interesting properties, and it avoids the main pitfal of fuzzy logic
IMO: when a fact is associated with a truth value of 0.8, what does that
really mean? Why is the truth value 0.8 rather than 0.81, for instance? Can we
say so for sure?

~~~
jacques_chester
The truth value being 0.8 can be mapped to one or more fuzzy sets. That's what
you're typically doing. Saying "I don't know" is still possible, because you
can define a fuzzy set representing "I don't know". But now you can say how
_strongly_ you don't know.

An overlapping alternative is Dempster-Shafer evidence theory, which has
"belief functions" and rules on how to combine them.

------
tehsauce
"Fuzzy logic is a form of many-valued logic in which the truth values of
variables may be any real number between 0 and 1 both inclusive. It is
employed to handle the concept of partial truth, where the truth value may
range between completely true and completely false."

Can someone explain how this is different than bayesian statistics?

~~~
tlarkworthy
Bayesian statistics has to follow Bayes rule. There is a fairly specific
framework behind the numbers in Bayes (i.e. probability). Fuzzy logic is
looser.

You could say Bayesian statistics is a subset of Fuzzy logic.

Given how informal people have to be in Bayesian statistics to come up with
reasonable priors (e.g. uniform), and how well it works by just guessing
reasonable values, it could be argued that the power of Bayes is not in the
inference but from the slack in the system it permits. Fuzzy logic is pure
slack.

I think modern neural networks with activations like leaky relu look more at
home in a fuzzy logic textbook than in a statistics text book.

~~~
jacques_chester
> _You could say Bayesian statistics is a subset of Fuzzy logic._

Arguably not. Mathematicians have teased out differences between different
many-valued logics and systems. A critical one between probability and
fuzziness is that probability includes the axiom of the excluded middle and
fuzziness does not. In probability the values of mutually exclusive events
must sum to 1.0, in fuzziness they need not, because it doesn't require events
to be mutually exclusive in the sense that probability requires.

~~~
tlarkworthy
Yeah, Bayesian is a true model you can chop and change the viewpoint. It's
much more sophisticated.

------
airbreather
I built a fuzzy logic controller for a very large sag mill in a gold plant
(top ten in the world by size).

But at the end of it managed to reduce it to a one line formula I could get
almost identical results from when simulating in Excel.

I don't think this is an unusual case looking at other examples I found on the
net - really it is just a form of non linear control and probably the easiest
way to deal with a second order system that reverses action over the peak.

------
nprescott
Just earlier today I was reading through a lab available as part of the J
programming language distribution covering fuzzy logic.

I'm sure I've read the Wikipedia page for fuzzy logic but the lab really
helped to drive home some of the concepts. Additionally, it was a very cool
application for J, which is often derided as being a strictly numerical tool.
The lab describes itself as:

 _... how to create a linguistic inference system using fuzzy sets. Such
systems of linguistic variables are referred to as fuzzy logic systems._

 _First we describe the concept of membership with nonfuzzy and fuzzy sets.
Then we tackle fuzzy membership for scalar and array fuzzy sets, and later
inference with array sets._

It really is better to work through the lab within the J system[0], but for
those without it is browse-able in plain text online[1]

[0]: Help -> Studio -> Labs -> General Interest / Fuzzy Logic

[1]:
[https://github.com/jsoftware/labs_labs/blob/master/general/f...](https://github.com/jsoftware/labs_labs/blob/master/general/fuzzy.ijt)

~~~
kinow
Looks interesting! Haven't heard about J before. I only knew Matlab toolbox
for fuzzy sets/logic, and a C and another Java libraries. Shame GitHub syntax
hightlight doesn't seem to work well with J files. Will check out the project
and try to learn more about it, thanks!

------
TopHand
In the 1990's Bob Pease did a series of articles discussing fuzzy logic and
how it compared to conventional control systems, here is a link to the first
column.

[https://www.electronicdesign.com/technologies/digital-
ics/ar...](https://www.electronicdesign.com/technologies/digital-
ics/article/21757343/whats-all-this-fuzzy-logic-stuff-anyhow)

------
protomyth
Fuzzy Logic and it's rules are pretty amazing for solving problems. I had a
lot of fun solving a heating problem with it. Fuzzy Control Language goes with
it
[https://en.m.wikipedia.org/wiki/Fuzzy_Control_Language](https://en.m.wikipedia.org/wiki/Fuzzy_Control_Language)

------
kinow
Small community, with few readers, but still gets some links submitted every
now and then:
[https://www.reddit.com/r/fuzzylogic/](https://www.reddit.com/r/fuzzylogic/)

------
eternalban
Bart Kosko had some interesting results with Fuzzy:

[https://en.wikipedia.org/wiki/Bart_Kosko#References](https://en.wikipedia.org/wiki/Bart_Kosko#References)

------
tabtab
Kind of reminds me of "factor tables", AKA, "fuzzy query-by-example":
[https://github.com/RowColz/AI](https://github.com/RowColz/AI)

------
joeberon
What is the difference between fuzzy logic and control theory?

~~~
AstralStorm
First is a tool, the latter is a field of science.

------
dang
A small related thread from 2011:
[https://news.ycombinator.com/item?id=2134735](https://news.ycombinator.com/item?id=2134735)

Others?

------
mooze
A great application of this in real life is rice cookers.

~~~
kinow
I think washings machines, some digital cameras, and also a train station
system in Japan were some other famous applications (from what I can
remember).

~~~
jacques_chester
Automatic gearboxes, ABS, cruise control, some plant controls. Fuzziness saw
strongest uptake in Japan, so any control system developed there has a decent
chance of having a fuzzy system at its core.

