模糊逻辑编码 [英] Fuzzy Logic Coding

查看:68
本文介绍了模糊逻辑编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

从一段时间以来,我一直在研究模糊逻辑,并且一直在使用Matlab模糊逻辑工具箱开发模型.
但是现在我正在尝试在c#平台上工作.我的问题是,当我编写较小的程序时,如果这些事情我使用if-else编写,那么我拥有的规则就成百上千个了,但现在您可以给我一些我应该遵循的算法的想法了.我正在考虑将规则另存为矩阵或求和形式的数字变量.我不希望收到您的代码,但请给我一些有关如何进行的想法.

提前感谢

HI all,

I have been working on fuzzy logic since some time now and have been developing models using matlab fuzzy logic toolbox.
Now however I am trying to work on c# platform. The problem with me is that the no of rules i have is in hundreds and earlier when i have written smaller programs i used if-else for these things but now can u give me some idea on the algo i should follow. I was thinking in terms of saving the rules as numerical variables in form of matrix or sumthing. I dont want a code from u but give me some idea about how should i proceed.

Thanx in advance

推荐答案

Hello Guchu,

模糊逻辑有点...只是在说的话,如果您离右边太远,而右边的严重程度就去了左边,而这一切都没有真正指定到底是什么.

我猜想应用这个数组将很困难而不是模糊.您应该定义太多的值和某种规则来确定严重性.
简而言之,向左的速度是所定义边界距离的0.1倍.左边界为100,当前边界为120,那么您应该以20 * 0.1 = 2的速度向右移动(无论如何).在每一步都要重新评估,这意味着您靠近左边界时会变慢.除了边界的定义之外,没有任何可靠的规则,其余的规则被置于这些边界之间.硬数组值什么也没有,因为这也意味着它不可扩展.刚刚应用的规则可能对蚂蚁也适用于大象,因为该规则是相对的,因此可以适应这种情况.希望这使您对如何创建一些好的规则有所了解.描述这些的方式取决于您,并取决于情况.

祝你好运!
Hello Guchu,

Fuzzy logic is somewhat that... so just saying go to the left if you are too far to the right and as far as the severity to the right is, and all that without really specifying what to far exactly is.

To apply this an array would be hard instead of fuzzy I guess. You should define the too much value and some kind of rule to determine the severity.
Like in simple terms, the speed to the left is 0.1 times the distance of the defined border. The border left is at 100 and you are currently at 120 then you should move at a speed of 20 * 0.1 = 2 per (whatever) unit to the right. Re-evaluating at each step what would mean that you would go slower when coming closer to the left border. There are no solid rules except the definition of the boundaries and the rest is put into a rule to stay between those boundaries. Nothing in hard array values though because this would also mean it ain''t scalable. The rule just applied could work with ants as well with elephants because the rule is relative and therefore adapts to the situation. Hopefully this gives you some idea how to create some great rules. The way to describe these are up to you and depend on the situation.

Good luck!


这篇关于模糊逻辑编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆