当前位置: 首页 > news >正文

网站流量如何提高优秀的网站通过什么提供信息

网站流量如何提高,优秀的网站通过什么提供信息,wordpress国内怎么上,山东做网站公司有哪些实验1 谓词表示法与产生式知识表示 一、实验目的 1、熟悉谓词逻辑表示法#xff1b; 2、理解和掌握产生式知识表示方法#xff0c;实现产生式系统的规则库。 二、实验内容 要求通过C/C/python语言编程实现#xff1a; 1、猴子摘香蕉问题 2、动物识别系统 #xff08…实验1  谓词表示法与产生式知识表示 一、实验目的 1、熟悉谓词逻辑表示法 2、理解和掌握产生式知识表示方法实现产生式系统的规则库。 二、实验内容 要求通过C/C/python语言编程实现 1、猴子摘香蕉问题 2、动物识别系统 1建立识别七种动物识别系统的规则 2确定需要识别的动物及其属性7种动物即老虎、金钱豹、斑马、长颈鹿、企鹅、鸵鸟和信天翁。 三、问题描述 1、房子里有一只猴子即机器人位于a处。在c处上方的天花板上有一串香蕉猴子想吃但摘不到。房间的b处还有一个箱子如果猴子站到箱子上就可以摸着天花板。如图1所示对于上述问题可以通过谓词逻辑表示法来描述知识。实现猴子摘香蕉问题的求解过程。 图1  猴子摘香蕉问题 2、建立一个动物识别系统的规则库编写程序用以识别虎、豹、斑马、长颈鹿、企鹅、鸵鸟、信天翁等7种动物。 为了识别这些动物可以根据动物识别的特征建立包含下述规则库             R1if 动物有毛发  then  动物是哺乳动物 R2if 动物有奶  then  动物是哺乳动物 R3if 动物有羽毛  then  动物是鸟 R4if 动物会飞  and  会生蛋 then  动物是鸟 R5if 动物吃肉 then 动物是食肉动物 R6if 动物有犀利牙齿 and 有爪 and 眼向前方 then 动物是食肉动物 R7if 动物是哺乳动物and有蹄then动物是有蹄类动物 R8if 动物是哺乳动物and反刍then动物是有蹄类动物 R9if 动物是哺乳动物and是食肉动物and有黄褐色 and 有暗斑点 then 动物是豹 R10if 动物是哺乳动物 and是食肉动物and有黄褐色 and有黑色条纹 then 动物是虎 R11if动物是有蹄类动物 and 有长脖子and有长腿and有暗斑点 then 动物是长颈鹿 R12if 动物是有蹄类动物 and有黑色条纹 then 动物是斑马 R13if 动物是鸟and不会飞 and有长脖子and有长腿 and有黑白二色 then 动物是鸵鸟 R14if 动物是鸟 and不会飞 and会游泳 and有黑白二色 then  动物是企鹅 R15if 动物是鸟 and善飞 then 动物是信天翁 四、编写程序并调试源程序、实验过程与结果 1猴子摘香蕉问题 1.1源程序 dict {} count 0 while 1:     if count 3:         break     item input(please input your item:)     site input(please input your site:)     if item ! monkey and item ! box and item ! banana:         print(input error)     else:         dict.setdefault(item, site)         count 1 print() # change lines step 1 #initialzie step climb 0 gain 0 # if monkey is not at box site if dict[monkey] ! dict[box]:     result stepstr(step): move monkey to box     print(result,end )     print(dict[monkey]-dict[box])     dict[monkey]dict[box]     step 1 # if box is not at banana site if dict[box] ! dict[banana]:     result stepstr(step): move box to banana     print(result,end )     print(dict[box]-dict[banana])     dict[box]dict[banana]     dict[monkey]dict[banana]     step 1 # monkey climbs onto the box if climb 0:     result stepstr(step): monkey climbs on the box     print(result,end )     print(dict[monkey]-dict[box])     step 1     climb 1 # monkey jumps to get the banana if climb 1 and gain 0:     result stepstr(step): monkey jumps to get the banana     print(result,end )     print(dict[box]-dict[banana])     step 1     gain 1 1.2实验过程与结果 如下图所示依次输入三个物体及其地点例如猴子在a点、箱子在b点、香蕉在c点。输入完毕后程序自动显示每一步的操作。 以图中的结果为例第一步命令猴子移动到箱子处即a点到b点第二步命令猴子将箱子移动到香蕉处即b点到c点第三步命令猴子爬到箱子上地点不变第四步命令猴子跳起来拿到香蕉地点不变。综上所述通过上述4个步骤即可实现猴子拿到香蕉的结果。 2动物识别系统 2.1源程序 dict {} dict.setdefault(1, 有毛发) dict.setdefault(2, 有奶) dict.setdefault(3, 有羽毛) dict.setdefault(4, 会飞) dict.setdefault(5, 会生蛋) dict.setdefault(6, 吃肉) dict.setdefault(7, 犀利牙齿) dict.setdefault(8, 有爪) dict.setdefault(9, 眼向前方) dict.setdefault(10, 有蹄) dict.setdefault(11, 反刍) dict.setdefault(12, 有黄褐色) dict.setdefault(13, 有暗斑点) dict.setdefault(14, 有黑色条纹) dict.setdefault(15, 有长脖子) dict.setdefault(16, 有长腿) dict.setdefault(17, 不会飞) dict.setdefault(18, 有黑白二色) dict.setdefault(19, 会游泳) dict.setdefault(20, 善飞) mammal 0  # 哺乳动物 bird 0    # 鸟 meat 0    # 食肉动物 foot 0    # 蹄类动物 print(dict) print(please later input features according to this directory) feature [] n int(input(please input the total number of your features: )) # add int() to convert str into int, or error will occur for i in range(n):     t int(input(please input your current feature number: ))     feature.append(t) # hash features hash [] for i in range(21):     hash.append(0) for item in feature:     hash[item]1 # rules result check 0 # rule 1 2 if hash[1] 1 or hash[2] 1:     mammal 1 # rule 3 4 if hash[3] 1 or (hash[4] 1 and hash[5] 1):     bird 1 # rule 5 6 if hash[6] 1 or (hash[7] 1 and hash[8] 1 and hash[9] 1):     meat 1 # rule 7 8 if mammal 1 and (hash[10] 1 or hash[11] 1):     foot 1 # rule 9 if mammal 1 and meat 1 and hash[12] 1 and hash[13] 1:     if check 0:         check 1         result 豹 # rule 10 if mammal 1 and meat 1 and hash[12] 1 and hash[14] 1:     if check 0:         check 1         result 虎 # rule 11 if foot 1 and hash[15] 1 and hash[16] 1 and hash[13] 1:     if check 0:         check 1         result 长颈鹿 # rule 12 if foot 1 and hash[14] 1:     if check 0:         check 1         result 斑马 # rule 13 if bird 1 and hash[17] 1 and hash[15] 1 and hash[16] 1 and hash[18] 1:     if check 0:         check 1         result 鸵鸟 # rule 14 if bird 1 and hash[17] 1 and hash[19] 1 and hash[18] 1:     if check 0:         check 1         result 企鹅 # rule 15 if bird 1 and hash[20] 1:     if check 0:         check 1         result 信天翁 if check 1:     print(判断的结果是:result) else:     print(无法判断) 2.2实验过程与结果 在实验过程中首先编写供用户查阅编号和对应特征的字典然后令用户根据提示输入特征的总数和每个特征的编号中间使用哈希表将用户输入的特征所对应的表内位置设定为1不涉及的特征设定为0再通过if语句逐条判断规则是否成立如果成立则将相应的判定结果进行标记最后输出判断的结果。 值得注意的是有可能出现无法判断的情况。以下将展示测试规则系统中的各类判断结果并逐个列举用户所使用的特征。 用户字典 ·测试豹1、2、6、7、8、9、12、13 ·测试虎1、2、6、7、8、9、12、14 ·测试斑马1、2、10、11、14、17、19 ·测试长颈鹿1、10、13、15、16 ·测试企鹅3、5、17、18、19 ·测试鸵鸟3、5、15、16、17、18 ·测试信天翁3、20 ·测试无法判断1、3、6 综上所述各类情况均判断完毕结果如图所示。 五、遇到的问题和解决办法 问题1 n int(input(please input the total number of your features: )) # add int() to convert str into int, or error will occur for i in range(n):     t int(input(please input your current feature number: ))     feature.append(t) 上述代码在没有加int()前input默认输入的为字符串导致在循环开头时n不是整数类型而报错。 解决方法1 将 n input() 改为 n int(input()) 即可。
http://www.sadfv.cn/news/136728/

相关文章:

  • 学信网 的企业网站给你做认证营口市网站建设
  • 门户网站开发需要泉州app制作
  • 扬州做网站公司ppt做的好的网站
  • 透明网站模板ipsw 是谁做的网站
  • php网站容量最好用的cms
  • 广州市住房和城乡建设部网站做照片的网站有哪些软件
  • 企业网站建设要多少钱广州市手机网站建设
  • 现在建网站做推广能赚钱吗网站需要多大宽带
  • 东莞品牌网站建设费用合肥论坛网站建设
  • 一个公司做网站需要注意什么条件北京网站设计技术乐云seo
  • 广东网站设计长沙哪家网络公司做网站好
  • 如何创建网站站点并且避免广告云服务器搭建网站
  • 网站建设 九艾做网站用什么笔记本配置
  • 建设银行申请信用卡网站周村网站制作哪家好
  • 建设银行企业银行网站打不开合肥做网站的软件公司
  • wordpress页面回收站位置长沙seo在哪
  • 网站开发雇佣平台百度网页制作html
  • html5 购物网站事业单位网站登录模板
  • 汽车网站制作策划方案公司网站建设费属于什么费用
  • 咸阳网站建设公司哪家好wordpress 不收录设置
  • 网站建设首页面成都百度推广优化创意
  • app开发哪个公司专业网站seo源码
  • 建站快车设计素材网站p
  • 在线自助网站按照程序酷家乐必须先学cad吗
  • 东莞软件网站推广html前端网站开发PPT
  • 厦门百度搜索网站排名工业制品网站建设
  • 律师做推广宣传的网站仿新浪首页网站模板
  • 体育用品东莞网站建设广东建设网工程信息网站
  • 网站建站第十四课东莞企业网站推广
  • 响应式网站模板 食品自学网站建设需要什么学历