(FILECREATED " 1-NOV-83 17:29:35" ("compiled on " {INDIGO}TRUCKIN>MULTI>TRUCKINV.;5) "12-OCT-83 13:52:28" recompiled exprs: AnyBanditsP AnyRoadStop Buyers DirectionOf Distance FurthestRoadStop ISA NearestRoadStop Nth NthRoadStop PricePerUnit RoadStops RoomToParkP SUBCLASS Sellers FilterObjs PickHiObj PickLowObj SortObjs Player.AnyRoadStop Player.DirectionOf Player.Distance Player.FurthestRoadStop Player.NearestRoadStop Player.NthRoadStop Player.Range Player.Range1 Player.RoadStops Player.Sellers Player.TimeAtStop Player.TurnsAtStop in WORK dated "12-OCT-83 19:52:21") (FILECREATED " 1-NOV-83 17:28:39" {INDIGO}TRUCKIN>MULTI>TRUCKINV.;5 25789 changes to: (VARS TRUCKINVCOMS) previous date: " 2-AUG-83 14:29:45" {INDIGO}TRUCKIN>MULTI>TRUCKINV.;4) AnyBanditsP D1 (P 3 roadStop P 2 banditFlg P 1 doneFlg P 0 temp I 1 fromRoadStop I 0 toRoadStop F 6 currentPlayer) c`AVg g b@ o @g Ag @AbHbA[I"J K]g MkLK@Kg J(134Q GetValue 112Q FetchMethodOrHelp 55Q GetValue 46Q GetValue 36Q ERROR 21Q GetValue 13Q GetValue) (131Q next 107Q BanditP 52Q milePost 43Q milePost 16Q location 10Q truck) (33Q "Bad call to AnyBanditsP. toRoadStop is NIL.") AnyRoadStop D1 (I 3 roomToParkFlg I 2 direction I 1 numMoves I 0 roadStopType F 2 currentPlayer) RHg H@ABClI(12Q FetchMethodOrHelp) (7 AnyRoadStop) NIL Buyers D1 (I 2 includeCDFlg I 1 numMoves I 0 commodityClass F 2 currentPlayer) RHg H@ABlI(12Q FetchMethodOrHelp) (7 Buyers) NIL DirectionOf D1 (I 1 fromRoadStop I 0 toRoadStop F 2 currentPlayer) RHg H@AlI(12Q FetchMethodOrHelp) (7 DirectionOf) NIL Distance D1 (I 1 fromRoadStop I 0 toRoadStop F 2 currentPlayer) RHg H@AlI(12Q FetchMethodOrHelp) (7 Distance) NIL FurthestRoadStop D1 (I 1 fromRoadStop I 0 roadStops F 2 currentPlayer) RHg H@AlI(12Q FetchMethodOrHelp) (7 FurthestRoadStop) NIL ISA D1 (I 1 className I 0 object) 5@dl b`@Hg HAlIo@o (62Q WRITE 35Q FetchMethodOrHelp 11Q GetObjectRec) (32Q InstOf! 17Q instanceTYPE#) (57Q " not an instance." 52Q "Bad call to ISA. ") NearestRoadStop D1 (I 1 fromRoadStop I 0 roadStops F 2 currentPlayer) RHg H@AlI(12Q FetchMethodOrHelp) (7 NearestRoadStop) NIL Nth D1 (I 1 index I 0 lst) @A (4 NTH) NIL NIL NthRoadStop D1 (I 3 roomToParkFlg I 2 fromRoadStop I 1 direction I 0 numMiles F 2 currentPlayer) RHg H@ABClI(12Q FetchMethodOrHelp) (7 NthRoadStop) NIL PricePerUnit D1 (I 0 rs F 2 TTY) G@Hg Hg lI@g @g g @R oR R k(103Q TERPRI 76Q PRIN1 65Q PRIN1 56Q GetClassValue 50Q GetClassValue 41Q GetValue 22Q GetObjectRec 12Q FetchMethodOrHelp) (53Q AvgPrice 45Q Commodity 36Q pr 17Q Producer 7 InstOf!) (72Q " is not a producer") RoadStops D1 (I 3 roomToParkFlg I 2 direction I 1 numMoves I 0 roadStopType F 2 self) RHg H@ABClI(12Q FetchMethodOrHelp) (7 RoadStops) NIL RoomToParkP D1 (I 0 roadStop) @Hg HkI(12Q FetchMethodOrHelp) (7 RoomToPark?) NIL SUBCLASS D1 (I 1 super I 0 class) 6@dl bd`dHg HAlIo@o (63Q WRITE 36Q FetchMethodOrHelp 11Q GetObjectRec) (33Q Subclass 20Q classTYPE#) (60Q " not a class." 53Q "Bad Arg to SUBCLASS. ") Sellers D1 (I 1 numMoves I 0 commodityClass F 2 currentPlayer) RHg H@AlI(12Q FetchMethodOrHelp) (7 Sellers) NIL FilterObjs D1 (P 6 object P 5 oBj P 4 classForMethod I 2 objects I 1 selector I 0 self) 0pB&d@hMA MNlKdIHhZH&J(21Q FetchMethodOrHelp) NIL NIL PickHiObj D1 (P 12Q object P 11Q oBj P 10Q classForMethod P 2 hiObject P 1 hiRating P 0 objectRatingPairs I 2 objects I 1 selector I 0 self) PY` B-d_@_h_OA OOlKNMh_M&OX0H ddddNMh_M&OXdd\ILLJ(36Q FetchMethodOrHelp 5 FMAX) NIL NIL PickLowObj D1 (P 12Q object P 11Q oBj P 10Q classForMethod P 2 lowObject P 1 lowRating P 0 objectRatingPairs I 2 objects I 1 selector I 0 self) PY` B-d_@_h_OA OOlKNMh_M&OX0H ddddNMh_M&OXdd\ILLJ(36Q FetchMethodOrHelp 5 FMIN) NIL NIL SortObjsA0228 D1 (L (1 y 0 x)) @ANIL NIL NIL SortObjs D1 (P 7 object P 6 oBj P 5 classForMethod P 0 objectRatingPairs I 2 objects I 1 selector I 0 self) ~ `B&d_@hNA NOlIKJh\J&LX0HddddKJh\J&LXdg 0HdKJh\J&L(142Q SORT 25Q FetchMethodOrHelp) (137Q SortObjsA0228) NIL Player.AnyRoadStop D1 (P 0 roadStops I 4 roomToParkFlg I 3 direction I 2 numMoves I 1 roadStopType I 0 self) !ABCD XdddkH (36Q Nth 33Q RAND 30Q FLENGTH 11Q RoadStops) NIL NIL Player.DirectionOf D1 (I 2 fromRoadStop I 1 toRoadStop I 0 self) +B@g g bAg Bg gg(37Q GetValue 30Q GetValue 16Q GetValue 10Q GetValue) (50Q BackWard 44Q Forward 34Q milePost 25Q milePost 13Q location 5 truck) NIL Player.Distance D1 (I 2 fromRoadStop I 1 toRoadStop I 0 self) .B@g g bg Ag jHHjH(36Q GetValue 27Q GetValue 17Q GetValue 11Q GetValue) (33Q milePost 24Q milePost 14Q location 6 truck) NIL Player.FurthestRoadStop D1 (P 3 rs P 2 farRS P 1 distance P 0 maxDistance I 2 fromRoadStop I 1 roadStops I 0 self) 8m!B@g g bAdKBBK YHIKJ(47Q Distance 23Q GetValue 15Q GetValue) (20Q location 12Q truck) NIL Player.NearestRoadStop D1 (P 3 rs P 2 nearRS P 1 distance P 0 minDistance I 2 fromRoadStop I 1 roadStops I 0 self) :n!B@g g bAdKBBK YHIKJ(50Q Distance 24Q GetValue 16Q GetValue) (21Q location 13Q truck) NIL Player.NthRoadStop D1 (P 4 k P 0 rs I 4 roomToParkFlg I 3 fromRoadStop I 2 direction I 1 numMiles I 0 self) 0BgbC@g g bA<`g bCAkLK'D@HZg JkI0AkbjCjCBoHgHg HLk\H(162Q GetValue 106Q FetchMethodOrHelp 53Q FLENGTH 50Q GetValue 31Q GetValue 23Q GetValue) (157Q prev 152Q next 103Q RoomToPark? 45Q roadStops 42Q Simulator 26Q location 20Q truck 7 Forward) (144Q (F f Fwd fwd FWD Forward forward FORWARD)) Player.Range D1 (P 0 truck I 0 self) @g Hg Hg (27Q GetClassValue 20Q GetValue 6 GetValue) (24Q Gpm 15Q fuel 3 truck) NIL Player.Range1 D1 (P 0 truck I 0 self) %@g @g Hg Hg (42Q MIN 36Q GetClassValue 27Q GetValue 20Q GetValue 6 GetValue) (33Q Gpm 24Q fuel 15Q maxMove 3 truck) NIL Player.RoadStops D1 (P 14Q pos P 6 commodity P 5 roadStops P 4 rs P 3 stopPos P 2 startPos P 1 currentPos P 0 allRoadStops I 4 roomToParkFlg I 3 direction I 2 numMoves I 1 roadStopType I 0 self) `g  Agb oA BH b@g g g YCodkIB ZC.H IB [HJ \KJ OOCogM oILd`d` _g _OAlODL_g _OkOLMLg Ok_M(324Q GetValue 276Q FetchMethodOrHelp 244Q FetchMethodOrHelp 234Q GetLispClass 174Q DREVERSE 141Q NTH 133Q MIN 125Q FLENGTH 115Q MAX 74Q GetValue 66Q GetValue 60Q GetValue 46Q FLENGTH 37Q WRITE 26Q GetClassRec 10Q GetValue) (321Q next 273Q RoomToPark? 241Q Subclass 224Q classTYPE# 215Q instanceTYPE# 71Q milePost 63Q location 55Q truck 21Q RoadStop 5 roadStops 2 Simulator) (201Q (F f Fwd fwd FWD Forward forward FORWARD) 165Q (F f Fwd fwd FWD Forward forward FORWARD) 102Q (F f Fwd fwd FWD Forward forward FORWARD) 33Q "Bad call to RoadStops. roadStopType unrecognized: ") Player.Sellers D1 (P 14Q pos P 6 commodity P 5 roadStops P 4 rs P 3 stopPos P 2 startPos P 1 currentPos P 0 allRoadStops I 2 numMoves I 1 commodityClass I 0 self F 15Q TTY) `g  A oW W gA bBH b@g g g YkIB ZH IB [HJ \KJ OO[L_g _OglOLg ^Lg Ok__g _OAlOLg jLMM(276Q GetValue 251Q FetchMethodOrHelp 230Q GetValue 216Q GetClassValue 170Q FetchMethodOrHelp 141Q NTH 133Q MIN 125Q FLENGTH 120Q MAX 110Q GetValue 102Q GetValue 74Q GetValue 62Q FLENGTH 51Q GetObjectRec 40Q TERPRI 32Q PRIN1 17Q GetObjectRec 10Q GetValue) (273Q qty 246Q Subclass 225Q next 213Q Commodity 200Q Producer 165Q InstOf! 105Q milePost 77Q location 71Q truck 44Q Commodity 5 roadStops 2 Simulator) (25Q "commodityClass in SELLERS is NIL. Assuming $Commodity") Player.TimeAtStop D1 (P 1 loc P 0 truck I 0 self) 8@g QHg Yd[g KglJI\g L@lM(55Q FetchMethodOrHelp 31Q FetchMethodOrHelp 20Q GetValue 6 GetValue) (52Q TimeSpent 36Q RoadStop 26Q InstOf! 15Q location 3 truck) NIL Player.TurnsAtStop D1 (P 1 loc P 0 truck I 0 self) 8@g QHg Yd[g KglJI\g L@lM(55Q FetchMethodOrHelp 31Q FetchMethodOrHelp 20Q GetValue 6 GetValue) (52Q TurnsStayed 36Q RoadStop 26Q InstOf! 15Q location 3 truck) NIL (PRETTYCOMPRINT TRUCKINVCOMS) (RPAQQ TRUCKINVCOMS ((* Copyright (c) 1983 by Xerox Corporation.) (* Some primitive vocabulary functions for automatic TRUCKIN players. TRUCKIN is a domain for creating mini-expert system for teaching knowledge representation techniques in the Loops programming system. Truckin provides a simple simulation environment for novice Loops users in which small bodies of knowledge can be created and tested interactively. Knowledge in TRUCKIN is in the form of rules for controlling a game piece to "maximize profit.") (CONSTANTS * TRUCKINVCONSTANTS) (FNS * TRUCKINVFNS) (FNS * StreamFns) (METHODS Player.AnyRoadStop Player.DirectionOf Player.Distance Player.FurthestRoadStop Player.NearestRoadStop Player.NthRoadStop Player.Range Player.Range1 Player.RoadStops Player.Sellers Player.TimeAtStop Player.TurnsAtStop))) (RPAQQ TRUCKINVCONSTANTS (forwardSpellings)) (RPAQQ forwardSpellings (F f Fwd fwd FWD Forward forward FORWARD)) (CONSTANTS forwardSpellings) (RPAQQ TRUCKINVFNS (AnyBanditsP AnyRoadStop Buyers DirectionOf Distance FurthestRoadStop ISA NearestRoadStop Nth NthRoadStop PricePerUnit RoadStops RoomToParkP SUBCLASS Sellers)) (RPAQQ StreamFns (FilterObjs PickHiObj PickLowObj SortObjs)) (METH Player AnyRoadStop (roadStopType numMoves direction roomToParkFlg) (* Randomly picks one of the RoadStops of type roadStopType, where roadStopType is the name of a super of some RoadStop.)) (METH Player DirectionOf (toRoadStop fromRoadStop) (* * Returns direction of travel for going from fromRoadStop to toRoadStop. If fromRoadStop is not given, then the location of the currentPlayer is assumed.)) (METH Player Distance (toRoadStop fromRoadStop) (* * Computes the distance between fromRoadStop and toRoadStop. If fromRoadStop is NIL, assumes the location of the currentPlayer.)) (METH Player FurthestRoadStop (roadStops fromRoadStop) (* * Returns the RoadStop furthest from fromRoadStop (excluding fromRoadStop) in the list of roadStops. If fromRoadStop is not given, assumes the position of the currentPlayer.)) (METH Player NearestRoadStop (roadStops fromRoadStop) (* Returns the RoadStop nearest to fromRoadStop in the list of roadStops.)) (METH Player NthRoadStop (numMiles direction fromRoadStop roomToParkFlg) (* Returns the Nth roadStop in the given direction from fromRoadStop. If roomToParkFlg, it picks the farthest RoadStop under numMiles in which there is room. If no room at all, returns fromRoadStop.)) (METH Player Range NIL (* Computers the travel range for the current player as limited only by fuel.)) (METH Player Range1 NIL (* Computers the travel range in a single move for the current player as limited only by fuel maxMove.)) (METH Player RoadStops (roadStopType numMoves direction roomToParkFlg) (* Returns all of the RoadStops of type roadStopType, where roadStopType is the name of a super of some RoadStop.)) (METH Player Sellers (commodityClass numMoves) (* Returns all of the Sellers having the Commodity for sale.)) (METH Player TimeAtStop NIL (* Returns the time spent by player at the stop where currently parked.)) (METH Player TurnsAtStop NIL (* how many turns parked at current location)) NIL