Fuzzy logic. Another one of those buzzword-compliant terms you hear all the time. But what does it really mean, and could it mean more than one thing? We are about to find out just that. We will use fuzzy logic to help guide an autonomous vehicle around an obstacle course, and if we do it correctly, we will avoid obstacles along the way. Our automated guided vehicle (AGV) will navigate its way around the obstacle course, sensing for obstacles in its path. It will use an inference system to help guide it along. You, the user, will be able to create obstacles or throughways, which the AGV either must avoid or can utilize. You can watch the tracking beams work as well as track the path of the AGV along its course. Each step the AGV takes will be updated on the user interface so that you can see what is going on.
In Boolean logic, things are either true or false, on or off, black or white. What many people do not know is that there is also what is known as many-valued logic, where the truth lies somewhere between 1 and 0. Fuzzy logic is a conceptual implementation of many-valued logic that handles partial truth. What many people also do not know is that the famous sigmoid function, which you will hear of later, in our chapter on activation functions, is a fuzzification method.
Wikipedia has a great visual of this, as follows:
According to Wikipedia:
This diagram and description are a very accurate representation of what we are about to delve into. Why do we show this? Because our first example is going to show exactly this. To illustrate fuzzy logic, we will be using the AForge.NET open source machine learning framework. For a user, it is an excellent framework to show how easy it is to use the inference engine to accomplish tasks.
In this chapter we will cover:
- Fuzzy logic
- Autonomously guided vehicles
- Obstacle avoidance and recognition