Fuzzy Logic

This is a discussion on Fuzzy Logic within the A Brief History of Cprogramming.com forums, part of the Community Boards category; what exactly is it? i bought a book called 'fuzzy logic' from barnes&noble out of curiosity. (i had heard the ...

  1. #1
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493

    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 'if-then' approach to problem solving instead of using algorithms... but don't computers do that already?

  2. #2
    ˇAmo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Fuzzy logic is kinda like a non-binary 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).

  3. #3
    Registered User Nippashish's Avatar
    Join Date
    Sep 2002
    Posts
    34
    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 .

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    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.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    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.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >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 'if-then' approach to problem
    >solving instead of using algorithms... but don't computers do
    >that already?

    In some way you are right. But those if-then 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 if-statements 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.

  7. #7
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    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
    Monday - what a way to spend a seventh of your life

  8. #8
    Evil Member
    Join Date
    Jan 2002
    Posts
    638
    Wow you do research into neural network applications? That's neat, I'm currently shadowing a research group doing the same thing.

  9. #9
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    I always thought fuzzy logic is how you get home when you are drunk.

  10. #10
    Christian
    Join Date
    Mar 2002
    Posts
    618
    No that's the beer scooter
    I shall call egypt the harmless dragon

    -Isaiah 30.7

  11. #11
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    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).
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Digital Logic
    By strokebow in forum Tech Board
    Replies: 3
    Last Post: 12-09-2006, 12:05 PM
  2. Logic
    By LordBronz in forum C++ Programming
    Replies: 6
    Last Post: 05-23-2006, 05:41 PM
  3. fuzzy logic
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 03-11-2002, 09:30 PM
  4. Circular Logic
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-15-2001, 08:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21