Tuesday, June 3, 2008

Thesis and fuzzy logic

My last rant, I mean post, kind of ties in with my Master's thesis work. I am a graduate student in Computer Science and I'm trying to finish up my thesis while working full time. Over the past few weeks I feel I've finally put together a plan for my thesis. It has to do with robotics and spatial relationships.

Now to save some of you pain, this will get a little technical, but not terribly so. I settled on using fuzzy logic for the spatial relationships. Why? It lends itself well to uncertainties in the environment, such as "near" or "slightly". So you can say something like the blue ball is in front of and slightly to the left of the red ball and fuzzy logic can express this concept in a formalized way. The poem "fuzzy wuzzy was a bear" helps to explain the concept of fuzzy logic. The poem goes like this:

fuzzy wuzzy was a bear, fuzzy wuzzy had no hair.
fuzzy wuzzy wasn't fuzzy, was he?

fuzzy wuzzy was a bear, fuzzy wuzzy had one hair.
fuzzy wuzzy wasn't fuzzy, was he?

fuzzy wuzzy was a bear, fuzzy wuzzy had two hairs.
fuzzy wuzzy wasn't fuzzy, was he?

...

And so on and so forth. So the idea is, how many hairs does it take before fuzzy wuzzy becomes fuzzy? 100? 1,000? 10,000? 22,352? The point here is, we don't exactly know. There is no one hair where before the hair is added he is not fuzzy and after the hair is added he is suddenly fuzzy. Fuzzy logic assigns a value to the "goodness" of a measure. For instance, when fuzzy wuzzy has 100 hairs we might say the fuzzy value is 0.01 and when he has 10,000 hairs the fuzzy value might be 0.4 and when he has 100,000 hairs perhaps 0.9. The fuzzy values range in value between 0 and 1 where 0 is not at all and 1 is absolutely.

Now fuzzy logic is not to be confused with probability which also assigns values to events ranging between 0 and 1. If we said fuzzy wuzzy has 0.4 probability of being fuzzy with 10,000 hairs this means that fuzzy wuzzy has a 40% chance of being fuzzy. So if you find fuzzy wuzzy falls below 40% then he is not fuzzy, and if he falls above he is fuzzy, there is no in between. Where fuzzy logic assigns a fuzzy value of 0.4 which could mean more equivalently that he is "somewhat" fuzzy as opposed to the all or nothing of probability.

Now back to spatial relationships and fuzzy logic. If we say the red ball is in front of and slightly to the left of the blue ball, then "in front of" is pretty definite so this might have a value of 0.9 and "slightly to the left" is not very definitive so this might have a value of "0.2". So fuzzy logic can lend itself well to these linguistic hedges as they are called.

On my next thesis post I will talk about the robot and how it figures out the spatial relationships using fuzzy logic.

Till next time.

No comments: