专家系统实例.docx
《专家系统实例.docx》由会员分享,可在线阅读,更多相关《专家系统实例.docx(9页珍藏版)》请在三一办公上搜索。
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) (then (animal is mammal) (rule3 (if (animal has f
2、eathers) (then (animal is bird) (rule4 (if (animal flies) (animal lays eggs) (then (animal is bird) (rule5 (if (animal eats meat) (then (animal is carnivore) (rule6 (if (animal Raspointed teeth) (animal has claws) (animal has forword eyes) (then (animal is carnivore) (rule7 (if (animal has mammal) (
3、animal has hoofs) (then (animal is ungulate) (rule8 (if (animal has mammal) (animal chews cud) (then (animal is ungulate) (rule9 (if (animal is mammal) (animal is carnivore) (animal has tawny color) (animal has dark sports) (then (animal is cheetah) (rule10 (if (animal is mammal) (animal is carnivor
4、e) 若动物有奶(F2) 则动物是哺乳动物(M1) 若动物有羽毛(F9) 则动物是鸟(M4) 若动物会飞(F10) 且生蛋(F11) 则动物是鸟(M4) 若动物吃肉类(F3) 则动物是食肉动物(M2) 若动物有犀利牙齿(F4) 且有爪(F5) 且眼向前方(F6) 则动物是食肉动物(M2) 若动物是哺乳动物(M1) 且有蹄(F7) 则动物是有蹄类动物(M3) 若动物是哺乳动物(M1) 且反刍(F8) 则动物是有蹄类动物(M3) 若动物是哺乳动物(M1) 且是食肉动物(M2) 且有黄褐色(F12) 且有暗斑点(F13) 则动物是豹(H1) 若动物是哺乳动物(M1) 且是食肉动物(M2) (anim
5、al has tawny color) 且有黄褐色(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
6、(if (animal is ungulate) 若动物是有蹄类动物(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 (anima
7、l is ostrich) 则动物是驼鸟(H5) (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) 则动物是信天翁(H
8、6) 在上述规则的说明中,用F1-F20标记的是初始事实或证据,用M1-M4标记的是中间结论,用H1-H7标记的是最终结论。用标记表示15条规则如下: R1: F1M1 R2: F2M1 R3: F9M4 R4: F10F11M4 R5: F3M2 R6: F4F5F6M2 R7: F7M1M3 R8: F8M1M3 R9: F12F13M1M2H1 R10: F12F15M1M2H2 R11: F13F14F16M3H3 R12: F15M3H4 R13: F14F16F17F18M4H5 R14: F17F18F19M4H6 R15: F20M4H7 用VC+编写一个函数,把一个表赋给变量
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 专家系统 实例
链接地址:https://www.31ppt.com/p-3069824.html