:: AForge.NET Framework :: Articles :: Forums ::

Fuzzy logic question

The forum is to discuss topics from different artificial intelligence areas, like neural networks, genetic algorithms, machine learning, etc.

Fuzzy logic question

Postby tggm » Fri Jan 17, 2014 5:53 pm


I'd like to ask a couple of questions about FL. I'm studying the AForge samples and learning from them, so please bear in mind that my knowledge in this area is extremely basic.

The objective is the control of a submarine that tracks and follows a fish. Also we have a hard-coded depth limit (say 100ft) and a limited energy supply.

Ignoring the implementation of the track&follow, I imagined a few simple rules to determine what the agent should do next:
    If Depth IS exceeded THEN Climb.
    If energy IS Depleted THEN ReturnHome.
    If Fish is Near THEN TrackAndFollowFish.

I'm considering simulating such a system based on the AVG sample provided on AForge\Fuzzy. However two questions come to mind that I don't know how to solve:

1) Say that we're tracking a fish at 110ft depth. Our system's goal will be "To Climb". Agent will climb and continue tracking the object (the fish remains at 110ft). Agent will descend. First rule kicks in and agent will climb again. How can we prevent this oscillation ? (The same can be seen on the AVG sample as the car wobbles left to right on a straight path). Ie. How can I prevent an action that will be undone on the very next iteration?

2) Our sensors indicate that the battery is low, so the agent should return home. However other rules might still apply (a fish might come nearby). How can we give "priority" or "weight" to a a particular rule and discard the others? In other words, how can I tell the system that "Surviving" is more important than the other goals, so everything else should be ignored?

Thank you!

Once again I understand these are very simple questions, so forgive me if they don't make sense and/or fuzzyLogic is the wrong approach here!
Posts: 2
Joined: Fri Jan 17, 2014 5:35 pm

Re: Fuzzy logic question

Postby tggm » Mon Jan 20, 2014 7:27 pm


I've been thinking and perhaps FL isn't the right approach here. Maybe an utility based agent? Does it make more sense ?

Posts: 2
Joined: Fri Jan 17, 2014 5:35 pm

Return to Artificial Intelligence