Friday, August 7, 2020

In Defence of Fuzzy Logic


The term fuzzy logic refers to things which are not clear or vague. It is n approach based on the degree of information rather than the usual response of yes or no or what is termed in Boolean logic as true or false (0 or 1).
For example let us assume that here is in apple in your refrigerator. Now this statement is either true if the apple is there or it is false if it is not there. Here the simple logic or true or false can be very easily applied and depicted as 0 or 1 as the case may be. If one take a bite from the apple and then the apple is put back in the fridge without your knowledge then how one can describe the presence of apple. Is the apple therein the refrigerator or not. In this case the Boolean logic o true or false fails as the apple is neither there in the refrigerator as an apple nor it can be said it is not there. At best we can describe it in terms of percentage that 80% of the apple is there but the Boolean logic does not hold good here. It is for a situation like this where there is no definite answer of true or false that the fuzzy logic comes handy. Instead of a true or false as designated by 0 or 1 we can describe in terms of a shade of truth starting from 1 where it is true to 0 where it is false on a continuous spectrum of truth/false.
This term fuzzy logic was introduced by Loefi Zadeh in 1965 when he proposed a fuzzy set theory. It is based on the observation that people in general make decisions based on imprecise and non numeric information. The fuzzy logic basically is means to represent this vagueness and imprecise information. If one had the precise and accurate information then the decision would have been easy as true or false. These fuzzy models have the capability of recognizing this imperfectness of the information by utilizing information that are vague and lack certainty. Of course one can argue that there is no certainty in y information and it can be always represented on probability scale which is just another way of representing ignorance about the subject. But where the fuzzy logic scores is that it is based on these imperfect information and the decision also changes in order to adjust according to the  knowledge available.
For example if one asks a group of people to identify a color shown to them which is not from VINGYOR  then one would get a variety of responses. The truth here appears as a result of reasoning from inexact or partial knowledge in which the answers can be mapped on a continuous spectrum from 0 to 1. But here the fuzzy logic scores since it uses degree of truth as a mathematical model of vagueness while probability can be termed as mathematical model of ignorance.
The fuzzy logic was initially used in intelligent traffic management systems and later on was used in air conditioners and washing machines and dish washers but now a days it is widely used in control theory and artificial intelligence. Normal traffic light show green for a programmed period of time say 30 or 40 seconds and then change over to red. This is pre programmed but can be changed only if the programe is changed. But the traffic density in the morning is more going towards the city center and less in other directions which are cross to it and in the evening more traffic is going out than coming in. Because of the fixed timings this leads to long traffic lines in some direction whereas there is hardly and in other directions. Fuzzy logic based traffic lights sense this density of the traffic at all times on a continuous basis and change the duration of the green light to match with the traffic density. Same way the air conditioner senses the heat, number of persons in the room and changes cooling automatically and the washing machine senses the amount of clothes in the tub as well as their dirtiness and adjust the water, detergent and timing of wash to give you a perfect clean without any intervention or adjustment from your side.
In order to achieve this fuzzy logic uses and maps a set of IF and THEN conditions and responses to achieve its aim. For example it might be programmed that:-
If A exists then do X (meaning if situation A exists then the response will be X).
If B then do Y.
If C then do Z.
And so on and so forth.
The more number of conditions the better will be the response and in a hypothetical case of infinite conditions and responses the curve will become continuous one but it is practically impossible to have a large number of this set of IF and THEN rules . Hence they are restricted to a  small number and as the conditions increase so is the responses and the complexity of the system and the resulting cost.

No comments: