;;; ;;; Table of Contents, ht2.s6 ;;; ;;; i. Initializations and loads ;;; I. New evaluation criterion ;;; II. Selection space setup ;;; III. Evaluation operators ;;; ;;; Copyright 1994. F. E. Ritter & R. M. Young. #| Last substantially modified: 6Apr93-FER ;;; ;;; 5/7/95 Gary Jones - NNPSCM conversion. ;;; ;;; 27/7/95 Gary Jones - Altered references to to be . ;;; For example, state is now state . ;;; Just to make it easier to understand. ;;; Also commented out two of the default rules, ;;; one which is now a duplicate, the other ;;; no longer need apply (and gives an error). ;;; ;;; 10/8/95 Gary Jones - Commented out duplicate default rule ;;; default*selection*propose*evaluate-object. ht2 loads ht.s6 but: - There is also a selection space for assessing Eat best etc. - There are hand-written application rules, i.e., chomp chomp occurs initially in a sub-space. |# ;;; ;;; i. Initializations and loads ;;; ;; Build upon the previous version of hungry-thirsty: load "ht.s6" learn off echo "learn off; " ;; Remove a production so that we get forced into an impasse excise ht*compare*eat*better*drink ;;; ;;; I. New evaluation criterion ;;; ;;; Redo the evaluation criterion, this time, in the default selection ;;; space (created below in a simplified form in Sections II and III). (sp selection*evaluate*eat (state ^problem-space.name selection ^operator ^superstate ) ( ^name evaluate-object ^object ) ( ^name eat) ( ^desired ) ( ^hungry no) --> ( ^evaluation + &) ( ^value t ^object ^quality excellent)) (sp selection*evaluate*drink*not*thirsty (state ^problem-space.name selection ) ( ^operator ^superstate ) ( ^name evaluate-object ^object ) ( ^name drink) ( ^desired ) ( -^thirsty yes) --> ( ^evaluation + &) ( ^object ^value t ^quality indifferent)) (sp selection*evaluate*drink*thirsty (state ^problem-space.name selection ) ( ^operator ^superstate ) ( ^name evaluate-object ^object ) ( ^name drink) ( ^desired ) ( ^thirsty yes) --> ( ^evaluation + &) ( ^object ^value t ^quality good)) (sp selection*propose*pass-up-excellent (state ^problem-space.name selection ) ( ^evaluation ) ( ^value t ^quality excellent ^object ) --> ( ^operator + <) ( ^name pass-up ^type pass-up-excellent ^object )) ;; pass-up-good operator will be tied for worst (sp selection*propose*pass-up-good (state ^problem-space.name selection ) ( ^evaluation ) ( ^value t ^quality good ^object ) --> ( ^operator + <) ( ^name pass-up ^type pass-up-good ^object )) ;; prefer to pass-up excellent things. (sp selection*compare*excellent*better*good (state ^problem-space.name selection) ( ^operator +) ( ^type pass-up-excellent) ( ^operator +) ( ^type pass-up-good) --> ( ^operator > )) ;; Note how this production references a higher goal and passes ;; information up. (sp selection*apply*pass-up (state ^superstate ^problem-space.name selection ^operator ) ( ^name pass-up ^object ) ( ^evaluation ) ( ^object ) --> ( ^operator >)) ;;; ;;; II. Selection space setup ;;; ;;; We use several rules taken from default rules and slightly ;;; simplified them to set up this selection space. ;;; ;;; ********************************************************** ;;; Like most bodies of knowledge, there are places that are difficult ;;; for novices, and in Soar, this is such an area. We don't ;;; particularly expect you in your first day to understand all that ;;; is here. You may wish to ignore this part of the model and continue ;;; on. ;;; ********************************************************** ;;; ;;; The slightly different formating between rules comes from the ;;; default productions file's various formats. ;;; A. default*selection*propose*space*selection ;;; Use the selection problem space for all multiple choice impasses. ;;; make it acceptable (+) but worst (<) so that nearly any other ;;; space will dominate. (sp default*selection*propose*space*selection :default (state ^choices multiple) --> ( ^problem-space

+

< ) (

^name selection)) ;;; B. default*selection*propose*initial-state ;;; The state of the selection problem space will hold the ;;; evaluations. ;;;GJ 27/7/95 Commented out cos seems no longer applicable, ;;; and generates error. ;;;(sp default*selection*propose*initial-state ;;; :default ;;; (state ^problem-space.name selection) ;;; --> ;;; ( +)) ;;; ;;; III. Evaluation operators ;;; ;; ;; 7.3.1 The evaluate-object operator ;; ;;; A. default*selection*propose*operator*evaluate-object ;;; Create evaluate operator in selection problem space. ;; the squirrelly bracket indicates a set of grouped clauses, the not ;; sign indicates that the set of clauses can't be matched for the ;; production to fire. ;; GJ 10/8/95: Taken out because it's a duplicate of a default rule. ;; Originally it had a slightly different name which meant that ;; operators were getting duplicated. ;;(sp default*selection*propose*evaluate-object ;; :default ;; (state ^problem-space.name selection ^item ) ;; -{( ^evaluation ) ;; ( ^object ^value t)} ;; --> ;; ( ^name evaluate-object ^object ) ;; ( ^operator +)) ;;; B. default*selection*select*operator*evaluate-object*indifferent ;;; Make them indifferent if not ^operator-selection not-indifferent. ;;; The '=' indicates an indifferent preference. ;;; GJ 27/7/95 This rule commented out cos theres a default one the same ;;;(sp default*selection*select*operator*evaluate-object*indifferent ;;; :default ;;; (state ^problem-space

^operator +) ;;; (

^name selection - ^operator-selection not-indifferent) ;;; ( ^name evaluate-object) ;;; --> ;;; ( ^operator =)) ;;; ;;; Reconsider evaluation operator after it finishes to allow next one ;;; in. ;;; (sp default*terminate*evaluate-object :default (state ^operator ) ( ^evaluation ) ( ^object ) ( ^object ^value ) --> ( ^operator @)) ;;;--------------------------------------------------------------- ;;; END OF FILE ;;;---------------------------------------------------------------