;;;;;;;SCI-FROBS.l By Brian Cole ;;;;;;;High School Computing institute 1997 ;;;;;;;West Jordan High ;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; File: sci-frobs.l ; Description: This file contains the definitions of all the frobs that ; are used by the sci-rover-interface. ; Author: Patrick Dalton ; Created: 22-Jul-92 ; Package: ; RCS $Header: $ ; ; (c) Copyright 1992, University of Utah ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Magic Incantations ;;; (eval-when (compile load eval) (in-package :cole) (require "frobs") (require "cassini")) (eval-when (compile load eval) (use-package "FROBS") (shadowing-import 'cassini::collect) (use-package "CASSINI")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; sci-rover frob ;;; (def-class sci-rover {class daemon} :slots (id m x y battery-charge charges-left collection body arm laser consequence visits view ;; The sensor and emitter slots. ;; "ss" means "sensor status" ;; "es" means "emitter status" ;; "emit-p" means "is the emitter on" vis-ss vis-es vis-emit-p ir-ss ir-es ir-emit-p uv-ss uv-es uv-emit-p radio-ss radio-es radio-emit-p uwave-ss uwave-es uwave-emit-p xray-ss xray-es xray-emit-p audio-ss audio-es audio-emit-p north north-visits ;; Type of interface and number of visits there south south-visits east east-visits west west-visits fuel-remaining ;; amount of battery charge left. path-home ;; path to take to reach home fuel-to-go-home ;; amount of battery charge to go home home-x home-y home-m ;; coordinates of the base last-x last-y last-m ;; the coordinates the rover was located in ;; when it issued its last command prev-x prev-y prev-m ;; the coordinates of the sector the rover was ;; last in. elevation ;; elevation of the rover at-home-p ;; this tells us if we are at the home base favored-directions ;; A list of the directions in order of ;; preference safe-interfaces ;; list of safe interfaces terrain-map ;; rovers terrain map known-objects ;; all objects the rover has seen last-action ;; the last command sent to cassini last-move-action ;; the last command that was a move num-move-actions ;; A count of the number times the rover has ;; moved from one sector to another allowed-consequences ;; the consequences that are allowed for the ;; last-action next-actions ;; list of actions to perform state ;; state of the rovers decisions next-state ;; the state to change when the actions are ;; completed ) :mv (visible-objects ;; the objects the rover can see around itself collected-objects ;; the objects the rover has in its bin )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; sci-object frob ;;; ;;; a class to describe the objects the rover finds (def-class sci-object nil :slots (id ; identification of the object color ; color from all-things shape ; shape from all-things size ; size from all-things surface-quality ; surface characteristics sound ; sound it is emitting radioactive-p ; is it radioative? fluorescent-color ; color that it gives under ; fluorescent. warm-p ; is it warm? glow-color ; the color the object glows tweaked-p ; whether the objected has been tweaked times-cut ; number of times an object has been cut lasered-p ; has the object been lasered? location ; current location of the object ; maybe :collected :delivered :used-as-spare ; :object-vaporized :object-exploded ; or the (x y m) of where it was last seen. other )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; sci-sector frob ;;; ;;; A class to describe each sector of the map (def-class sci-sector {class daemon} :slots (coord elevation (north :unknown) (north-visits 0) north-cost north-sector (east :unknown) (east-visits 0) east-cost east-sector (south :unknown) (south-visits 0) south-cost south-sector (west :unknown) (west-visits 0) west-cost west-sector (times-visited 0) cost-to-home path-to-home)) ;; End of file.