Fuzzy logic has been around long time
it's first described in a paper around 1965
By a man called Lotfi Aliasker Zadeh
And it's been around
It is been in wide spread usage for decades
But this is still a lot of advancements to be made in it
Fuzzy logic is a way of dealing with uncertainties
Which is something that computers do not do naturally which human do very well.
So normally, when we think of logic
And when we think about reasoning about things.
The way
Computers tend to deal with things
and the way you might instantly think of dealing with things
Is 'True' or 'False', '1' and '0'.
So for example. You might classify someone.
Who's watching Computerphile as
(def) as someone is watching it 'True'
Or not watching it 'False'
It's very simple
There is one option, the other. We have no between.
That's not the way that the real world works
And that's the way that humans work
So, you can look out of your window now.
And, you can say: "Today it's nice weather!"
or if you're in England "It's not nice weather"
but the definition of "Nice" varies person to person
With fuzzy logic, instead of just going to 'True' or 'False'. '1' or '0'
We have a sliding scale
We have between them
we have whats called a degree of truth
So I can look out the window
And say that, today is kind of iffy
it's a bit sunny with some clouds
Maybe it's 0.3 "Nice Day" or 0.7 "Nice Day"
[There is one man asking]
There is no grey area since it's dark or white
Exactly, yeah, there are always grey areas.
And the grey areas vary from person-to-person
which come about to later
So logic is also closely related to 'Sets'.
and "A Set" is a collection of things
when we talk about something being true or false
we also talk about that be in a set
where something is true
and if it's not true, then that isn't the set
the set of "Nice Weather"
If I was going to describe
"Nice Weather"
I will probably decide that
I don't like things too hot
So...
"Nice" is when it's cold
but... cold not to wear jacket
but to... not too hot for me to feel uncomfortable
so that will be the way we called the "Membership Function"
That gives a value for certain things
so if I check the temperature
And I see that it's about 18 degrees, there is no wind
Then that probably fits into a 1
niceness scale if it's no clouds at all
theres no shade anywhere
It's 30 degrees that pretty close to 0 in my scale
So you get a nice sliding graphs
That gives us a way from dealing with uncertainty
So if we look this example on the board
So this is kinda typical example for fuzzy logic
which you'll see everywhere
This could be a shower controller
with temperature, things don't just suddenly go from "Hot" to "Cold"
You have different scales
so, what we have here
Is three of these membership functions
that are assigning things to different values
So for example
A low temperature, we know that is "Cold"
And does it get the temperature goes up
it gets less cold
And then we start to see "Warm" kicking in
Surround, there we can decide this pretty about 15 degrees
I'm put natural value on here
Surround this area. We now know the
We kinda mixing "Warm" and "Cold"
Theres no - It's not strictly "Cold", it's not strictly "Warm"
And we have some story with "Hot"
This gives us a way of dealing with the fact
that the temperature water isn't strictly
It's not strictly true or false
If we look at the shower controller
We know at the some point. Someone has decided
This is now no longer cold
And this is where warm starts kicking in
So although we're dealing with uncertainties
with call this membership function that allows us to model them
You still have someone imposing
their definition of that word onto it
someone still needs to assign the values to the membership
And, that's where things get very complicated.
When you're dealing with fuzzy expert systems
You often to need collect data from many sources
You have to use various techniques
to consolidate that data
And to train the system to be accurate as possible
and so when we talk about fuzzy expert systems
we're basically talking about
A fuzzy system where the
Membership functions
and the values we're using
have been fed in by experts in
some domain area
So in our example
it would be experts in knowing what people
like in their showers they will decide
at a certain temperature this water is
no longer cold and it starts to get
towards warmer
fuzzy logic systems, systems which
use membership functions like this and have these fuzzy
sets and have these degrees of truth are
a very widely used
in all sorts of things you might not expect
when you set the set, when your washing machine
It doesn't just do it exactly the same way every times
It checks the load of wash
it checks how dirty the water is
after each cycle through it does all
sorts of things to decide exactly what
temperature and exactly how fast to spin
to make sure that it's as eco efficient
and giving as good a wash as possible
One of the most famous examples of a fuzzy logic system
use is the
railway Japan
this is a subway which is one of the
first uses of fuzzy logic
Actually, measures
The weight on the train, how far its going
suspension, all sorts of these things to make sure that it maintains a level, smooth travel
This diagram here use kind of showing the rough outline of fuzzy logic system
We have input shapes crisp values
these are things which aren't yet signed
a truth value they're not in a fuzzy set
but then we falsify them so we look at
on membership functions and we apply
some value to them then we have our
fuzzy sets and these go into our
inference system this is where all the
magic happens this is where we then
start from reasons so we have a rule
base and a rule a quit address on the
board so a rule has the form of an
If water is dirty
Then ...
And then this will also be a fuzzy set
So water is dirty
This is fuzzy set
we're looking at our water which will
And will check it against
the dirty membership function
So we go back to our shower controller example
Think about that way we might say: "If water is warm"
And we check how much it's warm
So say dirty we had membership function
some sensor was checking the water to see how
dirty it was and if it was pitch-black
and the sensor detected it was very
dirty we could say that this is 1 and
so then we'd act on it in some way so we
then might say some other fuzzy set it's
a certain value so we would say then
spin very fast or add detergent or do
another rinse cycle. any number of actions
and that gets on to the next point so we
actually have a rule basis multiple
rules for different membership functions
for different actions and different outputs
and we run all of these rules through
them and then we combine them in this
inference engine that's what the
inference engine does it takes these
rules it applies the fuzzy sets to them
and it combines them to come up with
some output some decided action this
decide action is in the form of fuzzy
sets it then gets de-fuzzified because computers, as I
mentioned earlier, they deal in
certainties they deal in true and falses
that deal in zeroes and ones
we need to de-fuzzify them to
something that the system can use and so
we de-fuzzify and we get critical values
as output so that's some action so go
back to the washing machine we take in
some measurements of the water
temperature and the water and how dirty
water is we apply those measurements to
our fuzzy sets so we know some
information about so we have some fuzzy
information some true values about how
hot and how dirty the water is we then
check those against overall basis and we
decide on some actions we decide how
fast it should spin how much water should
be in the next rinse cycle how much
detergent we should mix it we remove the
fuzziness from that and we give a crisp
values output and then that actually is
undertaken by the system ( how does it work
when its not using fuzzy logic ) we'd probably end up
taking our measurements our crisp values
and instead applying an awful lot of if
statements to them so if I rub this out
and there then if temp is less than 30
and dirt is greater than six do rinse
cycle or something like this so you'd
have to do this over and over again once
we have all these rules built up the
build on this it looks very similar to
our rule base but the difference here is
that because we're describing these here
we haven't done anything with this
before we're describing its conditions
here we haven't done any of these values
before it's almost as if we're defining
our membership function in the
conditions and it's a much less concise
way of dealing with things it's not as
easily maintainable and changeable in
code it's just a bit messy to be honest
and if you wanted to if you decide that
some later date that your washing
machine would be more efficient if you'd
done a temperature value differently or
a dirt value differently and it'd be
much more hassle to go back for and
change or the system much more
maintainable where as this way we'd have
to change to rule itself we just change
our definition of dirty our use of it is
somewhat hypocritical in that we don't
deal with all uncertainties our
measurements might be uncertain our
definitions might be uncertain so
there's continuing advancements in
describing these uncertainties better
but the big problem is once you start
doing with more uncertainty it's the
computational demands start to really
build up and that's the current area
that is being tackled as well as there's
in-numerous areas it's ahead very heavily
researched topic and it actually has
probably one of the largest abundance of
published papers for any individual
topic
you're trying to access this bit of
memory but that's not your memory that
doesn't belong to you or this program
there's a little programming Java shit
already anyone which is familiar with
basical understand all of that