⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dfrulcmd.exp

📁 NASA 开发使用的一个专家系统
💻 EXP
📖 第 1 页 / 共 2 页
字号:
0      foo: f-1,f-30      foo: f-0,f-30      foo: f-2,f-40      foo: f-1,f-40      foo: f-0,f-4For a total of 6 activations.CLIPS> (clear)CLIPS> (defrule bar (or (a ?) (b ?)) =>)CLIPS> (assert (a 1) (b 1) (a 2) (b 2) (a 3) (b 3))<Fact-5>CLIPS> (run 3)CLIPS> (agenda)0      bar: f-20      bar: f-10      bar: f-0For a total of 3 activations.CLIPS> (refresh bar)CLIPS> (agenda)0      bar: f-30      bar: f-50      bar: f-40      bar: f-20      bar: f-10      bar: f-0For a total of 6 activations.CLIPS> (clear)CLIPS> (defrule yak (a ?) (b ?) =>)CLIPS> (defrule flx (declare (salience 1)) (a ?) (b ?) =>)CLIPS> (assert (a 1) (b 1) (a 2) (b 2))<Fact-3>CLIPS> (agenda)1      flx: f-0,f-31      flx: f-2,f-31      flx: f-2,f-11      flx: f-0,f-10      yak: f-0,f-30      yak: f-2,f-30      yak: f-2,f-10      yak: f-0,f-1For a total of 8 activations.CLIPS> (run)CLIPS> (refresh yak)CLIPS> (agenda)0      yak: f-0,f-10      yak: f-2,f-10      yak: f-2,f-30      yak: f-0,f-3For a total of 4 activations.CLIPS> (clear) ; strategy commandsCLIPS> (set-strategy depth)depthCLIPS> (get-strategy)depthCLIPS> (set-strategy)[ARGACCES4] Function set-strategy expected exactly 1 argument(s)CLIPS> (set-strategy depth 20)[ARGACCES4] Function set-strategy expected exactly 1 argument(s)CLIPS> (get-strategy 10)[ARGACCES4] Function get-strategy expected exactly 0 argument(s)CLIPS> (set-strategy breadth)depthCLIPS> (get-strategy)breadthCLIPS> (set-strategy lex)breadthCLIPS> (get-strategy)lexCLIPS> (set-strategy mea)lexCLIPS> (get-strategy)meaCLIPS> (set-strategy simplicity)meaCLIPS> (get-strategy)simplicityCLIPS> (set-strategy complexity)simplicityCLIPS> (get-strategy)complexityCLIPS> (set-strategy random)complexityCLIPS> (get-strategy)randomCLIPS> (set-strategy bogus)[ARGACCES5] Function set-strategy expected argument #1 to be of type symbol with value depth, breadth, lex, mea, complexity, simplicity, or randomrandomCLIPS> (get-strategy)randomCLIPS> (set-strategy depth)randomCLIPS> (clear) ; salience-evaluation commandsCLIPS> (set-salience-evaluation when-defined)when-definedCLIPS> (get-salience-evaluation)when-definedCLIPS> (set-salience-evaluation)[ARGACCES4] Function set-salience-evaluation expected exactly 1 argument(s)CLIPS> (set-salience-evaluation when-defined 20)[ARGACCES4] Function set-salience-evaluation expected exactly 1 argument(s)CLIPS> (get-salience-evaluation 10)[ARGACCES4] Function get-salience-evaluation expected exactly 0 argument(s)CLIPS> (set-salience-evaluation when-activated)when-definedCLIPS> (get-salience-evaluation)when-activatedCLIPS> (set-salience-evaluation every-cycle)when-activatedCLIPS> (get-salience-evaluation)every-cycleCLIPS> (set-salience-evaluation bogus)[ARGACCES5] Function set-salience-evaluation expected argument #1 to be of type symbol with value when-defined, when-activated, or every-cycleevery-cycleCLIPS> (get-salience-evaluation)every-cycleCLIPS> (set-salience-evaluation when-defined)every-cycleCLIPS> (clear) ; refresh-agenda commandCLIPS> (refresh-agenda 10)[ARGACCES5] Function refresh-agenda expected argument #1 to be of type symbolCLIPS> (clear) ; incremental-reset commandCLIPS> (set-incremental-reset TRUE)TRUECLIPS> (get-incremental-reset)TRUECLIPS> (set-incremental-reset)[ARGACCES4] Function set-incremental-reset expected exactly 1 argument(s)CLIPS> (get-incremental-reset)TRUECLIPS> (get-incremental-reset 20)[ARGACCES4] Function get-incremental-reset expected exactly 0 argument(s)CLIPS> (set-incremental-reset 10)TRUECLIPS> (get-incremental-reset)TRUECLIPS> (set-incremental-reset FALSE)TRUECLIPS> (get-incremental-reset)FALSECLIPS> (set-incremental-reset TRUE)FALSECLIPS> (get-incremental-reset)TRUECLIPS> (clear) ; Some new 6.0 featuresCLIPS> (defrule BOGUS::d5 =>)[PRNTUTIL1] Unable to find defmodule BOGUS.ERROR:(defrule BOGUS::d5CLIPS> (defmodule FOO)CLIPS> (defrule FOO::d1 =>)[FACTLHS1] WARNING: Creating implied initial-fact deftemplate in module FOO.  You probably want to import this deftemplate from the MAIN module.CLIPS> (defrule FOO::d2 =>)CLIPS> (defmodule BAR)CLIPS> (defrule BAR::d2 =>)[FACTLHS1] WARNING: Creating implied initial-fact deftemplate in module BAR.  You probably want to import this deftemplate from the MAIN module.CLIPS> (defrule BAR::d3 =>)CLIPS> (list-defrules BOGUS)[ARGACCES5] Function list-defrules expected argument #1 to be of type defmodule nameCLIPS> (list-defrules FOO 7)[ARGACCES4] Function list-defrules expected no more than 1 argument(s)CLIPS> (list-defrules FOO)d1d2For a total of 2 defrules.CLIPS> (list-defrules BAR)d2d3For a total of 2 defrules.CLIPS> (list-defrules)d2d3For a total of 2 defrules.CLIPS> (list-defrules *)MAIN:FOO:   d1   d2BAR:   d2   d3For a total of 4 defrules.CLIPS> (get-defrule-list 7)[ARGACCES5] Function get-defrule-list expected argument #1 to be of type symbolCLIPS> (get-defrule-list BOGUS 7)[ARGACCES4] Function get-defrule-list expected no more than 1 argument(s)CLIPS> (get-defrule-list)(d2 d3)CLIPS> (get-defrule-list BOGUS)[ARGACCES5] Function get-defrule-list expected argument #1 to be of type defmodule name()CLIPS> (get-defrule-list FOO)(d1 d2)CLIPS> (get-defrule-list BAR)(d2 d3)CLIPS> (get-defrule-list *)(FOO::d1 FOO::d2 BAR::d2 BAR::d3)CLIPS> (ppdefrule d1)[PRNTUTIL1] Unable to find defrule d1.CLIPS> (ppdefrule d2)(defrule BAR::d2   =>)CLIPS> (ppdefrule d3)(defrule BAR::d3   =>)CLIPS> (ppdefrule BOGUS::d2)[PRNTUTIL1] Unable to find defrule BOGUS::d2.CLIPS> (ppdefrule FOO::d1)(defrule FOO::d1   =>)CLIPS> (ppdefrule FOO::d2)(defrule FOO::d2   =>)CLIPS> (ppdefrule FOO::d3)[PRNTUTIL1] Unable to find defrule FOO::d3.CLIPS> (ppdefrule BAR::d1)[PRNTUTIL1] Unable to find defrule BAR::d1.CLIPS> (ppdefrule BAR::d2)(defrule BAR::d2   =>)CLIPS> (ppdefrule BAR::d3)(defrule BAR::d3   =>)CLIPS> (defrule-module)[ARGACCES4] Function defrule-module expected exactly 1 argument(s)CLIPS> (defrule-module bogus)[PRNTUTIL1] Unable to find defrule bogus.FALSECLIPS> (defrule-module d3 7)[ARGACCES4] Function defrule-module expected exactly 1 argument(s)CLIPS> (defrule-module d2)BARCLIPS> (defrule-module d3)BARCLIPS> (defrule-module FOO::d1)FOOCLIPS> (defrule-module FOO::d2)FOOCLIPS> (defrule-module BAR::d2)BARCLIPS> (defrule-module BAR::d3)BARCLIPS> (undefrule BOGUS::d2)[PRNTUTIL1] Unable to find defrule BOGUS::d2.CLIPS> (undefrule FOO::d2)CLIPS> (list-defrules *)MAIN:FOO:   d1BAR:   d2   d3For a total of 3 defrules.CLIPS> (undefrule BAR::d2)CLIPS> (list-defrules *)MAIN:FOO:   d1BAR:   d3For a total of 2 defrules.CLIPS> (undefrule *)CLIPS> (list-defrules *)MAIN:FOO:   d1BAR:For a total of 1 defrule.CLIPS> (clear)CLIPS> (set-salience-evaluation when-activated)when-definedCLIPS> (defglobal ?*x* = 0)CLIPS> (defmodule MAIN (export ?ALL))CLIPS> (defrule MAIN::d0 (declare (salience ?*x*)) => (focus FOO BAR))CLIPS> (defmodule FOO (import MAIN ?ALL))CLIPS> (defrule FOO::d1 (declare (salience ?*x*)) =>)CLIPS> (defrule FOO::d2 (declare (salience ?*x*)) =>)CLIPS> (defmodule BAR (import MAIN ?ALL))CLIPS> (defrule BAR::d2 (declare (salience ?*x*)) =>)CLIPS> (defrule BAR::d3 (declare (salience ?*x*)) =>)CLIPS> (reset)CLIPS> (agenda BOGUS)[ARGACCES5] Function agenda expected argument #1 to be of type defmodule nameCLIPS> (agenda 7)[ARGACCES5] Function agenda expected argument #1 to be of type symbolCLIPS> (agenda FOO 7)[ARGACCES4] Function agenda expected no more than 1 argument(s)CLIPS> (agenda)0      d0: f-0For a total of 1 activation.CLIPS> (agenda MAIN)0      d0: f-0For a total of 1 activation.CLIPS> (agenda FOO)0      d1: f-00      d2: f-0For a total of 2 activations.CLIPS> (agenda BAR)0      d2: f-00      d3: f-0For a total of 2 activations.CLIPS> (agenda *)MAIN:   0      d0: f-0FOO:   0      d1: f-0   0      d2: f-0BAR:   0      d2: f-0   0      d3: f-0For a total of 5 activations.CLIPS> (bind ?*x* 1)1CLIPS> (refresh-agenda BOGUS)[ARGACCES5] Function refresh-agenda expected argument #1 to be of type defmodule nameCLIPS> (refresh-agenda 7)[ARGACCES5] Function refresh-agenda expected argument #1 to be of type symbolCLIPS> (refresh-agenda FOO 7)[ARGACCES4] Function refresh-agenda expected no more than 1 argument(s)CLIPS> (refresh-agenda)CLIPS> (agenda *)MAIN:   1      d0: f-0FOO:   0      d1: f-0   0      d2: f-0BAR:   0      d2: f-0   0      d3: f-0For a total of 5 activations.CLIPS> (refresh-agenda FOO)CLIPS> (agenda *)MAIN:   1      d0: f-0FOO:   1      d1: f-0   1      d2: f-0BAR:   0      d2: f-0   0      d3: f-0For a total of 5 activations.CLIPS> (refresh-agenda BAR)CLIPS> (agenda *)MAIN:   1      d0: f-0FOO:   1      d1: f-0   1      d2: f-0BAR:   1      d2: f-0   1      d3: f-0For a total of 5 activations.CLIPS> (bind ?*x* 2)2CLIPS> (agenda *)MAIN:   1      d0: f-0FOO:   1      d1: f-0   1      d2: f-0BAR:   1      d2: f-0   1      d3: f-0For a total of 5 activations.CLIPS> (refresh-agenda *)CLIPS> (agenda *)MAIN:   2      d0: f-0FOO:   2      d1: f-0   2      d2: f-0BAR:   2      d2: f-0   2      d3: f-0For a total of 5 activations.CLIPS> (set-break FOO::d1)CLIPS> (set-break BAR::d3)CLIPS> (show-breaks BOGUS)[ARGACCES5] Function show-breaks expected argument #1 to be of type defmodule nameCLIPS> (show-breaks 7)[ARGACCES5] Function show-breaks expected argument #1 to be of type symbolCLIPS> (show-breaks FOO 7)[ARGACCES4] Function show-breaks expected no more than 1 argument(s)CLIPS> (show-breaks)CLIPS> (show-breaks MAIN)CLIPS> (show-breaks FOO)d1CLIPS> (show-breaks BAR)d3CLIPS> (show-breaks *)MAIN:FOO:   d1BAR:   d3CLIPS> (dribble-off)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -