(FILECREATED " 2-JUN-83 14:49:03" ("compiled on " {INDIGO}TRUCKIN>HIGHROLLER.;1) "30-MAY-83 21:21:58" tcompl'd in LOOPS.SYSOUT dated " 1-JUN-83 14:05:56") (FILECREATED " 2-JUN-83 14:47:45" {INDIGO}TRUCKIN>HIGHROLLER.;1 45165 previous date: "23-MAY-83 12:19:51" {INDIGO}TRUCKIN>PLAYERS>HIGHROLLER.;12) BuyGoodsHighRollerRules D1 (P 11Q numBuy P 10Q producerLimit P 7 cashLimit P 6 weightLimit P 5 volumeLimit P 4 weightCapacity P 3 volumeCapacity P 2 commodity P 1 ^value P 0 ^auditRecord I 3 ^task I 2 ^caller I 1 ^rs I 0 self) " @g g g ZYg hgg I@g g @g g ջ@g g @g g ռKJg ׽LJg ׾@g g @g g _@g g g _MNOO _kOjg _g _OkOXgo `_g _OOlO@ggH @gJ H (437Q PutAuditRec 433Q NearestRoadStop 430Q Buyers 417Q PutAuditRec 366Q FetchMethodOrHelp 352Q PutValue 347Q GetObjFromUID 322Q FetchMethodOrHelp 312Q GetObjectRec 271Q MIN 255Q GetValue 247Q GetValue 241Q GetValue 226Q PricePerUnit 223Q GetValue 215Q GetValue 206Q GetValue 200Q GetValue 167Q GetClassValue 155Q GetClassValue 143Q GetValue 135Q GetValue 126Q GetClassValue 120Q GetValue 107Q GetValue 101Q GetValue 72Q GetClassValue 64Q GetValue 53Q RuleSetStop 40Q SUBCLASS 35Q GetObjectRec 25Q GetClassValue 17Q GetValue 11Q GetValue) (424Q destination 413Q Sell 410Q goal 363Q Buy 356Q gameMaster 340Q rule 317Q NewTemp 307Q StandardAuditRecord 252Q qty 244Q location 236Q truck 220Q location 212Q truck 203Q cashBox 175Q truck 164Q WtPerQty 152Q VolPerQty 140Q weight 132Q truck 123Q MaxWeight 115Q truck 104Q volume 76Q truck 67Q MaxVolume 61Q truck 50Q NotLuxury 45Q NoBuy 32Q LuxuryGoods 22Q Commodity 14Q location 6 truck) (344Q "MKSC@A_\") FindStoppingPlaceHighRollerRules D1 (P 3 gasStation P 2 wStation P 1 ^value P 0 ^auditRecord I 3 ^task I 2 ^caller I 1 ^rs I 0 self) E@g g j6g ]g MkLXgo @gg H @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 [3g _*g _(O*kO(Xgo @gKH g _.g _,O.kO,Xgo @g`@g hg H (1102Q PutAuditRec 1076Q NthRoadStop 1067Q GetValue 1050Q PutValue 1045Q GetObjFromUID 1020Q FetchMethodOrHelp 1010Q GetObjectRec 1001Q PutAuditRec 767Q PutValue 764Q GetObjFromUID 737Q FetchMethodOrHelp 727Q GetObjectRec 716Q FurthestRoadStop 713Q RoadStops 705Q GetValue 664Q FetchMethodOrHelp 653Q GetObjectRec 644Q PutAuditRec 632Q PutValue 627Q GetObjFromUID 602Q FetchMethodOrHelp 572Q GetObjectRec 560Q Distance 555Q GetValue 546Q Distance 542Q PutAuditRec 536Q GetValue 522Q PutValue 517Q GetObjFromUID 472Q FetchMethodOrHelp 462Q GetObjectRec 452Q RoomToParkP 447Q GetValue 421Q FetchMethodOrHelp 410Q Distance 405Q GetValue 373Q NearestRoadStop 370Q RoadStops 362Q GetValue 341Q FetchMethodOrHelp 330Q GetObjectRec 321Q PutAuditRec 307Q PutValue 304Q GetObjFromUID 257Q FetchMethodOrHelp 247Q GetObjectRec 236Q NearestRoadStop 233Q RoadStops 215Q FetchMethodOrHelp 204Q GetObjectRec 172Q GetValue 164Q GetValue 144Q GetClassValue 136Q GetValue 127Q GetValue 121Q GetValue 111Q PutAuditRec 105Q AnyRoadStop 102Q GetObjectRec 67Q PutValue 64Q GetObjFromUID 43Q FetchMethodOrHelp 34Q GetObjectRec 22Q GetValue 14Q GetValue) (1073Q Room 1064Q direction 1060Q maxMove 1055Q stoppingPlace 1036Q rule 1015Q NewTemp 1005Q StandardAuditRecord 774Q stoppingPlace 755Q rule 734Q NewTemp 724Q StandardAuditRecord 710Q Room 702Q direction 661Q Range1 650Q GasStation 637Q stoppingPlace 620Q rule 577Q NewTemp 567Q StandardAuditRecord 552Q destination 533Q destination 527Q stoppingPlace 510Q rule 467Q NewTemp 457Q StandardAuditRecord 444Q destination 416Q Range1 402Q destination 365Q Room 357Q direction 336Q Range1 325Q WeighStation 314Q stoppingPlace 275Q rule 254Q NewTemp 244Q StandardAuditRecord 230Q Room 212Q Range1 201Q GasStation 167Q cashBox 161Q truck 141Q MaxFuel 133Q truck 124Q fuel 116Q truck 77Q UnionHall 74Q stoppingPlace 55Q rule 40Q NewTemp 31Q StandardAuditRecord 17Q fuel 11Q truck) (1042Q "MKSC@A_b" 761Q "MKSC@A_a" 624Q "MKSC@A__" 514Q "MKSC@A_`" 301Q "MKSC@A_^" 150Q .25 61Q "MKSC@A_]") GoToStoppingPlaceHighRollerRules D1 (P 2 realLocation P 1 ^value P 0 ^auditRecord I 3 ^task I 2 ^caller I 1 ^rs I 0 self) $g \g LkKXgo @g@g H @^g NkM`_g _O@g lO@g g ZY@g ho Jg @_g _OkOJg 5Jg g #@g g@_g _OkOJg 2@g g #@g g@_g _OkOI(425Q FetchMethodOrHelp 406Q GetValue 375Q GetValue 367Q GetValue 356Q ISA 353Q GetObjectRec 331Q FetchMethodOrHelp 312Q GetValue 301Q SUBCLASS 276Q GetObjectRec 270Q GetClassValue 257Q ISA 254Q GetObjectRec 232Q FetchMethodOrHelp 217Q ISA 214Q GetObjectRec 204Q WriteGameStatus 172Q GetValue 161Q GetValue 153Q GetValue 135Q GetValue 121Q FetchMethodOrHelp 77Q FetchMethodOrHelp 66Q PutAuditRec 62Q DirectionOf 57Q GetValue 43Q PutValue 40Q GetObjFromUID 17Q FetchMethodOrHelp 10Q GetObjectRec) (422Q SellGoods 411Q Sell 403Q goal 372Q cargo 364Q truck 350Q Consumer 326Q BuyGoods 315Q Buy 307Q goal 273Q LuxuryGoods 265Q Commodity 251Q Producer 227Q BuyGas 211Q GasStation 167Q stoppingPlace 156Q location 150Q truck 132Q stoppingPlace 116Q Move 111Q gameMaster 74Q FindStoppingPlace 54Q destination 50Q direction 31Q rule 14Q NewTemp 5 StandardAuditRecord) (201Q "I've been intercepted!" 35Q "MKSC@A_c") HighRoller.BuyGoods D1 (I 0 self) g Hg H@lI(17Q FetchMethodOrHelp 5 GetObjectRec) (14Q Run 2 BuyGoodsHighRollerRules) NIL HighRoller.FindStoppingPlace D1 (I 0 self) g Hg H@lI(17Q FetchMethodOrHelp 5 GetObjectRec) (14Q Run 2 FindStoppingPlaceHighRollerRules) NIL HighRoller.GoToStoppingPlace D1 (I 0 self) g Hg H@lI(17Q FetchMethodOrHelp 5 GetObjectRec) (14Q Run 2 GoToStoppingPlaceHighRollerRules) NIL HighRoller.SellGoods D1 (I 0 self) g Hg H@lI(17Q FetchMethodOrHelp 5 GetObjectRec) (14Q Run 2 SellGoodsHighRollerRules) NIL HighRoller.TakeTurn D1 (I 0 self) g Hg H@lI(17Q FetchMethodOrHelp 5 GetObjectRec) (14Q Run 2 TakeTurnHighRollerRules) NIL SellGoodsHighRollerRules D1 (P 3 sellQty P 2 cargo P 1 ^value P 0 ^auditRecord I 3 ^task I 2 ^caller I 1 ^rs I 0 self)   @g g Cg ]g MkLXgo @ghH o hgg C@g g Z@g g g Jg [v@g g ZIg jg _g _OkOXgo @gJ H @g@g H hgg j`_g OJKlNr(405Q FetchMethodOrHelp 363Q RuleSetStop 350Q PutAuditRec 344Q DirectionOf 341Q GetValue 325Q PutAuditRec 321Q NearestRoadStop 316Q Buyers 305Q PutValue 302Q GetObjFromUID 255Q FetchMethodOrHelp 245Q GetObjectRec 233Q GetValue 217Q GetValue 211Q GetValue 177Q MIN 174Q GetValue 165Q GetValue 157Q GetValue 151Q GetValue 137Q GetValue 131Q GetValue 117Q RuleSetStop 104Q WriteGameStatus 74Q PutAuditRec 62Q PutValue 57Q GetObjFromUID 36Q FetchMethodOrHelp 27Q GetObjectRec 17Q GetValue 11Q GetValue) (402Q Sell 375Q gameMaster 360Q CantSell 355Q NoSale 336Q destination 332Q direction 312Q destination 273Q rule 252Q NewTemp 242Q StandardAuditRecord 230Q qty 214Q cargo 206Q truck 171Q qty 162Q qty 154Q location 146Q truck 134Q cargo 126Q truck 114Q NoCargo 111Q NoSale 67Q destination 50Q rule 33Q NewTemp 24Q StandardAuditRecord 14Q cargo 6 truck) (277Q "MKSC@A_e" 101Q "Yipes! My cargo is gone!" 54Q "MKSC@A_d") TakeTurnHighRollerRules D1 (P 2 alice P 1 ^value P 0 ^auditRecord I 3 ^task I 2 ^caller I 1 ^rs I 0 self) _ @g 9@g 0g \g LkKXgo @ggH @g g9g ^g NkMXgo @gg H @g @g g g Jg _g _OkOXgo @gg H @ggH @g jg _@g gRg _g _OkOXgo @ggH g @gJg H l2`g l@g g_@g gRg _g _OkOXgo g @gJg H @ggH l`g b@g g g Jg _g _OkOXgo @gg H @ggH @_ g _O kO(1122Q FetchMethodOrHelp 1110Q PutAuditRec 1074Q PutAuditRec 1070Q NearestRoadStop 1065Q RoadStops 1062Q GetObjectRec 1047Q PutValue 1044Q GetObjFromUID 1017Q FetchMethodOrHelp 1007Q GetObjectRec 777Q ISA 774Q GetObjectRec 766Q GetValue 760Q GetValue 746Q GetValue 732Q PutAuditRec 716Q PutAuditRec 712Q GetValue 676Q NearestRoadStop 673Q RoadStops 670Q GetObjectRec 661Q PutValue 656Q GetObjFromUID 631Q FetchMethodOrHelp 621Q GetObjectRec 605Q GetValue 570Q GetValue 556Q GetValue 542Q PutAuditRec 536Q GetValue 522Q NearestRoadStop 517Q RoadStops 514Q GetObjectRec 505Q PutAuditRec 471Q PutValue 466Q GetObjFromUID 441Q FetchMethodOrHelp 431Q GetObjectRec 415Q GetValue 404Q Sellers 401Q GetObjectRec 371Q GetValue 361Q PutAuditRec 345Q PutAuditRec 341Q NearestRoadStop 336Q Sellers 333Q GetObjectRec 320Q PutValue 315Q GetObjFromUID 270Q FetchMethodOrHelp 260Q GetObjectRec 250Q ISA 245Q GetObjectRec 237Q GetValue 231Q GetValue 220Q GetValue 210Q PutAuditRec 204Q NearestRoadStop 201Q Sellers 176Q GetObjectRec 163Q PutValue 160Q GetObjFromUID 137Q FetchMethodOrHelp 130Q GetObjectRec 114Q GetValue 104Q PutAuditRec 70Q PutValue 65Q GetObjFromUID 44Q FetchMethodOrHelp 35Q GetObjectRec 25Q GetValue 14Q GetValue) (1117Q GoToStoppingPlace 1104Q GoToAlices 1101Q goal 1057Q AlicesRestaurant 1054Q destination 1035Q rule 1014Q NewTemp 1004Q StandardAuditRecord 771Q AlicesRestaurant 763Q location 755Q truck 743Q timeRemaining 740Q gameMaster 726Q GetClose 723Q goal 707Q prev 703Q destination 665Q AlicesRestaurant 647Q rule 626Q NewTemp 616Q StandardAuditRecord 610Q GoToAlices 602Q goal 573Q SitTight 565Q goal 553Q timeRemaining 550Q gameMaster 533Q prev 527Q destination 511Q AlicesRestaurant 501Q GetClose 476Q goal 457Q rule 436Q NewTemp 426Q StandardAuditRecord 420Q Buy 412Q goal 376Q LuxuryGoods 366Q destination 355Q Buy 352Q goal 330Q LuxuryGoods 325Q destination 306Q rule 265Q NewTemp 255Q StandardAuditRecord 242Q UnionHall 234Q location 226Q truck 215Q destination 173Q LuxuryGoods 170Q destination 151Q rule 134Q NewTemp 125Q StandardAuditRecord 117Q Buy 111Q goal 100Q Buy 75Q goal 56Q rule 41Q NewTemp 32Q StandardAuditRecord 22Q destination 11Q goal) (1041Q "YWSC@8?w" 653Q "YWSC@8?v" 463Q "YWSC@8?u" 312Q "YWSC@8?t" 155Q "YWSC@8?s" 62Q "YWSC@8?r") (PRETTYCOMPRINT HIGHROLLERCOMS) (RPAQQ HIGHROLLERCOMS ((INSTANCES BuyGoodsHighRollerRules FindStoppingPlaceHighRollerRules GoToStoppingPlaceHighRollerRules SellGoodsHighRollerRules TakeTurnHighRollerRules) (CLASSES HighRoller ) (FNS BuyGoodsHighRollerRules FindStoppingPlaceHighRollerRules GoToStoppingPlaceHighRollerRules HighRoller.BuyGoods HighRoller.FindStoppingPlace HighRoller.GoToStoppingPlace HighRoller.SellGoods HighRoller.TakeTurn SellGoodsHighRollerRules TakeTurnHighRollerRules))) (DEFINST RuleSet (BuyGoodsHighRollerRules "FQSC@$AI") (perspectiveNode #&(RuleSetNode "FQSC@$AN") myViewName RuleSet) (name #(BuyGoodsHighRollerRules NIL RememberName)) (compiledRules BuyGoodsHighRollerRules) (workSpace HighRoller) (arguments) (tempVars (commodity volumeCapacity weightCapacity volumeLimit weightLimit cashLimit producerLimit numBuy)) (taskVars NIL) (debugVars NIL) (numRules 4) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) (auditClass NIL) ( metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (FindStoppingPlaceHighRollerRules "FQSC@$AJ") (perspectiveNode #&(RuleSetNode "FQSC@$AO") myViewName RuleSet) (name #(FindStoppingPlaceHighRollerRules NIL RememberName)) ( compiledRules FindStoppingPlaceHighRollerRules) (workSpace HighRoller) (arguments) (tempVars (wStation gasStation)) (taskVars NIL) (debugVars NIL) (numRules 6) (controlStructure DO1) (whileCondition NIL) (compilerOptions (PR A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (GoToStoppingPlaceHighRollerRules "FQSC@$AK") (perspectiveNode #&(RuleSetNode "FQSC@$AP") myViewName RuleSet) (name #(GoToStoppingPlaceHighRollerRules NIL RememberName)) ( compiledRules GoToStoppingPlaceHighRollerRules) (workSpace HighRoller) (arguments) (tempVars ( realLocation)) (taskVars NIL) (debugVars NIL) (numRules 6) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (PR A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (SellGoodsHighRollerRules "FQSC@$AL") (perspectiveNode #&(RuleSetNode "FQSC@$AQ") myViewName RuleSet) (name #(SellGoodsHighRollerRules NIL RememberName)) (compiledRules SellGoodsHighRollerRules) (workSpace HighRoller) (arguments) (tempVars (cargo sellQty)) (taskVars NIL) (debugVars NIL) (numRules 4) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (TakeTurnHighRollerRules "FQSC@$AM") (perspectiveNode #&(RuleSetNode "FQSC@$AR") myViewName RuleSet) (name #(TakeTurnHighRollerRules NIL RememberName)) (compiledRules TakeTurnHighRollerRules) (workSpace HighRoller) (arguments) (tempVars (alice)) (taskVars NIL) ( debugVars NIL) (numRules 7) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSetNode ("FQSC@$AN") (perspectives ? RuleSet #&(RuleSet "FQSC@$AI") Source #&( RuleSetSource "FQSC@$AS"))) (DEFINST RuleSetNode ("FQSC@$AO") (perspectives ? RuleSet #&(RuleSet "FQSC@$AJ") Source #&( RuleSetSource "FQSC@$AT"))) (DEFINST RuleSetNode ("FQSC@$AP") (perspectives ? RuleSet #&(RuleSet "FQSC@$AK") Source #&( RuleSetSource "FQSC@$AU"))) (DEFINST RuleSetNode ("FQSC@$AQ") (perspectives ? RuleSet #&(RuleSet "FQSC@$AL") Source #&( RuleSetSource "FQSC@$AV"))) (DEFINST RuleSetNode ("FQSC@$AR") (perspectives ? RuleSet #&(RuleSet "FQSC@$AM") Source #&( RuleSetSource "FQSC@$AW"))) (DEFINST RuleSetSource ("FQSC@$AS") (indexedVars ((#&(Rule "MKSC@A_y")) (#&(Rule "MKSC@A_z")) (#&(Rule "MKSC@A_{")) (#&(Rule "MKSC@A_\")) (#&(Rule "FBS@@A?V")))) (perspectiveNode #&(RuleSetNode "FQSC@$AN" ) myViewName Source) (created " 1-FEB-83 14:25:11") (creator LOOPSCOURSE) (edited "11-MAR-83 17:13:00" ) (editor STEFIK)) (DEFINST RuleSetSource ("FQSC@$AT") (indexedVars ((#&(Rule "MKSC@A_]")) (#&(Rule "MKSC@A_^")) (#&(Rule "MKSC@A__")) (#&(Rule "MKSC@A_`")) (#&(Rule "MKSC@A_a")) (#&(Rule "MKSC@A_b")) (#&(Rule "FAS@@&Lp"))) ) (perspectiveNode #&(RuleSetNode "FQSC@$AO") myViewName Source) (created " 1-FEB-83 14:25:23") ( creator LOOPSCOURSE) (edited "11-MAR-83 17:13:15") (editor STEFIK)) (DEFINST RuleSetSource ("FQSC@$AU") (indexedVars ((#&(Rule "MKSC@A_c")) (#&(Rule "MKSC@A_|")) (#&(Rule "MKSC@A`=")) (#&(Rule "MKSC@A`>")) (#&(Rule "MKSC@A`?")) (#&(Rule "MKSC@A`@")) (#&(Rule "FPSC@$MC"))) ) (perspectiveNode #&(RuleSetNode "FQSC@$AP") myViewName Source) (created " 1-FEB-83 14:25:34") ( creator LOOPSCOURSE) (edited "11-MAR-83 17:13:31") (editor STEFIK)) (DEFINST RuleSetSource ("FQSC@$AV") (indexedVars ((#&(Rule "MKSC@A_d")) (#&(Rule "MKSC@A`A")) (#&(Rule "MKSC@A`B")) (#&(Rule "MKSC@A_e")) (#&(Rule "FBS@@A?`")) (#&(Rule "FBS@@A?a")) (#&(Rule "FBS@@A?b")) (#&(Rule "FBS@@A?c")))) (perspectiveNode #&(RuleSetNode "FQSC@$AQ") myViewName Source) (created " 1-FEB-83 14:25:40") (creator LOOPSCOURSE) (edited "11-MAR-83 17:13:51") (editor STEFIK)) (DEFINST RuleSetSource ("FQSC@$AW") (indexedVars ((#&(Rule "YWSC@8?r")) (#&(Rule "YWSC@8?s")) (#&(Rule "YWSC@8?t")) (#&(Rule "YWSC@8?u")) (#&(Rule "YWSC@8?v")) (#&(Rule "YWSC@8?w")) (#&(Rule "YWSC@8@\"))) ) (perspectiveNode #&(RuleSetNode "FQSC@$AR") myViewName Source) (created " 1-FEB-83 14:25:51") ( creator LOOPSCOURSE) (edited "23-MAY-83 10:53:27") (editor MITTAL)) (DEFINST Rule ("MKSC@A_y") (source " (* Rules for deciding what and how much to buy.) -> commodity _ truck:location::Commodity;") (edited "11-MAR-83 17:13:00") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AI"))) (DEFINST Rule ("MKSC@A_z") (source "IF ~(SUBCLASS commodity $LuxuryGoods) THEN (STOP NIL 'NoBuy 'NotLuxury);") (edited "11-MAR-83 17:13:00") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FQSC@$AI"))) (DEFINST Rule ("MKSC@A_{") (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 "11-MAR-83 17:13:00") ( editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AI"))) (DEFINST Rule ("MKSC@A_\") (source "(* Buy as much as possible, then decide to sell it.) IF numBuy>=1 THEN (_ gameMaster Buy numBuy) goal_'Sell destination_(NearestRoadStop (Buyers commodity));") (edited "11-MAR-83 17:13:00") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AI"))) (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 ("MKSC@A_]") (source "(* Returns a stopping place en route to a destination.) IF truck:fuel=0 THEN stoppingPlace_(AnyRoadStop $UnionHall);") (edited "11-MAR-83 17:13:15") (editor STEFIK) ( ruleNumber) (ruleSet #&(RuleSet "FQSC@$AJ"))) (DEFINST Rule ("MKSC@A_^") (source "(* Dont run out if gas.) IF truck:fuel < .25 * truck::MaxFuel truck:cashBox>0 gasStation_(NearestRoadStop (RoadStops $GasStation .Range1 NIL 'Room)) THEN stoppingPlace_gasStation;") (edited "11-MAR-83 17:13:15") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AJ"))) (DEFINST Rule ("MKSC@A__") (source "(* Obey the law - stop at WeighStations.) IF wStation_(NearestRoadStop (RoadStops $WeighStation .Range1 direction 'Room)) (Distance wStation)<(Distance destination) THEN stoppingPlace_wStation;") (edited "11-MAR-83 17:13:15") (editor STEFIK) (ruleNumber) (ruleSet #&( RuleSet "FQSC@$AJ"))) (DEFINST Rule ("MKSC@A_`") (source "IF (Distance destination)<=.Range1 (RoomToParkP destination) THEN stoppingPlace_destination;") (edited "11-MAR-83 17:13:15") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AJ"))) (DEFINST Rule ("MKSC@A_a") (source "IF gasStation_(FurthestRoadStop (RoadStops $GasStation .Range1 direction 'Room)) THEN stoppingPlace_gasStation;") (edited "11-MAR-83 17:13:15") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AJ"))) (DEFINST Rule ("MKSC@A_b") (source "THEN stoppingPlace_(NthRoadStop maxMove direction NIL 'Room);") ( edited "11-MAR-83 17:13:15") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AJ"))) (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 ("MKSC@A_c") (source " -> direction_(DirectionOf destination);") (edited "11-MAR-83 17:13:31") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("MKSC@A_|") (source " THEN .FindStoppingPlace (_ gameMaster Move stoppingPlace) realLocation_truck:location;") (edited "11-MAR-83 17:13:31") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("MKSC@A`=") (source " IF realLocation~=stoppingPlace THEN (WriteGameStatus NIL %"I've been intercepted!%");") (edited "11-MAR-83 17:13:31") (editor STEFIK ) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("MKSC@A`>") (source " IF (ISA realLocation $GasStation) THEN .BuyGas;") (edited "11-MAR-83 17:13:31") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("MKSC@A`?") (source " IF (ISA realLocation $Producer) (SUBCLASS realLocation::Commodity $LuxuryGoods) goal='Buy THEN .BuyGoods;") (edited "11-MAR-83 17:13:31") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("MKSC@A`@") (source " IF (ISA realLocation $Consumer) truck:cargo goal='Sell THEN .SellGoods;") (edited "11-MAR-83 17:13:31") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AK"))) (DEFINST Rule ("FPSC@$MC") (source " IF (ISA realLocation $Consumer) goal='Sell THEN .SellGoods;") (edited "16-FEB-83 14:29:04") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("MKSC@A_d") (source "(* Abort sale if cargo has disappeared.) IF ~truck:cargo THEN destination_NIL (WriteGameStatus %"Yipes! My cargo is gone!%") (STOP NIL 'NoSale 'NoCargo);") (edited "11-MAR-83 17:13:51") (editor STEFIK) (ruleNumber) (ruleSet #& (RuleSet "FQSC@$AL"))) (DEFINST Rule ("MKSC@A`A") (source " -> cargo_(CAR truck:cargo);") (edited "11-MAR-83 17:13:51" ) (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AL"))) (DEFINST Rule ("MKSC@A`B") (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 "11-MAR-83 17:13:51") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AL"))) (DEFINST Rule ("MKSC@A_e") (source "(* Find another buyer if all not sold.) IF cargo_(CAR truck:cargo) cargo:qty>0 THEN destination_(NearestRoadStop (Buyers cargo)) direction_(DirectionOf destination) (STOP NIL 'NoSale 'CantSell);") (edited "11-MAR-83 17:13:51") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FQSC@$AL"))) (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))))) (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 ("YWSC@8?r") (source " (* Top Level RuleSet. Sets goal and destination.) IF ~goal ~destination THEN goal_'Buy;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8?s") (source " (* Fix up destination in case it sold out.) IF goal='Buy THEN destination_(NearestRoadStop (Sellers $LuxuryGoods ));") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8?t") (source " (* Initialization for beginning of game or restarting from Union Hall.) IF (OR ~destination (ISA truck:location $UnionHall)) THEN destination_(NearestRoadStop (Sellers $LuxuryGoods)) goal_'Buy;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8?u") (source " (* Just get close if Luxury goods are running low.) IF ~destination ~(Sellers $LuxuryGoods) goal='Buy THEN goal_'GetClose alice_ (NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ alice:prev;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8?v") (source " (* Get near to Alices when time gets close) IF gameMaster:timeRemaining < 50 goal~='SitTight goal~='GoToAlices THEN alice_ (NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ alice:prev goal_'GetClose;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&( RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8?w") (source " (* Go right to Alice's now that it is time) IF gameMaster:timeRemaining < 20 ~(ISA truck:location $AlicesRestaurant) THEN destination_ (NearestRoadStop (RoadStops $AlicesRestaurant)) goal_'GoToAlices ;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST Rule ("YWSC@8@\") (source " -> .GoToStoppingPlace;") (edited "23-MAY-83 10:53:27") (editor MITTAL) (ruleNumber) (ruleSet #&(RuleSet "FQSC@$AM"))) (DEFINST RuleSet (BuyGoodsToyotaRules "FAS@@&Lh") (perspectiveNode #&(RuleSetNode "FAS@@&Mg") myViewName RuleSet) (name #(BuyGoodsToyotaRules NIL RememberName)) (compiledRules BuyGoodsToyotaRules) (workSpace Toyota) (arguments) (tempVars (commodity volumeCapacity weightCapacity volumeLimit weightLimit cashLimit producerLimit numBuy)) (taskVars NIL) (debugVars NIL) (numRules 4) ( controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (FindStoppingPlaceToyotaRules "FAS@@&Li") (perspectiveNode #&(RuleSetNode "FAS@@&Mh") myViewName RuleSet) (name #(FindStoppingPlaceToyotaRules NIL RememberName)) (compiledRules FindStoppingPlaceToyotaRules) (workSpace Toyota) (arguments) (tempVars (wStation gasStation)) ( taskVars NIL) (debugVars NIL) (numRules 6) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (GoToStoppingPlaceToyotaRules "FAS@@&Lq") (perspectiveNode #&(RuleSetNode "FAS@@&Mi") myViewName RuleSet) (name #(GoToStoppingPlaceToyotaRules NIL RememberName)) (compiledRules GoToStoppingPlaceToyotaRules) (workSpace Toyota) (arguments) (tempVars (stoppingPlace realLocation)) ( taskVars NIL) (debugVars NIL) (numRules 6) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSet (SellGoodsToyotaRules "FAS@@&Lr") (perspectiveNode #&(RuleSetNode "FAS@@&Mj") myViewName RuleSet) (name #(SellGoodsToyotaRules NIL RememberName)) (compiledRules SellGoodsToyotaRules) (workSpace Toyota) (arguments) (tempVars (cargo sellQty)) (taskVars NIL) ( debugVars NIL) (numRules 4) (controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL)) (DEFINST RuleSetNode ("FAS@@&Mg") (perspectives ? RuleSet #&(RuleSet "FAS@@&Lh") Source #&( RuleSetSource "FAS@@&Mm"))) (DEFINST RuleSetNode ("FAS@@&Mh") (perspectives ? RuleSet #&(RuleSet "FAS@@&Li") Source #&( RuleSetSource "FAS@@&Mn"))) (DEFINST RuleSetNode ("FAS@@&Mi") (perspectives ? RuleSet #&(RuleSet "FAS@@&Lq") Source #&( RuleSetSource "FAS@@&Mo"))) (DEFINST RuleSetNode ("FAS@@&Mj") (perspectives ? RuleSet #&(RuleSet "FAS@@&Lr") Source #&( RuleSetSource "FAS@@&Mp"))) (DEFINST RuleSetSource ("FAS@@&Mm") (indexedVars ((#&(Rule "FPSC@$Ls")) (#&(Rule "FPSC@$Lt")) (#&(Rule "FPSC@$Lu")) (#&(Rule "FPSC@$Lv")) (#&(Rule "FBS@@A?V")))) (perspectiveNode #&(RuleSetNode "FAS@@&Mg" ) myViewName Source) (created " 1-FEB-83 14:25:11") (creator LOOPSCOURSE) (edited "16-FEB-83 14:59:42" ) (editor STEFIK)) (DEFINST RuleSetSource ("FAS@@&Mn") (indexedVars ((#&(Rule "FPSC@$Lw")) (#&(Rule "FPSC@$Lx")) (#&(Rule "FPSC@$Ly")) (#&(Rule "FPSC@$Lz")) (#&(Rule "FPSC@$L{")) (#&(Rule "FPSC@$L|")) (#&(Rule "FAS@@&Lp"))) ) (perspectiveNode #&(RuleSetNode "FAS@@&Mh") myViewName Source) (created " 1-FEB-83 14:25:23") ( creator LOOPSCOURSE) (edited "16-FEB-83 14:44:17") (editor STEFIK)) (DEFINST RuleSetSource ("FAS@@&Mo") (indexedVars ((#&(Rule "FPSC@$M=")) (#&(Rule "FPSC@$M>")) (#&(Rule "FPSC@$M?")) (#&(Rule "FPSC@$M@")) (#&(Rule "FPSC@$MA")) (#&(Rule "FPSC@$MB")) (#&(Rule "FPSC@$MC"))) ) (perspectiveNode #&(RuleSetNode "FAS@@&Mi") myViewName Source) (created " 1-FEB-83 14:25:34") ( creator LOOPSCOURSE) (edited "16-FEB-83 14:32:45") (editor STEFIK)) (DEFINST RuleSetSource ("FAS@@&Mp") (indexedVars ((#&(Rule "FPSC@$MD")) (#&(Rule "FPSC@$ME")) (#&(Rule "FPSC@$MF")) (#&(Rule "FPSC@$MG")) (#&(Rule "FBS@@A?`")) (#&(Rule "FBS@@A?a")) (#&(Rule "FBS@@A?b")) (#&(Rule "FBS@@A?c")))) (perspectiveNode #&(RuleSetNode "FAS@@&Mj") myViewName Source) (created " 1-FEB-83 14:25:40") (creator LOOPSCOURSE) (edited "16-FEB-83 14:26:24") (editor STEFIK)) (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@$Lw") (source "(* Returns a stopping place en route to a destination.) IF truck:fuel=0 THEN (AnyRoadStop $UnionHall);") (edited "16-FEB-83 14:44:17") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Li"))) (DEFINST Rule ("FPSC@$Lx") (source "(* Dont run out if gas.) IF truck:fuel < .25 * truck::MaxFuel truck:cashBox>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@$M=") (source " -> direction_(DirectionOf destination);") (edited "16-FEB-83 14:32:45") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("FPSC@$M>") (source " THEN stoppingPlace_.FindStoppingPlace (_ gameMaster Move stoppingPlace) realLocation_truck:location;") (edited "16-FEB-83 14:32:45") (editor STEFIK) (ruleNumber) ( ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("FPSC@$M?") (source " IF realLocation~=stoppingPlace THEN (WriteGameStatus NIL %"I've been intercepted!%");") (edited "16-FEB-83 14:32:45") (editor STEFIK ) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("FPSC@$M@") (source " IF (ISA realLocation $GasStation) THEN .BuyGas;") (edited "16-FEB-83 14:32:45") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("FPSC@$MA") (source " IF (ISA realLocation $Producer) (ISA realLocation::Commodity 'LuxuryGoods) goal='Buy THEN .BuyGoods;") (edited "16-FEB-83 14:32:45") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (DEFINST Rule ("FPSC@$MB") (source " IF (ISA realLocation $Consumer) goal='Sell THEN .SellGoods;") (edited "16-FEB-83 14:32:45") (editor STEFIK) (ruleNumber) (ruleSet #&(RuleSet "FAS@@&Lq"))) (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"))) (DEFCLASSES HighRoller) (DEFCLASS HighRoller (MetaClass PlayerMeta doc (* * HighRoller is a player who specializes in LuxuryGoods. It has a simple endgame strategy which usually works. This is a slightly modified version of the winner of the knowledge competition in the first Loops course in January 1983 (Toyota by Dick Lyon)) Edited: (* mjs: "18-FEB-83 19:54")) (Supers Traveler) (ClassVariables) (InstanceVariables ( destination NIL doc (* Current destination.)) (direction NIL doc (* Forward or Backward direction of travel on the highway.)) (sitCount 0 doc (* Number of turns sitting at Alices Restaurant during an EndGame.)) (goal NIL doc (* Buy, Sell, SitTight, or GoToAlices.))) (Methods (BuyGoods HighRoller.BuyGoods doc (* * RuleSet BuyGoodsHighRollerRules is installed as the selector BuyGoods of the class HighRoller) RuleSet BuyGoodsHighRollerRules) (FindStoppingPlace HighRoller.FindStoppingPlace doc (* * RuleSet FindStoppingPlaceHighRollerRules is installed as the selector FindStoppingPlace of the class HighRoller) RuleSet FindStoppingPlaceHighRollerRules) (GoToStoppingPlace HighRoller.GoToStoppingPlace doc (* * RuleSet GoToStoppingPlaceHighRollerRules is installed as the selector GoToStoppingPlace of the class HighRoller) RuleSet GoToStoppingPlaceHighRollerRules) ( SellGoods HighRoller.SellGoods doc (* * RuleSet SellGoodsHighRollerRules is installed as the selector SellGoods of the class HighRoller) RuleSet SellGoodsHighRollerRules) (TakeTurn HighRoller.TakeTurn doc (* * RuleSet TakeTurnHighRollerRules is installed as the selector TakeTurn of the class HighRoller) RuleSet TakeTurnHighRollerRules))) NIL