;;; -*- Mode: LISP; Base: 10; Vsp: 1; Syntax: Rhet; Package: RPRS -*-
;;; Copyright 1987 by Henry A. Kautz
;;; This software may be freely distributed in original or modified
;;; form, under the condition that this copyright notice is included.
;;; No warranty as to the correctness or usefulness of this software
;;; is given or implied.
;;;
;;; The author may be contacted at the following addresses:
;;; :uucp:	allegra!kautz		
;;; :arpa: or :csnet:	kautz@allegra.att.com
;;; :old style csnet: 	kautz%allegra@btl.csnet
;;; :mail:	AT&T Bell Laboratories	
;;;		Room 3C-402A
;;;		600 Mountain Ave.	
;;;		Murray Hill, N.J. 07974	
;;; This software was not produced while the author was employee of 
;;; AT&T Bell Laboratories, and that organization has no legal 
;;; claim or responsibility for this software.
;;;

;; extensively modified by Bradford W. Miller for RPRS 1989
(in-package rprs)

;;;;;
;;;;; Copyright (C) 1989 by the University of Rochester. All rights reserved.
;;;;; See your Rhet license agreement and file RPRS:rprs;copyright.text for more details.
;;;;;


;;;; hunt rob test
;;;;    demonstrates event minimization
;;;;    example from chapter 1 introduction

  (DEFINE-ACTION-TYPE 'T-GO-TO-WOODS)

  (DEFINE-ACTION-TYPE 'T-GET-GUN)

  (DEFINE-ACTION-TYPE 'T-GO-TO-BANK)

  (DEFINE-ACTION-TYPE 'T-STAND-IN-LINE)

  (DEFINE-RPLAN-TYPE 'T-END	; use this type to capture what our own subtypes need
    :CONSTRAINTS #['([EQ? [F-AGENT ?SELF] [F-AGENT [S-1 ?SELF]]]
		     [EQ? [F-AGENT ?SELF] [F-AGENT [S-2 ?SELF]]])#]
		   )

  (DEFINE-RPLAN-TYPE 'T-HUNT :PARENT 'T-END
		     :STEPS '((:S-1 . [C-GO-TO-WOODS [F-AGENT ?SELF]])
			      (:S-2 . [C-GET-GUN [F-AGENT ?SELF]])))

  (DEFINE-RPLAN-TYPE 'T-ROB-BANK :PARENT 'T-END
		     :STEPS '((:S-1 . [C-GO-TO-BANK [F-AGENT ?SELF]])
			      (:S-2 . [C-GET-GUN [F-AGENT ?SELF]])))

  (DEFINE-RPLAN-TYPE 'T-CASH-CHECK :PARENT 'T-END
		     :STEPS '((:S-1 . [C-STAND-IN-LINE [F-AGENT ?SELF]])
			      (:S-2 . [C-GO-TO-BANK [F-AGENT ?SELF]])))

(add-UTYPE 'T-ANIMATE [AGENT1] [AGENT2])	;some agents

