亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? zebra.clp

?? 一個有關專家系統的CLISP 源代碼
?? CLP
字號:

;;;======================================================
;;;   Who Drinks Water? And Who owns the Zebra?
;;;     
;;;     Another puzzle problem in which there are five 
;;;     houses, each of a different color, inhabited by 
;;;     men of different nationalities, with different 
;;;     pets, drinks, and cigarettes. Given the initial
;;;     set of conditions, it must be determined which
;;;     attributes are assigned to each man.
;;;
;;;     CLIPS Version 6.0 Example
;;;
;;;     To execute, merely load, reset and run.
;;;======================================================
    
(deftemplate avh (field a) (field v) (field h))

(defrule find-solution
  ; The Englishman lives in the red house.

  (avh (a nationality) (v englishman) (h ?n1))
  (avh (a color) (v red) (h ?c1&?n1))

  ; The Spaniard owns the dog.

  (avh (a nationality) (v spaniard) (h ?n2&~?n1))
  (avh (a pet) (v dog) (h ?p1&?n2))

  ; The ivory house is immediately to the left of the green house,
  ; where the coffee drinker lives.

  (avh (a color) (v ivory) (h ?c2&~?c1))
  (avh (a color) (v green) (h ?c3&~?c2&~?c1&=(+ ?c2 1)))
  (avh (a drink) (v coffee) (h ?d1&?c3))

  ; The milk drinker lives in the middle house.

  (avh (a drink) (v milk) (h ?d2&~?d1&3))

  ; The man who smokes Old Golds also keeps snails.

  (avh (a smokes) (v old-golds) (h ?s1))
  (avh (a pet) (v snails) (h ?p2&~?p1&?s1))

  ; The Ukrainian drinks tea.

  (avh (a nationality) (v ukrainian) (h ?n3&~?n2&~?n1))
  (avh (a drink) (v tea) (h ?d3&~?d2&~?d1&?n3))

  ; The Norwegian resides in the first house on the left.

  (avh (a nationality) (v norwegian) (h ?n4&~?n3&~?n2&~?n1&1))

  ; Chesterfields smoker lives next door to the fox owner.

  (avh (a smokes) (v chesterfields) (h ?s2&~?s1))
  (avh (a pet) (v fox) (h ?p3&~?p2&~?p1&:(or (= ?s2 (- ?p3 1)) (= ?s2 (+ ?p3 1)))))

  ; The Lucky Strike smoker drinks orange juice.

  (avh (a smokes) (v lucky-strikes) (h ?s3&~?s2&~?s1))
  (avh (a drink) (v orange-juice) (h ?d4&~?d3&~?d2&~?d1&?s3)) 

  ; The Japanese smokes Parliaments

  (avh (a nationality) (v japanese) (h ?n5&~?n4&~?n3&~?n2&~?n1))
  (avh (a smokes) (v parliaments) (h ?s4&~?s3&~?s2&~?s1&?n5))

  ; The horse owner lives next to the Kools smoker, 
  ; whose house is yellow.

  (avh (a pet) (v horse) (h ?p4&~?p3&~?p2&~?p1))
  (avh (a smokes) (v kools) (h ?s5&~?s4&~?s3&~?s2&~?s1&:(or (= ?p4 (- ?s5 1)) (= ?p4 (+ ?s5 1)))))
  (avh (a color) (v yellow) (h ?c4&~?c3&~?c2&~?c1&?s5))

  ; The Norwegian lives next to the blue house.

  (avh (a color) (v blue) (h ?c5&~?c4&~?c3&~?c2&~?c1&:(or (= ?c5 (- ?n4 1)) (= ?c5 (+ ?n4 1)))))
  
  ; Who drinks water?  And Who owns the zebra?

  (avh (a drink) (v water) (h ?d5&~?d4&~?d3&~?d2&~?d1))
  (avh (a pet) (v zebra) (h ?p5&~?p4&~?p3&~?p2&~?p1))

  => 
  (assert (solution nationality englishman ?n1)
          (solution color red ?c1)
          (solution nationality spaniard ?n2)
          (solution pet dog ?p1)
          (solution color ivory ?c2)
          (solution color green ?c3)
          (solution drink coffee ?d1)
          (solution drink milk ?d2) 
          (solution smokes old-golds ?s1)
          (solution pet snails ?p2)
          (solution nationality ukrainian ?n3)
          (solution drink tea ?d3)
          (solution nationality norwegian ?n4)
          (solution smokes chesterfields ?s2)
          (solution pet fox ?p3)
          (solution smokes lucky-strikes ?s3)
          (solution drink orange-juice ?d4) 
          (solution nationality japanese ?n5)
          (solution smokes parliaments ?s4)
          (solution pet horse ?p4) 
          (solution smokes kools ?s5)
          (solution color yellow ?c4)
          (solution color blue ?c5)
          (solution drink water ?d5)
          (solution pet zebra ?p5))
  )

(defrule print-solution
  ?f1 <- (solution nationality ?n1 1)
  ?f2 <- (solution color ?c1 1)
  ?f3 <- (solution pet ?p1 1)
  ?f4 <- (solution drink ?d1 1)
  ?f5 <- (solution smokes ?s1 1)
  ?f6 <- (solution nationality ?n2 2)
  ?f7 <- (solution color ?c2 2)
  ?f8 <- (solution pet ?p2 2)
  ?f9 <- (solution drink ?d2 2)
  ?f10 <- (solution smokes ?s2 2)
  ?f11 <- (solution nationality ?n3 3)
  ?f12 <- (solution color ?c3 3)
  ?f13 <- (solution pet ?p3 3)
  ?f14 <- (solution drink ?d3 3)
  ?f15 <- (solution smokes ?s3 3)
  ?f16 <- (solution nationality ?n4 4)
  ?f17 <- (solution color ?c4 4)
  ?f18 <- (solution pet ?p4 4)
  ?f19 <- (solution drink ?d4 4)
  ?f20 <- (solution smokes ?s4 4)
  ?f21 <- (solution nationality ?n5 5)
  ?f22 <- (solution color ?c5 5)
  ?f23 <- (solution pet ?p5 5)
  ?f24 <- (solution drink ?d5 5)
  ?f25 <- (solution smokes ?s5 5)
  =>
  (retract ?f1 ?f2 ?f3 ?f4 ?f5 ?f6 ?f7 ?f8 ?f9 ?f10 ?f11 ?f12 ?f13 ?f14
           ?f15 ?f16 ?f17 ?f18 ?f19 ?f20 ?f21 ?f22 ?f23 ?f24 ?f25)
  (format t "HOUSE | %-11s | %-6s | %-6s | %-12s | %-13s%n" 
            Nationality Color Pet Drink Smokes)
  (format t "--------------------------------------------------------------------%n")
  (format t "  1   | %-11s | %-6s | %-6s | %-12s | %-13s%n" ?n1 ?c1 ?p1 ?d1 ?s1)
  (format t "  2   | %-11s | %-6s | %-6s | %-12s | %-13s%n" ?n2 ?c2 ?p2 ?d2 ?s2)
  (format t "  3   | %-11s | %-6s | %-6s | %-12s | %-13s%n" ?n3 ?c3 ?p3 ?d3 ?s3)
  (format t "  4   | %-11s | %-6s | %-6s | %-12s | %-13s%n" ?n4 ?c4 ?p4 ?d4 ?s4)
  (format t "  5   | %-11s | %-6s | %-6s | %-12s | %-13s%n" ?n5 ?c5 ?p5 ?d5 ?s5)
  (printout t crlf crlf))

(defrule startup
   =>
   (printout t
    "There are five houses, each of a different color, inhabited by men of"  crlf
    "different nationalities, with different pets, drinks, and cigarettes."  crlf
    crlf
    "The Englishman lives in the red house.  The Spaniard owns the dog."     crlf
    "The ivory house is immediately to the left of the green house, where"   crlf
    "the coffee drinker lives.  The milk drinker lives in the middle house." crlf
    "The man who smokes Old Golds also keeps snails.  The Ukrainian drinks"  crlf
    "tea.  The Norwegian resides in the first house on the left.  The"       crlf)
   (printout t
    "Chesterfields smoker lives next door to the fox owner.  The Lucky"      crlf
    "Strike smoker drinks orange juice.  The Japanese smokes Parliaments."   crlf
    "The horse owner lives next to the Kools smoker, whose house is yellow." crlf
    "The Norwegian lives next to the blue house."			     t
    crlf
    "Now, who drinks water?  And who owns the zebra?" crlf crlf)
   (assert (value color red) 
           (value color green) 
           (value color ivory)
           (value color yellow)
           (value color blue)
           (value nationality englishman)
           (value nationality spaniard)
           (value nationality ukrainian) 
           (value nationality norwegian)
           (value nationality japanese)
           (value pet dog)
           (value pet snails)
           (value pet fox)
           (value pet horse)
           (value pet zebra)
           (value drink water)
           (value drink coffee)
           (value drink milk)
           (value drink orange-juice)
           (value drink tea)
           (value smokes old-golds)
           (value smokes kools)
           (value smokes chesterfields)
           (value smokes lucky-strikes)
           (value smokes parliaments)) 
   )

(defrule generate-combinations
   ?f <- (value ?s ?e)
   =>
   (retract ?f)
   (assert (avh (a ?s) (v ?e) (h 1))
           (avh (a ?s) (v ?e) (h 2))
           (avh (a ?s) (v ?e) (h 3))
           (avh (a ?s) (v ?e) (h 4))
           (avh (a ?s) (v ?e) (h 5))))



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
裸体在线国模精品偷拍| 欧美性大战久久| 一本久久a久久免费精品不卡| 欧美性欧美巨大黑白大战| 日韩欧美一级在线播放| 亚洲欧美乱综合| 黄色日韩网站视频| 欧洲色大大久久| 国产精品激情偷乱一区二区∴| 日本午夜一本久久久综合| 色哟哟在线观看一区二区三区| 欧美一区二区三区在线视频| 亚洲精品v日韩精品| 成人听书哪个软件好| 欧美成人精品二区三区99精品| 亚洲综合图片区| 91免费观看在线| 欧美激情一区二区三区全黄 | 欧美二区在线观看| 中文字幕一区av| 国产成人亚洲精品青草天美| 欧美一级理论性理论a| 一区二区三区免费网站| jlzzjlzz亚洲女人18| 久久综合色婷婷| 久久99精品国产麻豆婷婷洗澡| 欧美日韩免费观看一区二区三区| 一区二区三区四区视频精品免费| 白白色 亚洲乱淫| 国产精品久久国产精麻豆99网站| 成人一级片在线观看| 国产精品色哟哟| 成人小视频免费在线观看| 国产日韩欧美a| 国产91在线看| 亚洲欧洲一区二区三区| av在线不卡网| 亚洲精品一二三四区| 91福利区一区二区三区| 亚洲国产日日夜夜| 69久久99精品久久久久婷婷| 日本在线播放一区二区三区| 欧美一区欧美二区| 精品写真视频在线观看| 国产人成亚洲第一网站在线播放| 丁香婷婷综合激情五月色| 中文一区二区在线观看| av高清不卡在线| 亚洲与欧洲av电影| 91精品国产一区二区三区| 韩日精品视频一区| 国产精品伦理一区二区| 在线亚洲+欧美+日本专区| 首页国产欧美久久| 精品国产污网站| 成人app在线| 亚洲成人一区在线| 精品欧美黑人一区二区三区| 国产在线日韩欧美| 亚洲欧美经典视频| 欧美顶级少妇做爰| 国产电影精品久久禁18| 亚洲人吸女人奶水| 91精品国产欧美一区二区成人| 国产剧情在线观看一区二区| 国产精品乱人伦中文| 欧美喷水一区二区| 成人午夜av影视| 午夜成人免费电影| 国产精品无码永久免费888| 欧美视频在线一区| 国产九九视频一区二区三区| 亚洲欧美日韩国产成人精品影院| 制服.丝袜.亚洲.中文.综合| 懂色av一区二区三区免费观看| 亚洲综合久久av| 久久人人超碰精品| 欧美亚男人的天堂| 国产精品一卡二| 五月天亚洲精品| 亚洲欧洲成人自拍| 久久久蜜桃精品| 精品视频在线免费| av电影一区二区| 极品少妇一区二区| 偷偷要91色婷婷| 亚洲欧美激情插| 国产欧美日韩精品一区| 日韩一区二区在线看片| 日本韩国一区二区三区视频| 国产精品456| 老汉av免费一区二区三区| 亚洲精品自拍动漫在线| 国产网红主播福利一区二区| 欧美一区二区精品久久911| 日本高清视频一区二区| 成人精品一区二区三区四区 | 88在线观看91蜜桃国自产| 顶级嫩模精品视频在线看| 男人操女人的视频在线观看欧美| 亚洲美女精品一区| 国产精品卡一卡二| 国产欧美一区二区精品忘忧草| 欧美第一区第二区| 91精品国产免费| 欧美欧美欧美欧美| 在线不卡免费av| 欧美日韩中文国产| 欧美色成人综合| 欧美在线一区二区| 欧美亚日韩国产aⅴ精品中极品| eeuss鲁片一区二区三区在线观看| 国产综合色在线视频区| 激情丁香综合五月| 国模大尺度一区二区三区| 精一区二区三区| 国内精品伊人久久久久av一坑| 久久精品国产第一区二区三区| 日本亚洲免费观看| 麻豆精品在线观看| 狠狠色丁香久久婷婷综合丁香| 国内精品伊人久久久久av影院| 国产精品中文欧美| 从欧美一区二区三区| 成人黄页在线观看| 99久久777色| 精品视频色一区| 日韩午夜小视频| 久久精品一区二区三区不卡牛牛| 久久久国产精品午夜一区ai换脸| 国产日韩亚洲欧美综合| 国产精品免费免费| 亚洲精品欧美专区| 手机精品视频在线观看| 国内成+人亚洲+欧美+综合在线| 国产精品一区二区视频| 99综合影院在线| 在线观看91视频| 欧美一区二区三区系列电影| 日韩三级视频中文字幕| 国产欧美精品一区二区三区四区 | 国产精品123区| 99精品在线观看视频| 欧美日韩国产综合一区二区| 精品日韩在线观看| 国产精品久久久久久一区二区三区 | 91丨porny丨国产入口| 欧美日韩一区二区三区视频 | 久久久久久久久久久久久久久99| 国产精品天干天干在观线| 亚洲人成网站精品片在线观看| 婷婷综合另类小说色区| 国产麻豆视频一区| 色先锋久久av资源部| 精品少妇一区二区三区视频免付费 | 麻豆91精品91久久久的内涵| 成人毛片视频在线观看| 欧美乱熟臀69xxxxxx| 中文字幕欧美国产| 日韩精品亚洲一区| 成人av网站免费| 日韩精品一区在线| 一区二区三区精品在线| 国产一区二区不卡老阿姨| 欧美午夜免费电影| 欧美激情一区二区三区四区| 日韩综合在线视频| 97久久精品人人做人人爽50路 | 久久久久国产精品人| 亚洲影院免费观看| 国产风韵犹存在线视精品| 91精品国产麻豆| 一区二区三区四区视频精品免费| 国精产品一区一区三区mba桃花 | 亚洲午夜激情网站| 成人aaaa免费全部观看| 日韩一级高清毛片| 亚洲二区在线视频| 91一区一区三区| 国产精品视频在线看| 国内外精品视频| 日韩女优av电影| 日本在线不卡视频一二三区| 欧美综合色免费| 亚洲日本在线视频观看| 粉嫩av亚洲一区二区图片| 26uuu国产一区二区三区| 日韩av一区二区三区| 欧美视频自拍偷拍| 亚洲一区二区在线免费观看视频| 国产成人亚洲综合a∨猫咪| 精品福利在线导航| 久久99精品国产麻豆婷婷洗澡| 717成人午夜免费福利电影| 亚洲国产成人av好男人在线观看| 色综合天天狠狠| 亚洲女爱视频在线| 在线亚洲一区观看| 亚洲午夜精品在线| 91精品在线一区二区|