您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > AI人工智能 > 人工智能实验-小型专家系统
人工智能技术导论——小型专家系统班级:学号:学生姓名:汽车识别系统1.题目:这是一个简单的车辆识别系统,有:红旗、奇瑞350、QQ、东风卡车、宝马、劳斯莱斯、本田、卡宴8种车。顾客使用我们这个系统,只需根据窗口提供的内容回答“yes”或“no”,系统将会帮你选择你可能中意的爱车。2.该专家系统设计车的特性是:(1)中国(5)两驱(2)外国(6)四驱(3)轿车(7)国产(4)SUV(8)进口各种车辆的特征如下:3、谓词定义do_expert_jobdo_consultingask(symbol,symbol)car_is(symbol)positive(symbol,symbol)negative(symbol,symbol)remember(symbol,symbol,symbol)clear_facts4该专家系统设计汽车的分类是:首先按照中国外国,再按各种特征分类,如下图所示。。5、程序/*work.pro*//*Program:CarExpert*//*Purpose:ToShowtheworkingofanexpert*//*Itisaproductionrule_basedsystem*//*Remark:Thisisacarclassificationexpertsystem*//*Itusesasetofproductionrulesforthe*//*purposeofinferring.*/domainsdatabasexpositive(symbol,symbol)xnegative(symbol,symbol)predicatesdo_expert_jobdo_consultingask(symbol,symbol)car_is(symbol)positive(symbol,symbol)negative(symbol,symbol)remember(symbol,symbol,symbol)clear_factsgoaldo_expert_job.clauses/*USERINTERFACESYSTEM*/do_expert_job:-makewindow(1,7,7,ANEXPERTSYSTEMS,1,16,15,58),nl,write(******************************************),nl,write(WELCOMETOAGOGEXPERTSYSTEM),nl,write(Thisisacaridentificationsystem),nl,write(Pleaserespondbytypingin),nl,write('yes'or'no'.Thankyou),nl,write(),nl,write(***************************************),nl,nl,do_consulting,write(Pressspacebar.),nl,readchar(_),clearwindow,exit.do_consulting:-car_is(X),!,nl,write(Yourfavoritecarmaybea(n),X,.),nl,clear_facts.do_consulting:-nl,write(Sorry,unabietodeterminethecar.),nl,clear_facts.ask(X,Y):-write(Question:-,X,it,Y,?),readln(Reply),remember(X,Y,Reply)./*INFERENCEBIGING*/positive(X,Y):-xpositive(X,Y),!.positive(X,Y):-not(negative(X,Y)),!,ask(X,Y).negative(X,Y):-xnegative(X,Y),!.remember(X,Y,yes):-asserta(xpositive(X,Y)).remember(X,Y,no):-asserta(xnegative(X,Y)),fail.clear_facts:-retract(xpositive(_,_)),fail.clear_facts:-retract(xnegative(_,_)),fail./*Productionrules*/car_is(swan):-positive(is,zhongguo),positive(is,jiaoche),positive(is,liangqu),positive(is,jinkou),!.car_is(qirui):-positive(is,zhongguo),positive(is,jiaoche),positive(is,liangqu),positive(is,guochan),!.car_is(QQSUV):-positive(is,zhongguo),positive(is,SUV),positive(is,liangqu),positive(is,guochan),!.car_is(dongfengka):-positive(is,zhongguo),positive(is,siqu),positive(is,guochan),!.car_is(baoma):-positive(is,waiguo),positive(is,SUV),positive(is,siqu),positive(is,jinkou),!.car_is(laosilaisi):-positive(is,waiguo),positive(is,jiaoche),positive(is,liangqu),positive(is,guochan),!.car_is(bentian):-positive(is,waiguo),positive(is,jiaoche),positive(is,siqu),positive(is,guochan),!.car_is(kayan):-positive(is,waiguo),positive(is,jiaoche),positive(is,siqu),positive(is,jinkou),!./*end*/5、程序截图界面一:程序运行。界面二:找不到合适的结果。界面三:找到符合要求的结果。
本文标题:人工智能实验-小型专家系统
链接地址:https://www.777doc.com/doc-5689924 .html