(FILECREATED "16-JUN-83 19:11:29" ("compiled on " {INDIGO}TRUCKIN>PLAYERS>PEDDLER.;5) "14-JUN-83 04:34:18" recompiled exprs: GoToStoppingPlacePeddlerRules in LOOPSDEMO.SYSOUT dated "14-JUN-83 19:10:02") (FILECREATED "16-JUN-83 19:07:52" {INDIGO}TRUCKIN>PLAYERS>PEDDLER.;5 57258 changes to: (FNS GoToStoppingPlacePeddlerRules) previous date: "14-JUN-83 17:58:01" {INDIGO}TRUCKIN>PLAYERS>PEDDLER.;4) FindStoppingPlacePeddlerRules D1 (P 3 gasStation P 2 wStation P 1 ^value P 0 ^auditRecord I 0 self F 30Q maxMove) 1@g g j/g ]g MkLXg @gg H @g g@g g @g g o`@g g jOg @_g OkNhg [,g _g _OkOXg @gKH g @_g _OkO@g g Z^@g @_g _OkOy@g mg _"g _ O"kO Xg @g@g H  @g g _g _OkOXg @gJH g @_&g _$O&kO$@g g [;g _.g _,O.kO,Xg @gW0@g hg H g jg _*g _(O*kO(Xg @gKH (1056Q PutAuditRec 1044Q PutValue 1023Q FetchMethodOrHelp 1013Q GetObjectRec 1001Q GetValue 772Q PutAuditRec 766Q NthRoadStop 757Q GetValue 741Q PutValue 720Q FetchMethodOrHelp 710Q GetObjectRec 677Q FurthestRoadStop 674Q RoadStops 666Q GetValue 645Q FetchMethodOrHelp 634Q GetObjectRec 625Q PutAuditRec 613Q PutValue 572Q FetchMethodOrHelp 562Q GetObjectRec 550Q Distance 545Q GetValue 536Q Distance 532Q PutAuditRec 526Q GetValue 512Q PutValue 471Q FetchMethodOrHelp 461Q GetObjectRec 451Q RoomToParkP 446Q GetValue 422Q FetchMethodOrHelp 411Q Distance 406Q GetValue 374Q NearestRoadStop 371Q RoadStops 363Q GetValue 342Q FetchMethodOrHelp 331Q GetObjectRec 322Q PutAuditRec 310Q PutValue 267Q FetchMethodOrHelp 257Q GetObjectRec 246Q NearestRoadStop 243Q RoadStops 225Q FetchMethodOrHelp 214Q GetObjectRec 202Q GetValue 174Q GetValue 154Q GetClassValue 146Q GetValue 137Q GetValue 131Q GetValue 112Q GetValue 102Q PutAuditRec 76Q AnyRoadStop 73Q GetObjectRec 60Q PutValue 43Q FetchMethodOrHelp 34Q GetObjectRec 22Q GetValue 14Q GetValue) (1051Q stoppingPlace 1041Q rule 1020Q NewTemp 1010Q StandardAuditRecord 776Q qty 763Q Room 754Q direction 746Q stoppingPlace 736Q rule 715Q NewTemp 705Q StandardAuditRecord 671Q Room 663Q direction 642Q Range1 631Q GasStation 620Q stoppingPlace 610Q rule 567Q NewTemp 557Q StandardAuditRecord 542Q destination 523Q destination 517Q stoppingPlace 507Q rule 466Q NewTemp 456Q StandardAuditRecord 443Q destination 417Q Range1 403Q destination 366Q Room 360Q direction 337Q Range1 326Q WeighStation 315Q stoppingPlace 305Q rule 264Q NewTemp 254Q StandardAuditRecord 240Q Room 222Q Range1 211Q GasStation 177Q cashBox 171Q truck 151Q MaxFuel 143Q truck 134Q fuel 126Q truck 115Q SitTight 107Q goal 70Q UnionHall 65Q stoppingPlace 55Q rule 40Q NewTemp 31Q StandardAuditRecord 17Q fuel 11Q truck) (160Q .25) GoToStoppingPlacePeddlerRules D1 (P 3 numBuy P 2 realLocation P 1 ^value P 0 ^auditRecord I 0 self F 24Q gameMaster) Pg ]g MkLXgo @g@g H @g g Z@_g OkNa@g @g g J@g _g _OkO/W(_g _O@g lO@g g ZYJ@g o@g o Jg @_g _OkOJg ZJg N@g gAJ@g 6@_g _OJlO[kKW(_"g _ O"KlO Jg %@g g @_&g _$O&kO$I(600Q FetchMethodOrHelp 565Q GetValue 557Q GetValue 546Q ISA 543Q GetObjectRec 517Q FetchMethodOrHelp 461Q FetchMethodOrHelp 445Q GetValue 427Q GetValue 416Q ISA 413Q GetObjectRec 402Q ISA 377Q GetObjectRec 355Q FetchMethodOrHelp 342Q ISA 337Q GetObjectRec 327Q WriteGameStatus 320Q GetValue 302Q GetValue 267Q GetValue 261Q GetValue 243Q GetValue 227Q 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) (575Q SellGoods 562Q cargo 554Q truck 540Q Consumer 514Q Buy 456Q MaxPurchase 442Q destination 432Q Peddle 424Q goal 410Q GasStation 374Q Producer 352Q BuyGas 334Q GasStation 315Q driver 277Q stoppingPlace 264Q location 256Q truck 240Q stoppingPlace 224Q Move 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) (324Q " Didnt reach stoppingPlace" 311Q "Oh!! " 40Q "UPSC@EMv") 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 vKg hgg bKAg JnZA JnZkAg JnZYJAg ldZY@g g A@g g YI(247Q Distance 244Q GetValue 236Q GetValue 226Q GetClassValue 220Q GetValue 203Q GetValue 161Q GetValue 141Q RoomToParkP 125Q ISA 122Q GetClassValue 110Q RuleSetStop 75Q GetValue 64Q RuleSetStop 47Q ISA 44Q GetObjectRec 33Q GetValue 17Q GetValue 11Q GetValue) (241Q location 233Q truck 223Q Gpm 215Q truck 200Q pr 156Q 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 n YAg g nP YAg o YkAg o YAg g IAg g nY@\g LAlKZkJIn'YAg g IlYXIJl YXlAg ldYX@g g A@g g (344Q Distance 341Q GetValue 333Q GetValue 323Q GetClassValue 315Q GetValue 277Q GetValue 246Q SUBCLASS 243Q GetObjectRec 235Q GetClassValue 201Q FetchMethodOrHelp 162Q GetClassValue 154Q GetClassValue 142Q SUBCLASS 137Q GetObjectRec 131Q GetClassValue 120Q MINUS 107Q GetValue 75Q MINUS 65Q ISA 62Q GetObjectRec 51Q MINUS 42Q SUBCLASS 37Q GetObjectRec 31Q GetClassValue 20Q MINUS 11Q RoomToParkP) (336Q location 330Q truck 320Q Gpm 312Q truck 274Q pr 240Q LuxuryGoods 232Q Commodity 176Q MaxPurchase 157Q FragilityLevel 151Q Commodity 134Q FragileCommodity 126Q Commodity 104Q qty 57Q GasStation 34Q PerishableCommodity 26Q Commodity) (115Q 303240Q 72Q 303240Q) PeddlerRateSpotsNearAlices D1 (P 2 cargo P 1 rating P 0 ^value I 1 roadStop I 0 self) 0@g g ZldA@g lYA n YAg n YAg n YJ4Ag (JAg Ag jAg kIlH(205Q GetValue 173Q GetValue 162Q ISA 157Q GetClassValue 145Q ISA 142Q GetObjectRec 126Q MINUS 117Q ISA 114Q GetObjectRec 103Q MINUS 74Q ISA 71Q GetObjectRec 60Q MINUS 51Q RoomToParkP 37Q Distance 34Q GetValue 17Q GetValue 11Q GetValue) (202Q pr 170Q qty 154Q Commodity 137Q Consumer 111Q AlicesRestaurant 66Q UnionHall 31Q alices 14Q cargo 6 truck) NIL SellGoodsPeddlerRules D1 (P 3 sellQty P 2 cargo P 1 ^value P 0 ^auditRecord I 0 self F 10Q gameMaster) $@g g ZY@g g g hggo@g g g @g ghggzj@g g g hgg[Jg W@g g g ?@g g g Jg W]g MJKlLigg IJg @g g g Jg [kKW_g OJKlN(427Q FetchMethodOrHelp 405Q MIN 402Q GetValue 373Q GetValue 365Q GetValue 357Q GetValue 346Q GetValue 335Q RuleSetStop 311Q FetchMethodOrHelp 277Q MIN 274Q GetValue 265Q GetValue 257Q GetValue 251Q GetValue 240Q ISA 235Q GetObjectRec 227Q GetValue 221Q GetValue 210Q GetValue 166Q GetValue 160Q GetValue 152Q GetValue 124Q GetValue 112Q GetValue 104Q GetValue 76Q GetValue 50Q ISA 45Q GetClassValue 37Q GetValue 31Q GetValue 17Q GetValue 11Q GetValue) (424Q Sell 377Q qty 370Q qty 362Q location 354Q truck 343Q status 332Q AtCityDump 327Q Sold 306Q Sell 271Q qty 262Q qty 254Q location 246Q truck 232Q CityDump 224Q location 216Q truck 205Q status 177Q NeverSellAtLoss 174Q NoSale 163Q pr 155Q location 147Q truck 140Q AvoidCheapSkates 135Q NoSale 127Q Peddle 121Q goal 107Q pr 101Q location 73Q truck 60Q WrongKindOfBuyer 55Q NoSale 42Q Commodity 34Q location 26Q truck 14Q cargo 6 truck) (67Q 1.1) TakeTurnPeddlerRules D1 (P 2 possibleStops P 1 ^value P 0 ^auditRecord I 0 self) ,`@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 l2`g }@g dgdgdgih]g _ g _O kOXgo @gg H @g@g H @ggH l`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(1435Q FetchMethodOrHelp 1417Q Distance 1414Q GetValue 1405Q GetValue 1377Q GetValue 1362Q GetValue 1345Q GetValue 1335Q PutAuditRec 1321Q PutAuditRec 1315Q NearestRoadStop 1312Q RoadStops 1307Q GetObjectRec 1274Q PutValue 1271Q GetObjFromUID 1244Q FetchMethodOrHelp 1234Q GetObjectRec 1224Q ISA 1221Q GetObjectRec 1213Q GetValue 1205Q GetValue 1173Q GetValue 1157Q PutAuditRec 1143Q PutAuditRec 1137Q PickHiObj 1134Q RoadStops 1120Q PutAuditRec 1114Q NearestRoadStop 1111Q RoadStops 1106Q GetObjectRec 1073Q PutValue 1070Q GetObjFromUID 1043Q FetchMethodOrHelp 1033Q GetObjectRec 774Q GetValue 762Q 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) (1432Q GoToStoppingPlace 1411Q alices 1402Q location 1374Q truck 1365Q GetClose 1357Q goal 1350Q SitTight 1342Q goal 1331Q GoToAlices 1326Q goal 1304Q AlicesRestaurant 1301Q destination 1262Q rule 1241Q NewTemp 1231Q StandardAuditRecord 1216Q AlicesRestaurant 1210Q location 1202Q truck 1170Q timeRemaining 1165Q gameMaster 1153Q GetClose 1150Q goal 1131Q RateSpotsNearAlices 1125Q destination 1103Q AlicesRestaurant 1100Q alices 1061Q rule 1040Q NewTemp 1030Q StandardAuditRecord 1014Q GoToAlices 1006Q GetClose 1000Q SitTight 771Q goal 757Q timeRemaining 754Q gameMaster 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) (1266Q "UNSC@8L" 1065Q "UNSC@8K" 654Q "UNSC@8J" 473Q "UNSC@8I" 337Q "UNSC@8H" 177Q "UNSC@8G" 51Q "UNSC@8F") (PRETTYCOMPRINT PEDDLERCOMS) (RPAQQ PEDDLERCOMS ((INSTANCES FindStoppingPlacePeddlerRules GoToStoppingPlacePeddlerRules PeddlerMaxPurchase PeddlerRateConsumers PeddlerRateProducers PeddlerRateSpotsNearAlices SellGoodsPeddlerRules TakeTurnPeddlerRules) (CLASSES Peddler) (FNS FindStoppingPlacePeddlerRules GoToStoppingPlacePeddlerRules PeddlerMaxPurchase PeddlerRateConsumers PeddlerRateProducers PeddlerRateSpotsNearAlices SellGoodsPeddlerRules 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) (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@")) (#&(Rule "UPSC@EN?")) (#&(Rule "UPSC@EN@")) (#&(Rule "UPSC@ENA")) (#&(Rule "UPSC@ENB"))) ) (perspectiveNode #&(RuleSetNode "FRSC@$PG") myViewName Source) (created " 1-FEB-83 14:25:34") ( creator LOOPSCOURSE) (edited "16-JUN-83 18:53:52") (editor MITTAL)) (DEFINST RuleSetSource ("FRSC@$T`") (indexedVars ((#&(Rule "UISC@AMT")) (#&(Rule "UISC@AMU")) (#&(Rule "UISC@AMV")) (#&(Rule "UISC@<{l")) (#&(Rule "FBS@@A?V")))) (perspectiveNode #&(RuleSetNode "FRSC@$T_" ) myViewName Source) (created " 1-FEB-83 14:25:11") (creator LOOPSCOURSE) (edited " 9-JUN-83 22:34:09" ) (editor STEFIK)) (DEFINST RuleSetSource ("FRSC@$Ro") (indexedVars ((#&(Rule "UISC@AMW")) (#&(Rule "UISC@AMX")) (#&(Rule "UISC@AMY")) (#&(Rule "UISC@AMZ")) (#&(Rule "UISC@AM[")) (#&(Rule "UISC@AM\")) (#&(Rule "UISC@AM]")) (#&(Rule "UISC@AM^")))) (perspectiveNode #&(RuleSetNode "FRSC@$Re") myViewName Source) (created "18-FEB-83 22:45:14") (creator STEFIK) (edited " 9-JUN-83 21:28:08") (editor STEFIK)) (DEFINST RuleSetSource ("FRSC@$Rp") (indexedVars ((#&(Rule "UISC@AM_")) (#&(Rule "UISC@AM`")) (#&(Rule "UISC@AMa")) (#&(Rule "UISC@AMb")) (#&(Rule "UISC@AMc")) (#&(Rule "UISC@AMd")) (#&(Rule "UISC@AMe")) (#&(Rule "UISC@AMf")) (#&(Rule "UISC@AMg")) (#&(Rule "UISC@AMh")) (#&(Rule "UISC@AMi")) (#&(Rule "FYSC@}d")))) (perspectiveNode #&(RuleSetNode "FRSC@$Rf") myViewName Source) (created "18-FEB-83 22:45:14") (creator STEFIK) (edited " 9-JUN-83 22:37:28") (editor STEFIK)) (DEFINST RuleSetSource ("FRSC@$P[") (indexedVars ((#&(Rule "UISC@AMj")) (#&(Rule "UISC@AMk")) (#&(Rule "UISC@AMl")) (#&(Rule "UISC@AMm")) (#&(Rule "UISC@AMn")) (#&(Rule "UISC@AMo")))) (perspectiveNode #&( RuleSetNode "FRSC@$PY")) (created "18-FEB-83 20:41:23") (creator STEFIK) (edited " 9-JUN-83 22:03:23") (editor STEFIK)) (DEFINST RuleSetSource ("FRSC@$PM") (indexedVars ((#&(Rule "YWSC@8Ao")) (#&(Rule "YWSC@8Ap")) (#&(Rule "YWSC@8Aq")) (#&(Rule "YWSC@8Ar")) (#&(Rule "YWSC@8As")) (#&(Rule "YWSC@8Am")) (#&(Rule "FBS@@A?b")) (#&(Rule "FBS@@A?c")))) (perspectiveNode #&(RuleSetNode "FRSC@$PH") myViewName Source) (created " 1-FEB-83 14:25:40") (creator LOOPSCOURSE) (edited "23-MAY-83 15:37:26") (editor MITTAL)) (DEFINST RuleSetSource ("YQSC@<@J") (indexedVars ((#&(Rule "UNSC@8F")) (#&(Rule "UNSC@8G")) (#&(Rule "UNSC@8H")) (#&(Rule "UNSC@8I")) (#&(Rule "UNSC@8J")) (#&(Rule "UNSC@8K")) (#&(Rule "UNSC@8L")) (#&( Rule "UNSC@8g")))) (perspectiveNode #&(RuleSetNode "YQSC@<@I") myViewName Source) (created " 1-FEB-83 14:25:51") (creator LOOPSCOURSE) (edited "14-JUN-83 14:29:23") (editor MITTAL)) (DEFINST Rule ("UISC@@PI") (source "(* Returns a stopping place en route to a destination.) IF truck:fuel=0 THEN stoppingPlace_(AnyRoadStop $UnionHall);") (edited " 9-JUN-83 11:24:42") (editor STEFIK) ( ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("UISC@@PJ") (source "(* Dont run out of gas.) IF goal~='SitTight truck:fuel < .25 * truck::MaxFuel truck:cashBox>0 gasStation_(NearestRoadStop (RoadStops $GasStation .Range1 NIL 'Room)) THEN stoppingPlace_gasStation;") (edited " 9-JUN-83 11:24:42") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("UISC@@PK") (source "(* Obey the law - stop at WeighStations.) IF wStation_(NearestRoadStop (RoadStops $WeighStation .Range1 direction 'Room)) (Distance wStation)<(Distance destination) THEN stoppingPlace_wStation;") (edited " 9-JUN-83 11:24:42") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("UISC@@PL") (source "IF (Distance destination)<=.Range1 (RoomToParkP destination) THEN stoppingPlace_destination;") (edited " 9-JUN-83 11:24:42") (editor STEFIK) (ruleNumber 4) ( ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("UISC@@PM") (source "IF gasStation_(FurthestRoadStop (RoadStops $GasStation .Range1 direction 'Room)) gasStation:qty>0 THEN stoppingPlace_gasStation;") (edited " 9-JUN-83 11:24:42") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("UISC@@PN") (source "THEN stoppingPlace_(NthRoadStop \maxMove direction NIL 'Room);") (edited " 9-JUN-83 11:24:42") (editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$Oz"))) (DEFINST Rule ("FAS@@&Lp") (source NIL) (edited " 1-FEB-83 14:25:33") (editor "LOOPSCOURSE") ( ruleNumber 7) (ruleSet #&(RuleSet "FAS@@&Li")) (lhs (AND)) (rhs (SETQ ^value (PROGN (PROGN (* Rule Tracing Code) (TraceRHS NIL 7) (_ (GetObjFromUID "FAS@@&Lp") Print)) (NthRoadStop maxMove (GetValue self (QUOTE direction))))))) (DEFINST Rule ("UPSC@EMv") (source " -> direction_(DirectionOf destination);") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@EN=") (source " -> realLocation_truck:location;") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@EN>") (source " IF .FindStoppingPlace stoppingPlace~=truck:location ~stoppingPlace.BanditP THEN (_ \gameMaster Move stoppingPlace) realLocation_truck:location;") (edited "16-JUN-83 18:53:52") (editor MITTAL) ( ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@EN?") (source " IF realLocation~=stoppingPlace THEN (WriteGameStatus %"Oh!! %" driver %" Didnt reach stoppingPlace%");") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@EN@") (source " IF (ISA realLocation $GasStation) THEN .BuyGas;") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@ENA") (source " IF (ISA realLocation $Producer) ~(ISA realLocation $GasStation) goal='Peddle realLocation=destination numBuy_(_ self MaxPurchase realLocation) numBuy>=1 THEN (_ \gameMaster Buy numBuy);") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 6) ( ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UPSC@ENB") (source " IF (ISA realLocation $Consumer) truck:cargo THEN .SellGoods;") (edited "16-JUN-83 18:53:52") (editor MITTAL) (ruleNumber 7) (ruleSet #&(RuleSet "FRSC@$PA"))) (DEFINST Rule ("UISC@AMT") (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 " 9-JUN-83 22:34:09") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("UISC@AMU") (source " -> volumeLimit _ volumeCapacity / roadStop::Commodity::VolPerQty weightLimit _ weightCapacity / roadStop::Commodity::WtPerQty cashLimit _ cashCapacity / (PricePerUnit roadStop) producerLimit _ roadStop:qty;") (edited " 9-JUN-83 22:34:09") (editor STEFIK) (ruleNumber 2) ( ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("UISC@AMV") (source "-> numBuy _ (MIN volumeLimit weightLimit cashLimit producerLimit);") (edited " 9-JUN-83 22:34:09") ( editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("UISC@<{l") (source "-> numBuy _ (MIN volumeLimit weightLimit cashLimit producerLimit);") (edited " 9-JUN-83 17:59:43") ( editor BOBROW) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$TR"))) (DEFINST Rule ("FBS@@A?V") (source NIL) (edited " 2-FEB-83 14:52:17") (editor "LOOPSCOURSE") ( ruleNumber 5) (ruleSet #&(RuleSet "FAS@@&Lh")) (lhs (GREATERP qtyLimit 0)) (rhs (SETQ ^value (PROGN ( PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ^auditRecord (_ ( GetObjFromUID "FAS@@<\") NewTemp)) (PutValue ^auditRecord (QUOTE rule) (GetObjFromUID "FBS@@A?V"))) (_ gameMaster Buy qtyLimit) (PutAuditRec self (QUOTE goal) (QUOTE Sell) ^auditRecord) (PutAuditRec self (QUOTE destination) (NearestRoadStop (Buyers commodity)) ^auditRecord) (PutAuditRec self (QUOTE direction) (DirectionOf (GetValue self (QUOTE destination))) ^auditRecord))))) (DEFINST Rule ("UISC@AMW") (source " (* Rate the suitability of a proposed Consumer.) -> cargo _ (CAR truck:cargo) rating_0;") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AMX") (source "(* if spoiled go to CityDump) IF ~cargo:status (ISA roadStop $CityDump) THEN (STOP 5000 'CityDump 'LookNoMore);") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AMY") (source "IF ~cargo:status THEN (STOP NIL 'SpoiltGoods 'CannotSell);") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AMZ") (source "(* Consumer must want current cargo.) IF ~(ISA cargo roadStop::Commodity) THEN rating _ rating - 5000;") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AM[") (source "(* Need to be able to park) IF ~(RoomToParkP roadStop) THEN rating _ rating - 500;") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 5) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AM\") (source "(* Exclude consumers that have full inventory.) IF roadStop:qty < 1 THEN rating _ rating - 1000;") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AM]") (source "(* Favor high price ratios.) -> rating _ rating + 100 * roadStop:pr ;") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 7) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AM^") (source "(* Favor close places.) -> rating _ rating - [truck::Gpm *(Distance roadStop truck:location)];") (edited " 9-JUN-83 21:28:08") (editor STEFIK) (ruleNumber 8) (ruleSet #&(RuleSet "FRSC@$RX"))) (DEFINST Rule ("UISC@AM_") (source " (* Rate the suitability of a proposed Producer.) -> rating _ 0;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AM`") (source "(* Need to be able to park) IF ~(RoomToParkP roadStop) THEN rating _ -500;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 2) (ruleSet #&( RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMa") (source "(* Exclude perishables.) IF (SUBCLASS roadStop::Commodity $PerishableCommodity) THEN rating _ -50000;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 3) (ruleSet #&( RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMb") (source "(* Exclude gas stations.) IF (ISA roadStop $GasStation) THEN rating _ -100000;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 4) (ruleSet #&( RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMc") (source "(* Exclude producers that are sold out.) IF roadStop:qty < 1 THEN rating _ -100000;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 5) (ruleSet #&( RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMd") (source "(* Exclude excessively fragile goods.) IF (SUBCLASS roadStop::Commodity $FragileCommodity) THEN rating _ rating - [500 * roadStop::Commodity::FragilityLevel];") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 6) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMe") (source "(* Penalize producers for which can buy < 2 items.) IF maxBuy_(_ self MaxPurchase roadStop) maxBuy < 1 THEN rating _ rating - 10000;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 7) ( ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMf") (source "(* favor LuxuryGoods) IF (SUBCLASS roadStop::Commodity $LuxuryGoods) THEN rating _ rating + 200;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 8) (ruleSet #& (RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMg") (source "(* favor higher qty) -> rating _ rating + 10 * maxBuy;") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 9) ( ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMh") (source "(* Favor low price ratios.) -> rating _ rating + 100 * [2 - roadStop:pr];") (edited " 9-JUN-83 22:37:28") (editor STEFIK) ( ruleNumber 10) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMi") (source "(* Favor close places.) -> rating _ rating - [truck::Gpm * (Distance roadStop truck:location)];") (edited " 9-JUN-83 22:37:28") (editor STEFIK) (ruleNumber 11) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("FYSC@}d") (source "(* Favor close places.) -> rating _ rating - [currentPlayer:truck::Gpm * (Distance self currentPlayer:truck:location)];") ( edited "25-FEB-83 10:39:58") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FRSC@$Qy"))) (DEFINST Rule ("UISC@AMj") (source "(* Rating RuleSet for spots near Alices. Returns a number for spots.) -> cargo _ (CAR truck:cargo);") (edited " 9-JUN-83 22:03:23") (editor STEFIK) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("UISC@AMk") (source " (* Favor places closer to Alices.) -> rating _ 100 - 4 * (Distance roadStop alices);") (edited " 9-JUN-83 22:03:23") (editor STEFIK) ( ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PR"))) (DEFINST Rule ("UISC@AMl") (source "IF ~(RoomToParkP roadStop) THEN rating _ -1000;") (edited " 9-JUN-83 22:03:23") (editor STEFIK) (ruleNumber 3) (ruleSet #&( RuleSet "FRSC@$PR"))) (DEFINST Rule ("UISC@AMm") (source "IF (ISA roadStop $UnionHall) THEN rating _ -1000;") (edited " 9-JUN-83 22:03:23") (editor STEFIK) (ruleNumber 4) (ruleSet #&( RuleSet "FRSC@$PR"))) (DEFINST Rule ("UISC@AMn") (source "IF (ISA roadStop $AlicesRestaurant) THEN rating _ -500;") (edited " 9-JUN-83 22:03:23") (editor STEFIK) (ruleNumber 5) (ruleSet #&( RuleSet "FRSC@$PR"))) (DEFINST Rule ("UISC@AMo") (source "IF cargo (ISA roadStop $Consumer) (ISA cargo roadStop::Commodity) roadStop:qty>0 roadStop:pr>1 THEN rating _ rating + 20;") (edited " 9-JUN-83 22:03:23") (editor STEFIK) (ruleNumber 6) (ruleSet #& (RuleSet "FRSC@$PR"))) (DEFINST Rule ("YWSC@8Ao") (source " -> cargo_(CAR truck:cargo);") (edited "23-MAY-83 15:37:26") ( editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("YWSC@8Ap") (source " IF ~(ISA cargo truck:location::Commodity) THEN (STOP NIL 'NoSale 'WrongKindOfBuyer);") (edited "23-MAY-83 15:37:26") (editor MITTAL) ( ruleNumber) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("YWSC@8Aq") (source " IF truck:location:pr < 1.1 goal='Peddle THEN (STOP NIL 'NoSale 'AvoidCheapSkates);") (edited "23-MAY-83 15:37:26") (editor MITTAL) ( ruleNumber) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("YWSC@8Ar") (source " IF truck:location:pr < 0 THEN (STOP NIL 'NoSale 'NeverSellAtLoss);") (edited "23-MAY-83 15:37:26") (editor MITTAL) (ruleNumber ) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("YWSC@8As") (source "(* Make sale as limited by cargo and consumer.) IF ~cargo:status (ISA truck:location $CityDump) THEN sellQty_(MIN truck:location:qty cargo:qty) (_ gameMaster Sell cargo sellQty) (STOP T 'Sold 'AtCityDump);") (edited "23-MAY-83 15:37:26") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("YWSC@8Am") (source " IF cargo:status sellQty_(MIN truck:location:qty cargo:qty) sellQty>=1 THEN (_ gameMaster Sell cargo sellQty);") (edited "23-MAY-83 15:37:26") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("FBS@@A?b") (source NIL) (edited " 2-FEB-83 14:52:20") (editor "LOOPSCOURSE") ( ruleNumber 7) (ruleSet #&(RuleSet "FAS@@&Lr")) (lhs (AND (PROGN (* Rule Tracing Code) (TraceLHS NIL 7) (_ (GetObjFromUID "FBS@@A?b") Print)) (EQ cQty sellQty))) (rhs (SETQ ^value (PROGN (PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ^auditRecord (_ (GetObjFromUID "FAS@@<\") NewTemp)) (PutValue ^auditRecord (QUOTE rule) (GetObjFromUID "FBS@@A?b"))) (PROGN (* Rule Tracing Code ) (TraceRHS NIL 7) (_ (GetObjFromUID "FBS@@A?b") Print)) (PutAuditRec self (QUOTE goal) (QUOTE Buy) ^auditRecord) (PutAuditRec self (QUOTE destination) NIL ^auditRecord))))) (DEFINST Rule ("FBS@@A?c") (source NIL) (edited " 2-FEB-83 14:52:20") (editor "LOOPSCOURSE") ( ruleNumber 8) (ruleSet #&(RuleSet "FAS@@&Lr")) (lhs (AND (PROGN (* Rule Tracing Code) (TraceLHS NIL 8) (_ (GetObjFromUID "FBS@@A?c") Print)) (LESSP sellQty cQty))) (rhs (SETQ ^value (PROGN (PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ^auditRecord (_ (GetObjFromUID "FAS@@<\") NewTemp)) (PutValue ^auditRecord (QUOTE rule) (GetObjFromUID "FBS@@A?c"))) (PROGN (* Rule Tracing Code) (TraceRHS NIL 8) (_ (GetObjFromUID "FBS@@A?c") Print)) (PutAuditRec self (QUOTE destination) (NearestRoadStop (Buyers cargo1)) ^auditRecord) (PutAuditRec self (QUOTE direction) ( DirectionOf (GetValue self (QUOTE destination))) ^auditRecord))))) (DEFINST Rule ("UNSC@8F") (source " (* Top-Level RuleSet for taking turns. Sets goal and destination.) IF ~goal THEN goal_'Peddle;") (edited "14-JUN-83 14:29:23") (editor MITTAL) (ruleNumber 1) (ruleSet #&( RuleSet "YQSC@ 25 goal='SitTight THEN alices_(NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ (PickHiObj self 'RateSpotsNearAlices (RoadStops)) goal_'GetClose;") (edited "14-JUN-83 14:29:23") (editor MITTAL) (ruleNumber 5) (ruleSet #&( RuleSet "YQSC@0 gasStation_(NearestRoadStop (RoadStops $GasStation .Range1 NIL 'Room)) THEN gasStation;") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$Ly") (source "(* Obey the law - stop at WeighStations.) IF wStation_(NearestRoadStop (RoadStops $WeighStation .Range1 direction 'Room)) (Distance wStation)<(Distance destination) THEN wStation;") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$Lz") (source "IF (Distance destination)<=.Range1 THEN destination;") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$L{") (source "IF gasStation_(FurthestRoadStop (RoadStops $GasStation .Range1 direction)) THEN gasStation;") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$L|") (source "THEN (NthRoadStop maxMove direction);") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$Ls") (source " (* Rules for deciding what and how much to buy.) -> commodity _ truck:location::Commodity;") (edited "16-FEB-83 14:59:42") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lh"))) (DEFINST Rule ("FPSC@$Lt") (source "IF ~(ISA commodity $LuxuryGoods) THEN (STOP NIL 'NoBuy 'NotLuxury);") (edited "16-FEB-83 14:59:42") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FAS@@&Lh"))) (DEFINST Rule ("FPSC@$Lu") (source "(* Sale can be limited by volume, weight, cash, or availability.) -> volumeCapacity _ truck::MaxVolume-truck:volume weightCapacity _ truck::MaxWeight-truck:weight volumeLimit _ volumeCapacity / commodity::VolPerQty weightLimit _ weightCapacity / commodity::WtPerQty cashLimit _ truck:cashBox / (PricePerUnit truck:location) producerLimit _ truck:location:qty numBuy _ (MIN volumeLimit weightLimit cashLimit producerLimit);") (edited "16-FEB-83 14:59:42") ( editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lh"))) (DEFINST Rule ("FPSC@$Lv") (source "(* Buy as much as possible, then decide to sell it.) IF numBuy>0 THEN (_ gameMaster Buy numBuy) goal_'Sell destination_(NearestRoadStop (Buyers commodity));") (edited "16-FEB-83 14:59:42") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lh"))) (DEFINST Rule ("FPSC@$MD") (source " -> cargo_(CAR truck:cargo);") (edited "16-FEB-83 14:26:24") ( editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lr"))) (DEFINST Rule ("FPSC@$ME") (source "(* Abort sale if cargo has disappeared.) IF ~cargo THEN destination_NIL (WriteGameStatus %"Yipes! My cargo is gone!%") (STOP NIL 'NoSale 'NoCargo);") (edited "16-FEB-83 14:26:24") (editor STEFIK) (ruleNumber) (ruleSet #& (RuleSet "FAS@@&Lr"))) (DEFINST Rule ("FPSC@$MF") (source "(* Make sale as limited by cargo and consumer.) IF sellQty_(MIN truck:location:qty cargo:qty) sellQty>0 THEN (_ gameMaster Sell cargo sellQty);") (edited "16-FEB-83 14:26:24") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lr"))) (DEFINST Rule ("FPSC@$MG") (source "(* Find another buyer if all not sold.) IF cargo_(CAR truck:cargo) cargo:qty>0 THEN destination_(NearestRoadStop (Buyers truck:cargo)) direction_(DirectionOf destination) (STOP NIL 'NoSale 'CantSell);") (edited "16-FEB-83 14:26:24") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FAS@@&Lr"))) (DEFINST Rule ("FBS@@A?`") (source NIL) (edited " 2-FEB-83 14:52:20") (editor "LOOPSCOURSE") ( ruleNumber 5) (ruleSet #&(RuleSet "FAS@@&Lr")) (lhs (AND (PROGN (* Rule Tracing Code) (TraceLHS NIL 5) (_ (GetObjFromUID "FBS@@A?`") Print)) (OR (EQ sellQty 0) (NOT (ISA cargo1 commodity))))) (rhs (SETQ ^value (PROGN (PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ^auditRecord (_ (GetObjFromUID "FAS@@<\") NewTemp)) (PutValue ^auditRecord (QUOTE rule) (GetObjFromUID "FBS@@A?`"))) (PROGN (* Rule Tracing Code) (TraceRHS NIL 5) (_ (GetObjFromUID "FBS@@A?`") Print)) ( PutAuditRec self (QUOTE destination) (NearestRoadStop (Buyers cargo1)) ^auditRecord) (PutAuditRec self (QUOTE direction) (DirectionOf (GetValue self (QUOTE destination))) ^auditRecord) (PROGN (* ^value set by RuleSetStop) (RuleSetStop self) (GO QUIT)))))) (DEFINST Rule ("FBS@@A?a") (source NIL) (edited " 2-FEB-83 14:52:20") (editor "LOOPSCOURSE") ( ruleNumber 6) (ruleSet #&(RuleSet "FAS@@&Lr")) (lhs (PROGN (* Rule Tracing Code) (TraceLHS NIL 6) (_ ( GetObjFromUID "FBS@@A?a") Print))) (rhs (SETQ ^value (PROGN (PROGN (* Rule Tracing Code) (TraceRHS NIL 6) (_ (GetObjFromUID "FBS@@A?a") Print)) (_ gameMaster Sell cargo1 sellQty))))) (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.))) ( Methods (FindStoppingPlace FindStoppingPlacePeddlerRules doc (* RuleSet FindStoppingPlacePeddlerRules is installed as the selector FindStoppingPlace of the class Peddler) RuleSet FindStoppingPlacePeddlerRules) (GoToStoppingPlace GoToStoppingPlacePeddlerRules doc (* RuleSet GoToStoppingPlacePeddlerRules is installed as the selector GoToStoppingPlace of the class Peddler) RuleSet GoToStoppingPlacePeddlerRules) (SellGoods SellGoodsPeddlerRules doc (* RuleSet SellGoodsPeddlerRules is installed as the selector SellGoods of the class Peddler) RuleSet SellGoodsPeddlerRules) (TakeTurn TakeTurnPeddlerRules args NIL doc (* RuleSet TakeTurnPeddlerRules is installed as the selector TakeTurn of the class Peddler) RuleSet TakeTurnPeddlerRules) (RateConsumers PeddlerRateConsumers doc (* RuleSet PeddlerRateConsumers is installed as the selector RateConsumers of the class Peddler) RuleSet PeddlerRateConsumers) (RateProducers PeddlerRateProducers RuleSet PeddlerRateProducers) (RateSpotsNearAlices PeddlerRateSpotsNearAlices RuleSet PeddlerRateSpotsNearAlices) (MaxPurchase PeddlerMaxPurchase RuleSet PeddlerMaxPurchase))) NIL