
Fuzzy Logic
what exactly is it? i bought a book called 'fuzzy logic' from barnes&noble out of curiosity. (i had heard the term before.) it's about dealing with logical problems realistically, instead of abstracting uncertainty behind a wall of certainty through probability.
what i don't understand is how it differs from normal computer science. it seems to me to be an 'ifthen' approach to problem solving instead of using algorithms... but don't computers do that already?

Fuzzy logic is kinda like a nonbinary approach. Instead of always being true or false, there is kind of a middle road of true and false(a gray area so to speak).

Well... I don't know much at all about this, but I have heard a *little* bit about it.
From what I've heard fuzzy logic is, well, "fuzzy" logic. When the computer evaluates something it takes it's "best guess" at what the answer is insted of trying to find a definate answer. Supposedly this is more like the way the human brain works.
Anyone feel free to correct me if I'm wrong, I probably don't know what I'm talking about anyway.
EDIT: Yeah, what golfinguy said. Damn me and my slow typing :rolleyes:.

Hard logic will find a "Needle in a haystack", fuzzy logic might also find a "Noodle in a hatrack". It is a more heuristic approach to certain problems which don't easily fall into a simple set of hard and fast rules.

What these guys have said is pretty much correct. It allows a program to make judgements based on incomplete data. it gives the computer the right to make judgements on "most likely" correct answer. That's about it.

>what exactly is it?
In traditional binary logic, something is true or false. In short fuzzy logic something can be a false, a little bit true, a bit more true, etc. The same counts for the other way, something can be true, a little more false etc.
>what i don't understand is how it differs from normal computer
>science. it seems to me to be an 'ifthen' approach to problem
>solving instead of using algorithms... but don't computers do
>that already?
In some way you are right. But those ifthen constructions assume a variable to be true or false.
Fuzzy logic is used a lot in control engineering, creating devices to control something. Perhaps this simple example from the automotive field helps:
Modern cars are equipped with automatic distance control. This is: your car measures the distance to the car in front of it and compares it to the distance that you have set. If the distance to the car comes below distance as set, then your car will slow down to increase the distance. If the distance is getting bigger, then your car speeds up until a maximum value, which is also set by you and controlled by the cruise control.
How does the car decide whether to slowing down or increasing speed? When a fuzzy controller is used, this depends on fuzzy variables. Assume you have set the distance to 25 meters.
In fuzzy terms the control would be: if the distance to the car in front is far, then increase speed, if the distance to the car is small, then decrease speed.
Here "far" and "small" are fuzzy functions. This means they are not binary. A binary definition of this functions could be:
Code:
boolean far ()
{
if (distance > 25)
{
return TRUE;
}
else
{
return FALSE;
}
}
boolean small ()
{
if (distance < 25)
{
return TRUE;
}
else
{
return FALSE;
}
}
In fuzzy logic it could look like:
Code:
int far ()
{
if (distance > 25) return FAR;
if (distance > 20) return LESS_FAR;
if (distance > 15) return NOT_FAR;
}
int small ()
{
if (distance < 5) return VERY_SMALL;
if (distance < 10) return SMALL;
if (distance < 15) return NOT_SMALL;
}
In other words, there are more degrees. In practice, there could be much more degrees, depending on much more input variables.
The ifstatements are rules. A more complex fuzzy logic rule could be: If the road is wet and if the distance is very small, then decrease the speed much.

i am currently studying some artificial intelligence at uni, fuzzy logic is a term used to describe a statement that is not absolutely tru or absolutely false, it can apply to the humnan 'nearly' or 'more or less', one of its main applications is in neural networks  human thought uses fuzzy logic

Wow you do research into neural network applications? That's neat, I'm currently shadowing a research group doing the same thing.

I always thought fuzzy logic is how you get home when you are drunk.

No that's the beer scooter

Well, this topic turned my attention towards fuzzy logic.
I have one question:
The "or" operator is mostly defined like this:
A or B = max(A,B)
However, this doesn't seem optimal to me because (0.9 or 0.1) = (0.9 or 0.8)
There ought to be some difference!
The same goes with the "and" operator, which is defined as min(A,B).