(FILECREATED "13-NOV-83 18:35:48" ("compiled on " {INDIGO}TRUCKIN>MULTI>PEDDLER.;9) "12-OCT-83 13:52:28" recompiled exprs: nothing in LOOPS.SYSOUT dated " 2-NOV-83 17:08:05") (FILECREATED "13-NOV-83 18:34:54" {INDIGO}TRUCKIN>MULTI>PEDDLER.;9 48204 changes to: (METHODS Peddler.FindStoppingPlace Peddler.GoToStoppingPlace Peddler.MaxPurchase Peddler.RateConsumers Peddler.RateProducers Peddler.RateSpotsNearAlices Peddler.SellGoods Peddler.TakeTurn) previous date: " 2-NOV-83 08:59:35" {INDIGO}TRUCKIN>MULTI>PEDDLER.;8) FindStoppingPlacePeddlerRules D1 (P 3 gasStation P 2 wStation P 1 ^value P 0 ^auditRecord I 0 self) b@g g j6g ]g MkLXgo @gg H @g g@g g @g g og@g g jVg @_g OkNhg [3g _g _OkOXgo @gKH g @_g _OkO@g g Zg@g @_g _OkO@g {g _"g _ O"kO Xgo @g@g H  @g g _g _OkOXgo @gJH g @_&g _$O&kO$@g g [Gg _.g _,O.kO,Xgo @g@g @g hg H g jg _*g _(O*kO(Xgo @gKH (1137Q PutAuditRec 1125Q PutValue 1122Q GetObjFromUID 1075Q FetchMethodOrHelp 1065Q GetObjectRec 1053Q GetValue 1044Q PutAuditRec 1040Q NthRoadStop 1031Q GetValue 1022Q GetValue 1006Q PutValue 1003Q GetObjFromUID 756Q FetchMethodOrHelp 746Q GetObjectRec 735Q FurthestRoadStop 732Q RoadStops 724Q GetValue 703Q FetchMethodOrHelp 672Q GetObjectRec 663Q PutAuditRec 651Q PutValue 646Q GetObjFromUID 621Q FetchMethodOrHelp 611Q GetObjectRec 577Q Distance 574Q GetValue 565Q Distance 561Q PutAuditRec 555Q GetValue 541Q PutValue 536Q GetObjFromUID 511Q FetchMethodOrHelp 501Q GetObjectRec 471Q RoomToParkP 466Q GetValue 440Q FetchMethodOrHelp 427Q Distance 424Q GetValue 412Q NearestRoadStop 407Q RoadStops 401Q GetValue 360Q FetchMethodOrHelp 347Q GetObjectRec 340Q PutAuditRec 326Q PutValue 323Q GetObjFromUID 276Q FetchMethodOrHelp 266Q GetObjectRec 255Q NearestRoadStop 252Q RoadStops 234Q FetchMethodOrHelp 223Q GetObjectRec 211Q GetValue 203Q GetValue 163Q GetClassValue 155Q GetValue 146Q GetValue 140Q GetValue 121Q GetValue 111Q PutAuditRec 105Q AnyRoadStop 102Q GetObjectRec 67Q PutValue 64Q GetObjFromUID 43Q FetchMethodOrHelp 34Q GetObjectRec 22Q GetValue 14Q GetValue) (1132Q stoppingPlace 1113Q rule 1072Q NewTemp 1062Q StandardAuditRecord 1050Q qty 1035Q Room 1026Q direction 1017Q maxMove 1013Q stoppingPlace 774Q rule 753Q NewTemp 743Q StandardAuditRecord 727Q Room 721Q direction 700Q Range1 667Q GasStation 656Q stoppingPlace 637Q rule 616Q NewTemp 606Q StandardAuditRecord 571Q destination 552Q destination 546Q stoppingPlace 527Q rule 506Q NewTemp 476Q StandardAuditRecord 463Q destination 435Q Range1 421Q destination 404Q Room 376Q direction 355Q Range1 344Q WeighStation 333Q stoppingPlace 314Q rule 273Q NewTemp 263Q StandardAuditRecord 247Q Room 231Q Range1 220Q GasStation 206Q cashBox 200Q truck 160Q MaxFuel 152Q truck 143Q fuel 135Q truck 124Q SitTight 116Q goal 77Q UnionHall 74Q stoppingPlace 55Q rule 40Q NewTemp 31Q StandardAuditRecord 17Q fuel 11Q truck) (1117Q "LVS.0.0.136.66429.13" 1000Q "LVS.0.0.136.66429.14" 643Q "LVS.0.0.136.66429.11" 533Q "LVS.0.0.136.66429.12" 320Q "LVS.0.0.136.66429.10" 167Q .25 61Q "LVS.0.0.136.66429.9") GoToStoppingPlacePeddlerRules D1 (P 3 numBuy P 2 realLocation P 1 ^value P 0 ^auditRecord I 0 self) Pg ]g MkLXgo @g@g H @g g Z@_g OkNc@g @g g L@g _g _OkO1`_g _O@dg lO@g g ZYJ@g o@g o Jg @_g _OkOJg \Jg P@g gCJ@g 8@_g _OJlO[ kK`_"g _ O"@KlO Jg %@g g @_&g _$O&kO$I(604Q FetchMethodOrHelp 571Q GetValue 563Q GetValue 552Q ISA 547Q GetObjectRec 522Q FetchMethodOrHelp 463Q FetchMethodOrHelp 447Q GetValue 431Q GetValue 420Q ISA 415Q GetObjectRec 404Q ISA 401Q GetObjectRec 357Q FetchMethodOrHelp 344Q ISA 341Q GetObjectRec 331Q WriteGameStatus 322Q GetValue 304Q GetValue 271Q GetValue 263Q GetValue 245Q GetValue 230Q FetchMethodOrHelp 201Q FetchMethodOrHelp 171Q GetValue 157Q GetValue 151Q GetValue 142Q GetValue 122Q FetchMethodOrHelp 107Q GetValue 101Q GetValue 71Q PutAuditRec 65Q DirectionOf 62Q GetValue 46Q PutValue 43Q GetObjFromUID 22Q FetchMethodOrHelp 13Q GetObjectRec) (601Q SellGoods 566Q cargo 560Q truck 544Q Consumer 517Q Buy 512Q PlayerInterface 460Q MaxPurchase 444Q destination 434Q Peddle 426Q goal 412Q GasStation 376Q Producer 354Q BuyGas 336Q GasStation 317Q driver 301Q stoppingPlace 266Q location 260Q truck 242Q stoppingPlace 225Q Move 220Q PlayerInterface 176Q BanditP 166Q stoppingPlace 154Q location 146Q truck 137Q stoppingPlace 117Q FindStoppingPlace 104Q location 76Q truck 57Q destination 53Q direction 34Q rule 17Q NewTemp 10Q StandardAuditRecord) (326Q " Didnt reach stoppingPlace" 313Q "Oh!! " 40Q "LVS.0.0.136.66429.8") PeddlerMaxPurchase D1 (P 11Q cashCapacity P 10Q numBuy P 7 producerLimit P 6 cashLimit P 5 weightLimit P 4 volumeLimit P 3 weightCapacity P 2 volumeCapacity P 1 ^value P 0 ^auditRecord I 1 roadStop I 0 self)  @g g @g g պ@g g @g g ջj@g g @g _JAg g ׼KAg g ׽OA ׾Ag _LMNO (220Q MIN 205Q GetValue 174Q PricePerUnit 164Q GetClassValue 156Q GetClassValue 144Q GetClassValue 136Q GetClassValue 123Q MAX 117Q GetValue 110Q GetValue 102Q GetValue 70Q GetValue 62Q GetValue 53Q GetClassValue 45Q GetValue 34Q GetValue 26Q GetValue 17Q GetClassValue 11Q GetValue) (202Q qty 161Q WtPerQty 153Q Commodity 141Q VolPerQty 133Q Commodity 114Q cashReserve 105Q cashBox 77Q truck 65Q weight 57Q truck 50Q MaxWeight 42Q truck 31Q volume 23Q truck 14Q MaxVolume 6 truck) NIL PeddlerRateConsumers D1 (P 3 cargo P 2 rating P 1 ^value P 0 ^auditRecord I 1 roadStop I 0 self) @@g g jZKg Ag ngg rKg hgg ^KAg h LA h AkAg h 1JAg ldZY@g g A@g g YI(243Q Distance 240Q GetValue 232Q GetValue 222Q GetClassValue 214Q GetValue 177Q GetValue 165Q RuleSetStop 157Q GetValue 145Q RuleSetStop 140Q RoomToParkP 132Q RuleSetStop 125Q ISA 122Q GetClassValue 110Q RuleSetStop 75Q GetValue 64Q RuleSetStop 47Q ISA 44Q GetObjectRec 33Q GetValue 17Q GetValue 11Q GetValue) (235Q location 227Q truck 217Q Gpm 211Q truck 174Q pr 154Q qty 117Q Commodity 105Q CannotSell 102Q SpoiltGoods 72Q status 61Q LookNoMore 56Q CityDump 41Q CityDump 30Q status 14Q cargo 6 truck) NIL PeddlerRateProducers D1 (P 2 maxBuy P 1 rating P 0 ^value I 1 roadStop I 0 self) PjYA h Ag g h Ag h kAg h Ag g IAg g nY@\g LAlKZkJIn'YAg g IlYXIJl YXlAg ldYX@g g A@g g XH(336Q Distance 333Q GetValue 325Q GetValue 315Q GetClassValue 307Q GetValue 271Q GetValue 240Q SUBCLASS 235Q GetObjectRec 227Q GetClassValue 173Q FetchMethodOrHelp 154Q GetClassValue 146Q GetClassValue 134Q SUBCLASS 131Q GetObjectRec 123Q GetClassValue 111Q RuleSetStop 103Q GetValue 70Q RuleSetStop 63Q ISA 60Q GetObjectRec 46Q RuleSetStop 41Q SUBCLASS 36Q GetObjectRec 30Q GetClassValue 16Q RuleSetStop 11Q RoomToParkP) (330Q location 322Q truck 312Q Gpm 304Q truck 266Q pr 232Q LuxuryGoods 224Q Commodity 170Q MaxPurchase 151Q FragilityLevel 143Q Commodity 126Q FragileCommodity 120Q Commodity 100Q qty 55Q GasStation 33Q PerishableCommodity 25Q Commodity) NIL PeddlerRateSpotsNearAlices D1 (P 2 cargo P 1 rating P 0 ^value I 1 roadStop I 0 self) 0@g g ZA Ag Ag h HldA@g lYJAg JAg Ag jAg kIl(165Q GetValue 152Q GetValue 141Q ISA 136Q GetClassValue 124Q ISA 121Q GetObjectRec 101Q Distance 76Q GetValue 62Q RuleSetStop 55Q ISA 52Q GetObjectRec 42Q ISA 37Q GetObjectRec 26Q RoomToParkP 17Q GetValue 11Q GetValue) (162Q pr 147Q qty 133Q Commodity 116Q Consumer 73Q alices 47Q AlicesRestaurant 34Q UnionHall 14Q cargo 6 truck) NIL SellGoodsPeddlerRules D1 (P 3 sellQty P 2 cargo P 1 ^value P 0 ^auditRecord I 0 self) (@g g ZY@g g g hggJg V@g g g >@g g g Jg `]g M@JKlLiggNo@g g g @g ghggj@g g g hgg IJg @g g g Jg [kK`_g O@JKlN(432Q FetchMethodOrHelp 407Q MIN 404Q GetValue 375Q GetValue 367Q GetValue 361Q GetValue 350Q GetValue 337Q RuleSetStop 323Q GetValue 315Q GetValue 307Q GetValue 261Q GetValue 247Q GetValue 241Q GetValue 233Q GetValue 174Q FetchMethodOrHelp 161Q MIN 156Q GetValue 147Q GetValue 141Q GetValue 133Q GetValue 122Q ISA 117Q GetObjectRec 111Q GetValue 103Q GetValue 72Q GetValue 50Q ISA 45Q GetClassValue 37Q GetValue 31Q GetValue 17Q GetValue 11Q GetValue) (427Q Sell 422Q PlayerInterface 401Q qty 372Q qty 364Q location 356Q truck 345Q status 334Q NeverSellAtLoss 331Q NoSale 320Q pr 312Q location 304Q truck 275Q AvoidCheapSkates 272Q NoSale 264Q Peddle 256Q goal 244Q pr 236Q location 230Q truck 216Q AtCityDump 213Q Sold 171Q Sell 165Q PlayerInterface 153Q qty 144Q qty 136Q location 130Q truck 114Q CityDump 106Q location 100Q truck 67Q status 60Q WrongKindOfBuyer 55Q NoSale 42Q Commodity 34Q location 26Q truck 14Q cargo 6 truck) (224Q 1.1) TakeTurnPeddlerRules D1 (P 2 possibleStops P 1 ^value P 0 ^auditRecord I 0 self F 25Q Simulator) *`@g 0g \g LkKXgo @ggH @g g N@g gAg Z5g ^g NkMXgo @g@gJ H @g g S@g gFg Z:g _g _OkOXgo @g@gJ H @g gL@g g @g 5g _g _OkOXgo @ggH @g g @g @_g _OkOlj@g g]g _g _OkOXgo @gg H @g@g H @ggH l2W*g }@g dgdgdgih]g _ g _O kOXgo @gg H @g@g H @ggH lW*g b@g g g Jg _$g _"O$kO"Xgo @gg H @ggH @g g?@g g@g g @g l@_(g _&O(kO&I(1433Q FetchMethodOrHelp 1415Q Distance 1412Q GetValue 1403Q GetValue 1375Q GetValue 1360Q GetValue 1343Q GetValue 1333Q PutAuditRec 1317Q PutAuditRec 1313Q NearestRoadStop 1310Q RoadStops 1305Q GetObjectRec 1272Q PutValue 1267Q GetObjFromUID 1242Q FetchMethodOrHelp 1232Q GetObjectRec 1222Q ISA 1217Q GetObjectRec 1211Q GetValue 1203Q GetValue 1171Q GetValue 1156Q PutAuditRec 1142Q PutAuditRec 1136Q PickHiObj 1133Q RoadStops 1117Q PutAuditRec 1113Q NearestRoadStop 1110Q RoadStops 1105Q GetObjectRec 1072Q PutValue 1067Q GetObjFromUID 1042Q FetchMethodOrHelp 1032Q GetObjectRec 773Q GetValue 761Q GetValue 746Q PutAuditRec 732Q PutAuditRec 726Q PickHiObj 723Q RoadStops 707Q PutAuditRec 703Q NearestRoadStop 700Q RoadStops 675Q GetObjectRec 662Q PutValue 657Q GetObjFromUID 632Q FetchMethodOrHelp 622Q GetObjectRec 606Q GetValue 560Q FetchMethodOrHelp 542Q GetValue 533Q GetValue 525Q GetValue 515Q PutAuditRec 501Q PutValue 476Q GetObjFromUID 451Q FetchMethodOrHelp 441Q GetObjectRec 430Q GetValue 421Q GetValue 413Q GetValue 376Q GetValue 366Q PutAuditRec 362Q PickHiObj 345Q PutValue 342Q GetObjFromUID 315Q FetchMethodOrHelp 305Q GetObjectRec 274Q RoadStops 271Q GetObjectRec 255Q GetValue 244Q GetValue 236Q GetValue 226Q PutAuditRec 222Q PickHiObj 205Q PutValue 202Q GetObjFromUID 161Q FetchMethodOrHelp 152Q GetObjectRec 141Q RoadStops 136Q GetObjectRec 122Q GetValue 111Q GetValue 103Q GetValue 73Q PutAuditRec 57Q PutValue 54Q GetObjFromUID 33Q FetchMethodOrHelp 24Q GetObjectRec 14Q GetValue) (1430Q GoToStoppingPlace 1407Q alices 1400Q location 1372Q truck 1363Q GetClose 1355Q goal 1346Q SitTight 1340Q goal 1327Q GoToAlices 1324Q goal 1302Q AlicesRestaurant 1277Q destination 1260Q rule 1237Q NewTemp 1227Q StandardAuditRecord 1214Q AlicesRestaurant 1206Q location 1200Q truck 1166Q timeLeft 1152Q GetClose 1147Q goal 1130Q RateSpotsNearAlices 1124Q destination 1102Q AlicesRestaurant 1077Q alices 1060Q rule 1037Q NewTemp 1027Q StandardAuditRecord 1013Q GoToAlices 1005Q GetClose 777Q SitTight 770Q goal 756Q timeLeft 742Q GetClose 737Q goal 720Q RateSpotsNearAlices 714Q destination 672Q AlicesRestaurant 667Q alices 650Q rule 627Q NewTemp 617Q StandardAuditRecord 611Q SitTight 603Q goal 555Q TimeAtStop 537Q alices 530Q location 522Q truck 511Q SitTight 506Q goal 467Q rule 446Q NewTemp 436Q StandardAuditRecord 425Q alices 416Q location 410Q truck 401Q GoToAlices 373Q goal 356Q RateProducers 352Q destination 333Q rule 312Q NewTemp 302Q StandardAuditRecord 266Q Producer 260Q Peddle 252Q goal 241Q cargo 233Q truck 216Q RateConsumers 212Q destination 173Q rule 156Q NewTemp 147Q StandardAuditRecord 133Q Consumer 125Q Peddle 117Q goal 106Q cargo 100Q truck 67Q Peddle 64Q goal 45Q rule 30Q NewTemp 21Q StandardAuditRecord 11Q goal) (1264Q "LVS.0.0.136.66429.7" 1064Q "LVS.0.0.136.66429.6" 654Q "LVS.0.0.136.66429.5" 473Q "LVS.0.0.136.66429.4" 337Q "LVS.0.0.136.66429.3" 177Q "LVS.0.0.136.66429.2" 51Q "LVS.0.0.136.66429.1") (PRETTYCOMPRINT PEDDLERCOMS) (RPAQQ PEDDLERCOMS ((CLASSES Peddler) (METHODS Peddler.FindStoppingPlace Peddler.GoToStoppingPlace Peddler.MaxPurchase Peddler.RateConsumers Peddler.RateProducers Peddler.RateSpotsNearAlices Peddler.SellGoods Peddler.TakeTurn) (FNS FindStoppingPlacePeddlerRules GoToStoppingPlacePeddlerRules PeddlerMaxPurchase PeddlerRateConsumers PeddlerRateProducers PeddlerRateSpotsNearAlices SellGoodsPeddlerRules TakeTurnPeddlerRules) (INSTANCES FindStoppingPlacePeddlerRules GoToStoppingPlacePeddlerRules PeddlerMaxPurchase PeddlerRateConsumers PeddlerRateProducers PeddlerRateSpotsNearAlices SellGoodsPeddlerRules TakeTurnPeddlerRules))) (DEFCLASSES Peddler) (DEFCLASS Peddler (MetaClass PlayerMeta doc (* Peddler is an automated Truckin player that prioritizes its choices for destinations and stoppingPlaces. It is the first Truckin player to use RuleSets to filter and rate choices for RoadStops. Peddler was written for the second Loops Course in February 1983) Edited: (* sm: "19-MAY-83 17:04")) (Supers Traveler) (ClassVariables) (InstanceVariables ( destination NIL doc (* Current destination.)) (direction NIL doc (* Forward or Backward direction of travel on the highway.)) (alices NIL doc (* Instance of Alices chosen for end game.)) (sitCount 0 doc (* Number of turns sitting at Alices Restaurant during an EndGame.)) (goal NIL doc (* Peddle, SitTight, GetClose, or GoToAlices.)) (cashReserve 1000 doc (* Minimum cash to keep on hand.)))) (METH Peddler FindStoppingPlace NIL (* RuleSet FindStoppingPlacePeddlerRules is installed as the selector FindStoppingPlace of the class Peddler) (method FindStoppingPlacePeddlerRules RuleSet FindStoppingPlacePeddlerRules)) (METH Peddler GoToStoppingPlace NIL (* RuleSet GoToStoppingPlacePeddlerRules is installed as the selector GoToStoppingPlace of the class Peddler) (method GoToStoppingPlacePeddlerRules RuleSet GoToStoppingPlacePeddlerRules)) (METH Peddler MaxPurchase NIL NIL (method PeddlerMaxPurchase RuleSet PeddlerMaxPurchase)) (METH Peddler RateConsumers NIL (* RuleSet PeddlerRateConsumers is installed as the selector RateConsumers of the class Peddler) (method PeddlerRateConsumers RuleSet PeddlerRateConsumers)) (METH Peddler RateProducers NIL NIL (method PeddlerRateProducers RuleSet PeddlerRateProducers)) (METH Peddler RateSpotsNearAlices NIL NIL (method PeddlerRateSpotsNearAlices RuleSet PeddlerRateSpotsNearAlices)) (METH Peddler SellGoods NIL (* RuleSet SellGoodsPeddlerRules is installed as the selector SellGoods of the class Peddler) (method SellGoodsPeddlerRules RuleSet SellGoodsPeddlerRules)) (METH Peddler TakeTurn NIL (* RuleSet TakeTurnPeddlerRules is installed as the selector TakeTurn of the class Peddler) (method TakeTurnPeddlerRules RuleSet TakeTurnPeddlerRules)) (DEFINST RuleSet (FindStoppingPlacePeddlerRules "FRSC@$Oz") (perspectiveNode #&(RuleSetNode "FRSC@$PF" ) myViewName RuleSet) (name #(FindStoppingPlacePeddlerRules NIL RememberName)) (compiledRules FindStoppingPlacePeddlerRules) (workSpace Peddler) (args NIL) (tempVars (wStation gasStation)) ( taskVars NIL) (debugVars NIL) (numRules 6) (controlStructure DO1) (whileCondition NIL) ( compilerOptions (A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (GoToStoppingPlacePeddlerRules "FRSC@$PA") (perspectiveNode #&(RuleSetNode "FRSC@$PG" ) myViewName RuleSet) (name #(GoToStoppingPlacePeddlerRules NIL RememberName)) (compiledRules GoToStoppingPlacePeddlerRules) (workSpace Peddler) (args NIL) (tempVars (realLocation numBuy)) ( taskVars NIL) (debugVars NIL) (numRules 7) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions (A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (PeddlerMaxPurchase "FRSC@$TR") (perspectiveNode #&(RuleSetNode "FRSC@$T_") myViewName RuleSet) (name #(PeddlerMaxPurchase NIL RememberName)) (compiledRules PeddlerMaxPurchase) ( workSpace Peddler) (args (roadStop)) (tempVars (volumeCapacity weightCapacity volumeLimit weightLimit cashLimit producerLimit numBuy cashCapacity)) (taskVars NIL) (debugVars NIL) (numRules 3) ( controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (PeddlerRateConsumers "FRSC@$RX") (perspectiveNode #&(RuleSetNode "FRSC@$Re") myViewName RuleSet) (name #(PeddlerRateConsumers NIL RememberName)) (compiledRules PeddlerRateConsumers) (workSpace Peddler) (args (roadStop)) (tempVars (rating cargo)) (taskVars NIL) ( debugVars NIL) (numRules 8) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (PeddlerRateProducers "FRSC@$Qy") (perspectiveNode #&(RuleSetNode "FRSC@$Rf") myViewName RuleSet) (name #(PeddlerRateProducers NIL RememberName)) (compiledRules PeddlerRateProducers) (workSpace Peddler) (args (roadStop)) (tempVars (rating maxBuy)) (taskVars NIL) (debugVars NIL) (numRules 11) (controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (PeddlerRateSpotsNearAlices "FRSC@$PR") (perspectiveNode #&(RuleSetNode "FRSC@$PY")) (name #(PeddlerRateSpotsNearAlices NIL RememberName)) (compiledRules PeddlerRateSpotsNearAlices) ( workSpace Peddler) (args (roadStop)) (tempVars (rating cargo)) (taskVars NIL) (debugVars NIL) ( numRules 6) (controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) (auditClass NIL) ( metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (SellGoodsPeddlerRules "FRSC@$PC") (perspectiveNode #&(RuleSetNode "FRSC@$PH") myViewName RuleSet) (name #(SellGoodsPeddlerRules NIL RememberName)) (compiledRules SellGoodsPeddlerRules) (workSpace Peddler) (args NIL) (tempVars (cargo sellQty)) (taskVars NIL) ( debugVars NIL) (numRules 6) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (TakeTurnPeddlerRules "YQSC@0 gasStation_(NearestRoadStop (RoadStops $GasStation .Range1 NIL 'Room)) THEN stoppingPlace_gasStation;") (edited "22-JUL-83 18:36:42") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("LVS.0.0.136.66429.11") (source "(* Obey the law - stop at WeighStations.) IF wStation_(NearestRoadStop (RoadStops $WeighStation .Range1 direction 'Room)) (Distance wStation)<(Distance destination) THEN stoppingPlace_wStation;") (edited "22-JUL-83 18:36:42") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("LVS.0.0.136.66429.12") (source "IF (Distance destination)<=.Range1 (RoomToParkP destination) THEN stoppingPlace_destination;") (edited "22-JUL-83 18:36:42") (editor STEFIK) (ruleNumber 4) ( ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("LVS.0.0.136.66429.13") (source "IF gasStation_(FurthestRoadStop (RoadStops $GasStation .Range1 direction 'Room)) gasStation:qty>0 THEN stoppingPlace_gasStation;") (edited "22-JUL-83 18:36:42") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("LVS.0.0.136.66429.14") (source "THEN stoppingPlace_(NthRoadStop maxMove direction NIL 'Room);") (edited "22-JUL-83 18:36:42") ( editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("LVS.0.0.136.66429.8") (source " -> direction_(DirectionOf destination);") (edited "22-JUL-83 18:36:07") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.15") (source " -> realLocation_truck:location;") (edited "22-JUL-83 18:36:07") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.16") (source " IF .FindStoppingPlace stoppingPlace~=truck:location ~stoppingPlace.BanditP THEN (_ \PlayerInterface Move self stoppingPlace) realLocation_truck:location;") (edited "22-JUL-83 18:36:07") (editor STEFIK) ( ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.17") (source " IF realLocation~=stoppingPlace THEN (WriteGameStatus %"Oh!! %" driver %" Didnt reach stoppingPlace%");") (edited "22-JUL-83 18:36:07") (editor STEFIK) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.18") (source " IF (ISA realLocation $GasStation) THEN .BuyGas;") (edited "22-JUL-83 18:36:07") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.19") (source " IF (ISA realLocation $Producer) ~(ISA realLocation $GasStation) goal='Peddle realLocation=destination numBuy_(_ self MaxPurchase realLocation) numBuy>=1 THEN (_ \PlayerInterface Buy self numBuy);") (edited "22-JUL-83 18:36:07") (editor STEFIK) ( ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.20") (source " IF (ISA realLocation $Consumer) truck:cargo THEN .SellGoods;") (edited "22-JUL-83 18:36:07") (editor STEFIK) (ruleNumber 7) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("LVS.0.0.136.66429.21") (source " (* Rules for deciding how much the Peddler could buy at a Producer.) (* Sale can be limited by volume, weight, cash, or availability.) -> volumeCapacity _ truck::MaxVolume-truck:volume weightCapacity _ truck::MaxWeight-truck:weight cashCapacity _ (MAX 0 truck:cashBox-cashReserve);") (edited "22-JUL-83 18:35:43") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("LVS.0.0.136.66429.22") (source " -> volumeLimit _ volumeCapacity / roadStop::Commodity::VolPerQty weightLimit _ weightCapacity / roadStop::Commodity::WtPerQty cashLimit _ cashCapacity / (PricePerUnit roadStop) producerLimit _ roadStop:qty;") (edited "22-JUL-83 18:35:43") (editor STEFIK) (ruleNumber 2) ( ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("LVS.0.0.136.66429.23") (source "-> numBuy _ (MIN volumeLimit weightLimit cashLimit producerLimit);") (edited "22-JUL-83 18:35:43") ( editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("LVS.0.0.136.66429.24") (source " (* Rate the suitability of a proposed Consumer.) -> cargo _ (CAR truck:cargo) rating_0;") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.25") (source "(* if spoiled go to CityDump) IF ~cargo:status (ISA roadStop $CityDump) THEN (STOP 5000 'CityDump 'LookNoMore);") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.26") (source "IF ~cargo:status THEN (STOP NIL 'SpoiltGoods 'CannotSell);") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.27") (source "(* Consumer must want current cargo.) IF ~(ISA cargo roadStop::Commodity) THEN (STOP NIL);") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.28") (source "(* Need to be able to park) IF ~(RoomToParkP roadStop) THEN (STOP NIL);") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.29") (source "(* Exclude consumers that have full inventory.) IF roadStop:qty < 1 THEN (STOP NIL);") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.30") (source "(* Favor high price ratios.) -> rating _ rating + 100 * roadStop:pr ;") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 7) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.31") (source "(* Favor close places.) -> rating _ rating - [truck::Gpm *(Distance roadStop truck:location)];") (edited "22-JUL-83 18:35:14") (editor STEFIK) (ruleNumber 8) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("LVS.0.0.136.66429.32") (source " (* Rate the suitability of a proposed Producer.) -> rating _ 0;") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.33") (source "(* Need to be able to park) IF ~(RoomToParkP roadStop) THEN (STOP NIL);") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.34") (source "(* Exclude perishables.) IF (SUBCLASS roadStop::Commodity $PerishableCommodity) THEN (STOP NIL);") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.35") (source "(* Exclude gas stations.) IF (ISA roadStop $GasStation) THEN (STOP NIL);") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.36") (source "(* Exclude producers that are sold out.) IF roadStop:qty < 1 THEN (STOP NIL);") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.37") (source "(* Exclude excessively fragile goods.) IF (SUBCLASS roadStop::Commodity $FragileCommodity) THEN rating _ rating - [500 * roadStop::Commodity::FragilityLevel];") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.38") (source "(* Penalize producers for which can buy < 2 items.) IF maxBuy_(_ self MaxPurchase roadStop) maxBuy < 1 THEN rating _ rating - 10000;") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 7) ( ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.39") (source "(* favor LuxuryGoods) IF (SUBCLASS roadStop::Commodity $LuxuryGoods) THEN rating _ rating + 200;") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 8) (ruleSet #& (RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.40") (source "(* favor higher qty) -> rating _ rating + 10 * maxBuy;") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 9) ( ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.41") (source "(* Favor low price ratios.) -> rating _ rating + 100 * [2 - roadStop:pr];") (edited "22-JUL-83 18:34:50") (editor STEFIK) ( ruleNumber 10) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.42") (source "(* Favor close places.) -> rating _ rating - [truck::Gpm * (Distance roadStop truck:location)];") (edited "22-JUL-83 18:34:50") (editor STEFIK) (ruleNumber 11) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("LVS.0.0.136.66429.43") (source "(* Rating RuleSet for spots near Alices. Returns a number for spots.) -> cargo _ (CAR truck:cargo);") (edited "22-JUL-83 18:34:21") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("LVS.0.0.136.66429.44") (source "IF ~(RoomToParkP roadStop) THEN (STOP NIL);") (edited "22-JUL-83 18:34:21") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("LVS.0.0.136.66429.45") (source "IF (ISA roadStop $UnionHall) THEN (STOP NIL);") (edited "22-JUL-83 18:34:21") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("LVS.0.0.136.66429.46") (source "IF (ISA roadStop $AlicesRestaurant) THEN (STOP NIL);") (edited "22-JUL-83 18:34:21") (editor STEFIK) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("LVS.0.0.136.66429.47") (source " (* Favor places closer to Alices.) -> rating _ 100 - 4 * (Distance roadStop alices);") (edited "22-JUL-83 18:34:21") (editor STEFIK) ( ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("LVS.0.0.136.66429.48") (source "IF cargo (ISA roadStop $Consumer) (ISA cargo roadStop::Commodity) roadStop:qty>0 roadStop:pr>1 THEN rating _ rating + 20;") (edited "22-JUL-83 18:34:21") (editor STEFIK) (ruleNumber 6) (ruleSet #& (RuleSet "FRSC@$PR"))) (DEFINST Rule ("LZS.0.5349.129.33698.228") (source " -> cargo_(CAR truck:cargo);") (edited "26-JUL-83 16:03:53") (editor MITTAL) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LZS.0.5349.129.33698.229") (source " IF ~(ISA cargo truck:location::Commodity) THEN (STOP NIL 'NoSale 'WrongKindOfBuyer);") (edited "26-JUL-83 16:03:53") (editor MITTAL) ( ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LZS.0.5349.129.33698.230") (source " (* Make sale as limited by cargo and consumer.) IF ~cargo:status (ISA truck:location $CityDump) THEN sellQty_(MIN truck:location:qty cargo:qty) (_ \PlayerInterface Sell self cargo sellQty) (STOP T 'Sold 'AtCityDump);") (edited "26-JUL-83 16:03:53") (editor MITTAL) (ruleNumber 3 ) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LZS.0.5349.129.33698.231") (source " IF truck:location:pr < 1.1 goal='Peddle THEN (STOP NIL 'NoSale 'AvoidCheapSkates);") (edited "26-JUL-83 16:03:53") (editor MITTAL) ( ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LZS.0.5349.129.33698.232") (source " IF truck:location:pr < 0 THEN (STOP NIL 'NoSale 'NeverSellAtLoss);") (edited "26-JUL-83 16:03:53") (editor MITTAL) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LZS.0.5349.129.33698.233") (source " IF cargo:status sellQty_(MIN truck:location:qty cargo:qty) sellQty>=1 THEN (_ \PlayerInterface Sell self cargo sellQty);") (edited "26-JUL-83 16:03:53") (editor MITTAL) ( ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LVS.0.0.136.66429.1") (source " (* Top-Level RuleSet for taking turns. Sets goal and destination.) IF ~goal THEN goal_'Peddle;") (edited "22-JUL-83 18:33:13") (editor STEFIK) (ruleNumber 1) (ruleSet #&( RuleSet "YQSC@ 25 goal='SitTight THEN alices_(NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ (PickHiObj self 'RateSpotsNearAlices (RoadStops)) goal_'GetClose;") (edited "22-JUL-83 18:33:13") (editor STEFIK) (ruleNumber 5) (ruleSet #&( RuleSet "YQSC@