一个专家系统的例子(共5页).doc
《一个专家系统的例子(共5页).doc》由会员分享,可在线阅读,更多相关《一个专家系统的例子(共5页).doc(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上一个专家系统的例子一、建立动物识别专家系统的规则库,并用与/或图来描述这个规则库。 规则库由15条规则组成,规则名分别是;rule1,rule2,rule15,规则库的符号名为ruleS。编写一段程序,把15条规则组成一个表直接赋值给规则库ruleS。( rules (rule1(if (animal has hair) 若动物有毛发(F1)(then (animal is mammal) 则动物是哺乳动物(M1) (rule2(if (animal gives milk) 若动物有奶(F2)(then (animal is mammal) 则动物是哺乳动物(M1)
2、(rule3(if (animal has feathers) 若动物有羽毛(F9)(then (animal is bird) 则动物是鸟(M4) (rule4(if (animal flies) 若动物会飞(F10) (animal lays eggs) 且生蛋(F11)(then (animal is bird) 则动物是鸟(M4) (rule5(if (animal eats meat) 若动物吃肉类(F3)(then (animal is carnivore) 则动物是食肉动物(M2) (rule6(if (animal Raspointed teeth) 若动物有犀利牙齿(F4)
3、(animal has claws) 且有爪(F5) (animal has forword eyes) 且眼向前方(F6)(then (animal is carnivore) 则动物是食肉动物(M2) (rule7(if (animal has mammal) 若动物是哺乳动物(M1) (animal has hoofs) 且有蹄(F7)(then (animal is ungulate) 则动物是有蹄类动物(M3) (rule8(if (animal has mammal) 若动物是哺乳动物(M1) (animal chews cud) 且反刍(F8)(then (animal is u
4、ngulate) 则动物是有蹄类动物(M3) (rule9(if (animal is mammal) 若动物是哺乳动物(M1) (animal is carnivore) 且是食肉动物(M2) (animal has tawny color) 且有黄褐色(F12) (animal has dark sports) 且有暗斑点(F13)(then (animal is cheetah) 则动物是豹(H1) (rule10(if (animal is mammal) 若动物是哺乳动物(M1) (animal is carnivore) 且是食肉动物(M2) (animal has tawny c
5、olor) 且有黄褐色(F12) (animal has black stripes) 且有黑色条纹(F15)(then (animal is tiger) 则动物是虎(H2) (rule11(if (animal is ungulate) 若动物是有蹄类动物(M3)(animal has long neck) 且有长脖子(F16) (animal has long legs) 且有长腿(F14) (animal has dark sports) 且有暗斑点(F13) (then (animal is giraffe) 则动物是长颈鹿(H3) (rule12(if (animal is ung
6、ulate) 若动物是有蹄类动物(M3) (animal has black stripes) 且有黑色条纹(F15)(then (animal is zebra) 则动物是斑马(H4) (rule13(if (animal is bird) 若动物是鸟(M4)(animal does not fly) 且不会飞(F17) (animal has long neck) 且有长脖子(F16) (animal has long legs) 且有长腿(F14) (animal black and white) 且有黑白二色(F18)(then (animal is ostrich) 则动物是驼鸟(H
7、5) (rule14(if (animal is bird) 若动物是鸟(M4)(animal does not fly) 且不会飞(F17) (animal swims) 且会游泳(F19) (animal black and white) 且有黑白二色(F18)(then (animal is penguin) 则动物是企鹅(H6) (rule15(if (animal is bird) 若动物是鸟(M4) (animal flies well) 且善飞(F20)(then (animal is albatross) 则动物是信天翁(H6) 在上述规则的说明中,用F1-F20标记的是初始事
8、实或证据,用M1-M4标记的是中间结论,用H1-H7标记的是最终结论。用标记表示15条规则如下:R1: F1M1R2: F2M1R3: F9M4R4: F10F11M4R5: F3M2R6: F4F5F6M2R7: F7M1M3R8: F8M1M3R9: F12F13M1M2H1R10: F12F15M1M2H2R11: F13F14F16M3H3R12: F15M3H4R13: F14F16F17F18M4H5R14: F17F18F19M4H6R15: F20M4H7用VC+编写一个函数,把一个表赋给变量rules,这个表有15个顶层元素,每一个顶层元素是一条规则,每条规则都是有4个元素的
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 一个 专家系统 例子
限制150内