;;; ********************************************************************* ;;; Susan Fox ;;; December 27, 2000 ;;; File: casemem.ss ;;; This file defines the initial case memory of the system ;;; ;;; The initial structure has major branches for each different kind of ;;; case in memory, and then, for now, all cases are simply stored ;;; at a leaf. I'll improve it when I have the time. ;;; Requires the memory files to have been loaded (if (not (top-level-bound? 'MEMORY.SSLOADED)) (load "memory.ss")) (if (not (top-level-bound? 'MAP.SSLOADED)) (load "map.ss")) (define CASEMEM.SSLOADED #t) ;;; ********************************************************************* (define case-memory (make-node (build-index 'unspec) 3 ;; first child: index-case (make-empty-tree) ;; second child: adapt-case (make-empty-tree) ;; third child: plan cases (make-leaf (make-case (build-index 'unspec) '(behavior ((goStraight mod-fast curr-head) med) ((avoidObstacle 150 moderate) med) ((goToPos curr-pos-goal mod-fast 100) high) ((avoidCollision 50 mod-fast) high))) (make-case (build-index 'unspec) '(behavior ((followHallway curr-corr curr-head) med) ((moveForward slow) med) ((slowAvoid 50 very-slow) med-high) ((avoidCollision 20 fast) high) ((goToPos curr-pos-goal slow 100) med))) (make-case (build-index (list 'task-loc (value-of-name 'olri-245))) '(plan (move (dir north) (in (location-name atrium)) (to (obstacle-type wall))) (move (dir east) (in (location-name atrium)) (to (location-name north-olin-hallway))) (move (dir east) (in (location-name north-olin-hallway)) (to (location-name olri-245))))) (make-case (build-index 'unspec) '(plan (move (dir west) (in (location-name south-olin-hallway)) (to (location-name atrium))) (move (dir north) (in (location-name atrium)) (to (location-name mid-olin-hallway))) (move (dir east) (in (location-name mid-olin-hallway)) (to (location-name olri-255))))))))