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

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

?? mab.clp

?? 介紹ANTLR使用的JAVA程序例子
?? CLP
字號:

;;;======================================================
;;;   Monkees and Bananas Sample Problem
;;;
;;;     This is an extended version of a
;;;     rather common AI planning problem.
;;;     The point is for the monkee to find
;;;     and eat some bananas.
;;;
;;;     CLIPS Version 6.0 Example
;;;
;;;     To execute, merely load, reset and run.
;;;======================================================
             
;;;*************
;;;* TEMPLATES *
;;;*************

(deftemplate monkey 
   (slot location 
      (type SYMBOL) 
      (default green-couch))
   (slot on-top-of 
      (type SYMBOL) 
      (default floor)) 
   (slot holding 
      (type SYMBOL) 
      (default nothing)))

(deftemplate thing 
   (slot name 
      (type SYMBOL)
      (default ?NONE)) 
   (slot location 
      (type SYMBOL)
      (default ?NONE)) 
   (slot on-top-of 
      (type SYMBOL) 
      (default floor))
   (slot weight 
      (type SYMBOL) 
      (allowed-symbols light heavy)
      (default light)))
                    
(deftemplate chest 
   (slot name 
      (type SYMBOL)
      (default ?NONE)) 
   (slot contents 
      (type SYMBOL)
      (default ?NONE)) 
   (slot unlocked-by 
      (type SYMBOL)
      (default ?NONE)))
               
(deftemplate goal-is-to 
   (slot action 
      (type SYMBOL)
      (allowed-symbols hold unlock eat move on walk-to)
      (default ?NONE)) 
   (multislot arguments 
      (type SYMBOL)
      (default ?NONE)))
             
;;;*************************
;;;* CHEST UNLOCKING RULES *
;;;*************************

(defrule hold-chest-to-put-on-floor "" 
  (goal-is-to (action unlock) (arguments ?chest))
  (thing (name ?chest) (on-top-of ~floor) (weight light))
  (monkey (holding ~?chest))
  (not (goal-is-to (action hold) (arguments ?chest)))
  =>
  (assert (goal-is-to (action hold) (arguments ?chest))))

(defrule put-chest-on-floor "" 
  (goal-is-to (action unlock) (arguments ?chest))
  ?monkey <- (monkey (location ?place) (on-top-of ?on) (holding ?chest))
  ?thing <- (thing (name ?chest))
  =>
  (printout t "Monkey throws the " ?chest " off the " 
              ?on " onto the floor." crlf)
  (modify ?monkey (holding blank))
  (modify ?thing (location ?place) (on-top-of floor)))

(defrule get-key-to-unlock "" 
  (goal-is-to (action unlock) (arguments ?obj))
  (thing (name ?obj) (on-top-of floor))
  (chest (name ?obj) (unlocked-by ?key))
  (monkey (holding ~?key))
  (not (goal-is-to (action hold) (arguments ?key)))
  =>
  (assert (goal-is-to (action hold) (arguments ?key))))

(defrule move-to-chest-with-key "" 
  (goal-is-to (action unlock) (arguments ?chest))
  (monkey (location ?mplace) (holding ?key))
  (thing (name ?chest) (location ?cplace&~?mplace) (on-top-of floor))
  (chest (name ?chest) (unlocked-by ?key))
  (not (goal-is-to (action walk-to) (arguments ?cplace)))
  =>
  (assert (goal-is-to (action walk-to) (arguments ?cplace))))

(defrule unlock-chest-with-key "" 
  ?goal <- (goal-is-to (action unlock) (arguments ?name))
  ?chest <- (chest (name ?name) (contents ?contents) (unlocked-by ?key))
  (thing (name ?name) (location ?place) (on-top-of ?on))
  (monkey (location ?place) (on-top-of ?on) (holding ?key))
  =>
  (printout t "Monkey opens the " ?name " with the " ?key 
              " revealing the " ?contents "." crlf)
  (modify ?chest (contents nothing))
  (assert (thing (name ?contents) (location ?place) (on-top-of ?name)))
  (retract ?goal))

;;;*********************
;;;* HOLD OBJECT RULES * 
;;;*********************

(defrule unlock-chest-to-hold-object ""
  (goal-is-to (action hold) (arguments ?obj))
  (chest (name ?chest) (contents ?obj))
  (not (goal-is-to (action unlock) (arguments ?chest)))
  =>
  (assert (goal-is-to (action unlock) (arguments ?chest))))

(defrule use-ladder-to-hold ""
  (goal-is-to (action hold) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ceiling) (weight light))
  (not (thing (name ladder) (location ?place)))
  (not (goal-is-to (action move) (arguments ladder ?place)))
  =>
  (assert (goal-is-to (action move) (arguments ladder ?place))))

(defrule climb-ladder-to-hold ""
  (goal-is-to (action hold) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ceiling) (weight light))
  (thing (name ladder) (location ?place) (on-top-of floor))
  (monkey (on-top-of ~ladder))
  (not (goal-is-to (action on) (arguments ladder)))
  =>
  (assert (goal-is-to (action on) (arguments ladder))))

(defrule grab-object-from-ladder "" 
  ?goal <- (goal-is-to (action hold) (arguments ?name))
  ?thing <- (thing (name ?name) (location ?place) 
                     (on-top-of ceiling) (weight light))
  (thing (name ladder) (location ?place))
  ?monkey <- (monkey (location ?place) (on-top-of ladder) (holding blank))
  =>
  (printout t "Monkey grabs the " ?name "." crlf)
  (modify ?thing (location held) (on-top-of held))
  (modify ?monkey (holding ?name))
  (retract ?goal))

(defrule climb-to-hold "" 
  (goal-is-to (action hold) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ?on&~ceiling) (weight light))
  (monkey (location ?place) (on-top-of ~?on))
  (not (goal-is-to (action on) (arguments ?on)))
  =>
  (assert (goal-is-to (action on) (arguments ?on))))

(defrule walk-to-hold ""
  (goal-is-to (action hold) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ~ceiling) (weight light))
  (monkey (location ~?place))
  (not (goal-is-to (action walk-to) (arguments ?place)))
  =>
  (assert (goal-is-to (action walk-to) (arguments ?place))))

(defrule drop-to-hold ""
  (goal-is-to (action hold) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ?on) (weight light))
  (monkey (location ?place) (on-top-of ?on) (holding ~blank))
  (not (goal-is-to (action hold) (arguments blank)))
  =>
  (assert (goal-is-to (action hold) (arguments blank))))

(defrule grab-object "" 
  ?goal <- (goal-is-to (action hold) (arguments ?name))
  ?thing <- (thing (name ?name) (location ?place) 
                     (on-top-of ?on) (weight light))
  ?monkey <- (monkey (location ?place) (on-top-of ?on) (holding blank))
  =>
  (printout t "Monkey grabs the " ?name "." crlf)
  (modify ?thing (location held) (on-top-of held))
  (modify ?monkey (holding ?name))
  (retract ?goal))

(defrule drop-object ""  
  ?goal <- (goal-is-to (action hold) (arguments blank))
  ?monkey <- (monkey (location ?place) 
                     (on-top-of ?on) 
                     (holding ?name&~blank))
  ?thing <- (thing (name ?name))
  =>
  (printout t "Monkey drops the " ?name "." crlf)
  (modify ?monkey (holding blank))
  (modify ?thing (location ?place) (on-top-of ?on))
  (retract ?goal))

;;;*********************
;;;* MOVE OBJECT RULES * 
;;;*********************

(defrule unlock-chest-to-move-object "" 
  (goal-is-to (action move) (arguments ?obj ?))
  (chest (name ?chest) (contents ?obj))
  (not (goal-is-to (action unlock) (arguments ?chest)))
  =>
  (assert (goal-is-to (action unlock) (arguments ?chest))))

(defrule hold-object-to-move ""  
  (goal-is-to (action move) (arguments ?obj ?place))
  (thing (name ?obj) (location ~?place) (weight light))
  (monkey (holding ~?obj))
  (not (goal-is-to (action hold) (arguments ?obj)))
  =>
  (assert (goal-is-to (action hold) (arguments ?obj))))

(defrule move-object-to-place "" 
  (goal-is-to (action move) (arguments ?obj ?place))
  (monkey (location ~?place) (holding ?obj))
  (not (goal-is-to (action walk-to) (arguments ?place)))
  =>
  (assert (goal-is-to (action walk-to) (arguments ?place))))

(defrule drop-object-once-moved "" 
  ?goal <- (goal-is-to (action move) (arguments ?name ?place))
  ?monkey <- (monkey (location ?place) (holding ?obj))
  ?thing <- (thing (name ?name) (weight light))
  =>
  (printout t "Monkey drops the " ?name "." crlf)
  (modify ?monkey (holding blank))
  (modify ?thing (location ?place) (on-top-of floor))
  (retract ?goal))

(defrule already-moved-object ""
  ?goal <- (goal-is-to (action move) (arguments ?obj ?place))
  (thing (name ?obj) (location ?place))
  =>
  (retract ?goal))

;;;***********************
;;;* WALK TO PLACE RULES *
;;;***********************

(defrule already-at-place "" 
  ?goal <- (goal-is-to (action walk-to) (arguments ?place))
  (monkey (location ?place))
  =>
  (retract ?goal))

(defrule get-on-floor-to-walk ""
  (goal-is-to (action walk-to) (arguments ?place))
  (monkey (location ~?place) (on-top-of ~floor))
  (not (goal-is-to (action on) (arguments floor)))
  =>
  (assert (goal-is-to (action on) (arguments floor))))

(defrule walk-holding-nothing ""
  ?goal <- (goal-is-to (action walk-to) (arguments ?place))
  ?monkey <- (monkey (location ~?place) (on-top-of floor) (holding blank))
  =>
  (printout t "Monkey walks to " ?place "." crlf)
  (modify ?monkey (location ?place))
  (retract ?goal))

(defrule walk-holding-object ""
  ?goal <- (goal-is-to (action walk-to) (arguments ?place))
  ?monkey <- (monkey (location ~?place) (on-top-of floor) (holding ?obj&~blank))
  =>
  (printout t "Monkey walks to " ?place " holding the " ?obj "." crlf)
  (modify ?monkey (location ?place))
  (retract ?goal))

;;;***********************
;;;* GET ON OBJECT RULES * 
;;;***********************

(defrule jump-onto-floor "" 
  ?goal <- (goal-is-to (action on) (arguments floor))
  ?monkey <- (monkey (on-top-of ?on&~floor))
  =>
  (printout t "Monkey jumps off the " ?on " onto the floor." crlf)
  (modify ?monkey (on-top-of floor))
  (retract ?goal))

(defrule walk-to-place-to-climb "" 
  (goal-is-to (action on) (arguments ?obj))
  (thing (name ?obj) (location ?place))
  (monkey (location ~?place))
  (not (goal-is-to (action walk-to) (arguments ?place)))
  =>
  (assert (goal-is-to (action walk-to) (arguments ?place))))

(defrule drop-to-climb "" 
  (goal-is-to (action on) (arguments ?obj))
  (thing (name ?obj) (location ?place))
  (monkey (location ?place) (holding ~blank))
  (not (goal-is-to (action hold) (arguments blank)))
  =>
  (assert (goal-is-to (action hold) (arguments blank))))

(defrule climb-indirectly "" 
  (goal-is-to (action on) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ?on))
  (monkey (location ?place) (on-top-of ~?on&~?obj) (holding blank))
  (not (goal-is-to (action on) (arguments ?on)))
  =>
  (assert (goal-is-to (action on) (arguments ?on))))

(defrule climb-directly ""  
  ?goal <- (goal-is-to (action on) (arguments ?obj))
  (thing (name ?obj) (location ?place) (on-top-of ?on))
  ?monkey <- (monkey (location ?place) (on-top-of ?on) (holding blank))
  =>
  (printout t "Monkey climbs onto the " ?obj "." crlf)
  (modify ?monkey (on-top-of ?obj))
  (retract ?goal))

(defrule already-on-object ""
  ?goal <- (goal-is-to (action on) (arguments ?obj))
  (monkey (on-top-of ?obj))
  =>
  (retract ?goal))

;;;********************
;;;* EAT OBJECT RULES * 
;;;********************

(defrule hold-to-eat ""
  (goal-is-to (action eat) (arguments ?obj))
  (monkey (holding ~?obj))
  (not (goal-is-to (action hold) (arguments ?obj)))
  =>
  (assert (goal-is-to (action hold) (arguments ?obj))))

(defrule satisfy-hunger ""
  ?goal <- (goal-is-to (action eat) (arguments ?name))
  ?monkey <- (monkey (holding ?name))
  ?thing <- (thing (name ?name))
  =>
  (printout t "Monkey eats the " ?name "." crlf)
  (modify ?monkey (holding blank))
  (retract ?goal ?thing))
 
;;;**********************
;;;* INITIAL STATE RULE * 
;;;**********************

(defrule startup ""
  =>
  (assert (monkey (location t5-7) (on-top-of green-couch) (holding blank)))
  (assert (thing (name green-couch) (location t5-7) (weight heavy)))
  (assert (thing (name red-couch) (location t2-2) (weight heavy)))
  (assert (thing (name big-pillow) (location t2-2) (on-top-of red-couch)))
  (assert (thing (name red-chest) (location t2-2) (on-top-of big-pillow)))
  (assert (chest (name red-chest) (contents ladder) (unlocked-by red-key)))
  (assert (thing (name blue-chest) (location t7-7) (on-top-of ceiling)))
  (assert (chest (name blue-chest) (contents bananas) (unlocked-by blue-key)))
  (assert (thing (name blue-couch) (location t8-8) (weight heavy)))
  (assert (thing (name green-chest) (location t8-8) (on-top-of ceiling)))
  (assert (chest (name green-chest) (contents blue-key) (unlocked-by red-key)))
  (assert (thing (name red-key) (location t1-3)))
  (assert (goal-is-to (action eat) (arguments bananas))))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人综合亚洲网站| 欧洲一区二区三区在线| 日本在线不卡视频| 性久久久久久久久久久久| 亚洲欧洲成人精品av97| 久久中文字幕电影| 亚洲精品一区二区三区99| 精品欧美一区二区在线观看| 精品国产一二三| 久久久噜噜噜久久中文字幕色伊伊| 精品日韩一区二区三区免费视频| 日韩免费电影一区| 精品国产91久久久久久久妲己| www国产精品av| 国产精品三级久久久久三级| 国产精品嫩草影院av蜜臀| 国产精品久久久久久久久免费樱桃| 国产精品网站在线观看| 自拍偷拍亚洲激情| 亚洲精品日韩一| 亚瑟在线精品视频| 久久99精品久久久久久国产越南 | 一本久久精品一区二区 | 国产精品白丝在线| 亚洲欧美激情小说另类| 亚洲国产一区二区三区 | 欧美日韩久久一区二区| 6080午夜不卡| 久久久久久久久久美女| 中文字幕在线不卡视频| 亚洲综合一区二区精品导航| 香蕉乱码成人久久天堂爱免费| 视频一区国产视频| 国产老女人精品毛片久久| 成人激情图片网| 欧美日韩国产色站一区二区三区| 在线播放91灌醉迷j高跟美女| 精品乱人伦一区二区三区| 国产精品女同互慰在线看 | 色999日韩国产欧美一区二区| 精品视频一区二区不卡| 精品国产乱码久久久久久老虎 | 欧美成人一区二区三区在线观看| 亚洲午夜电影在线观看| 亚洲综合在线免费观看| 麻豆精品一区二区综合av| 人人爽香蕉精品| 成人激情小说网站| 91精品视频网| 国产精品成人网| 久久精品噜噜噜成人88aⅴ| 不卡av在线网| 日韩视频中午一区| 亚洲色图在线看| 免费在线观看视频一区| 91色婷婷久久久久合中文| 日韩精品一区二区三区中文精品 | 免费视频最近日韩| 99久久99久久精品免费看蜜桃| 欧美人xxxx| 国产精品久久久久久久岛一牛影视| 午夜一区二区三区在线观看| 高清国产一区二区| 欧美一级在线观看| 亚洲欧美日韩在线播放| 国内精品视频666| 欧美日韩亚洲综合一区二区三区| 中文字幕久久午夜不卡| 日本不卡视频在线观看| 91网上在线视频| 久久久不卡网国产精品二区| 婷婷综合另类小说色区| 色综合久久99| 国产精品久久久久一区二区三区| 久久99久国产精品黄毛片色诱| 在线影视一区二区三区| 国产精品黄色在线观看| 激情图区综合网| 欧美猛男男办公室激情| 亚洲欧美日韩国产成人精品影院 | 日韩精品在线网站| 无吗不卡中文字幕| 色婷婷国产精品| 国产精品丝袜一区| 国产高清视频一区| 精品免费日韩av| 六月丁香综合在线视频| 4438x亚洲最大成人网| 一区二区三区在线播放| 91亚洲永久精品| 国产精品视频九色porn| 国产成人啪午夜精品网站男同| 欧美一级欧美三级在线观看| 午夜日韩在线电影| 欧美少妇bbb| 亚洲一区二区三区三| 91久久精品午夜一区二区| 亚洲欧洲成人自拍| 91视频国产观看| 亚洲欧美激情小说另类| 色综合久久88色综合天天6| 亚洲蜜桃精久久久久久久| 99久久免费国产| 中文字幕日韩欧美一区二区三区| 成人av在线资源网| 中文字幕一区在线观看| 亚洲欧洲精品一区二区三区不卡| 成人性生交大合| 国产精品色呦呦| 99精品视频在线观看免费| 亚洲欧洲精品一区二区三区 | 欧美在线三级电影| 亚洲图片一区二区| 91精品福利在线| 精品捆绑美女sm三区| 国模冰冰炮一区二区| 国产视频一区二区在线观看| 国产不卡一区视频| 国产精品久久久久一区二区三区 | 欧美电影免费观看高清完整版在线| 日韩av二区在线播放| 亚洲精品一线二线三线| 国产盗摄视频一区二区三区| 国产精品私人自拍| 欧美在线短视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 精品日本一线二线三线不卡| 国产精品一线二线三线精华| 国产精品不卡视频| 欧美日韩美女一区二区| 精品一区二区在线看| 国产日韩欧美综合一区| 色综合久久99| 麻豆成人av在线| 亚洲国产精品高清| 在线观看亚洲成人| 久久精品99国产精品日本| 国产三级精品视频| 91福利在线播放| 蜜臀久久久99精品久久久久久| 国产亚洲一二三区| 欧洲一区在线观看| 激情六月婷婷综合| 亚洲欧洲精品成人久久奇米网| 欧美高清视频一二三区| 国产毛片精品一区| 亚洲一二三四在线| 久久久欧美精品sm网站| 欧美日韩中文精品| 成人在线视频一区| 日韩电影在线一区| 最好看的中文字幕久久| 日韩欧美国产三级电影视频| aaa欧美日韩| 韩国av一区二区三区在线观看| ...xxx性欧美| 欧美精品一区二区蜜臀亚洲| 一本色道久久综合亚洲精品按摩 | 91精品国产欧美一区二区18| 成人免费视频caoporn| 日韩精品一区第一页| 国产精品毛片久久久久久久| 日韩一区二区三区免费观看| 色综合天天在线| 国产一区二区三区四区五区入口 | 国产拍欧美日韩视频二区| 欧美视频在线不卡| 成人性生交大片免费看视频在线| 日本不卡在线视频| 一区二区三区在线播放| 国产女人aaa级久久久级| 91精品国产入口| 欧美熟乱第一页| 一本到不卡免费一区二区| 国产九色sp调教91| 免费在线看成人av| 亚洲成av人影院| 亚洲免费观看高清完整版在线 | 亚洲精品一区二区三区精华液| 欧美丝袜丝交足nylons| 91蝌蚪porny成人天涯| 国产乱码精品一区二区三区忘忧草| 午夜影视日本亚洲欧洲精品| 亚洲欧美激情视频在线观看一区二区三区 | 国产成人免费视频网站| 日本成人在线不卡视频| 午夜精品福利在线| 亚洲乱码国产乱码精品精可以看 | 日韩av午夜在线观看| 国产精品免费aⅴ片在线观看| 精品少妇一区二区三区视频免付费 | 国产成人亚洲综合色影视| 奇米影视一区二区三区| 午夜免费久久看| 亚洲午夜久久久久久久久电影院| 亚洲欧美中日韩| 中文字幕一区二区三中文字幕| 久久精品夜色噜噜亚洲a∨| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩视频永久免费|