(FILECREATED "15-JUL-83 15:53:47" ("compiled on " {IVY}OUSTERHOUT>BADAPPLES.;15) "28-JUN-83 18:54:59" recompiled exprs: BESort BadApples.EvalBoard BadApples.FindBandits BadApples.Get BadApples.Sort BuyGasBadApplesRules FindStoppingPlaceBadApplesRules GetConsumerBadApples GetHintBadApples GoToStoppingPlaceBadApplesRules SellGoodsBadApplesRules TakeTurnBadApplesRules in LOOPSDEMO.SYSOUT dated "15-JUL-83 01:59:55") (FILECREATED "15-JUL-83 15:49:24" {IVY}OUSTERHOUT>BADAPPLES.;15 45291 changes to: (FNS BuyGasBadApplesRules FindStoppingPlaceBadApplesRules GetHintBadApples GoToStoppingPlaceBadApplesRules SellGoodsBadApplesRules TakeTurnBadApplesRules) previous date: "15-JUL-83 13:15:45" {IVY}OUSTERHOUT>BADAPPLES.;13) BESort D1 (L (1 b 0 a)) @ANIL NIL NIL BadApples.EvalBoard D1 (P 16Q c P 12Q p P 6 maxDist P 5 cap P 4 maxVol P 3 maxWt P 2 profit P 1 distance P 0 pairs I 1 ourTruck I 0 self F 17Q turns) #pAg [Ag \Ag ^0 g d 0 Og N dLOg g KOg g Og OO Og g MOg Og ֺINlIllcJWZn' OOJhh_OMO__hO_O(O__6OXdg Xddl  _O _O(432Q LAST 420Q LAST 414Q LDIFF 411Q NTH 401Q SORT 230Q GetValue 220Q GetValue 207Q GetClassValue 201Q GetClassValue 170Q Distance 160Q MIN 155Q GetValue 144Q GetClassValue 136Q GetClassValue 124Q GetClassValue 116Q GetClassValue 75Q Buyers 71Q GetClassValue 46Q RoadStops 43Q GetObjectRec 31Q GetClassValue 21Q GetClassValue 11Q GetClassValue) (376Q BESort 225Q pr 215Q pr 204Q AvgPrice 176Q Commodity 152Q qty 141Q WtPerQty 133Q Commodity 121Q VolPerQty 113Q Commodity 66Q Commodity 40Q Producer 26Q MaxDist 16Q MaxVolume 6 MaxWeight) NIL BadApples.FindBandits D1 (P 5 X I 0 self) 2P&dM\g LkKdIHhZH&J(24Q FetchMethodOrHelp 5 RoadStops) (21Q BanditP) NIL BadApples.Get D1 (L (0 self)) @NIL NIL NIL BadApples.Sort D1 (L (0 self)) @NIL NIL NIL BuyGasBadApplesRules D1 (P 4 qty P 3 fuelAvailable P 2 fuelAffordable P 1 spaceInTank P 0 ^value I 0 self F 7 PlayerInterface) up@g g @g g չ@g g g @g g @g g ׺IJK \kLW^g N@LlMH(147Q FetchMethodOrHelp 127Q MIN 117Q PricePerUnit 114Q GetValue 106Q GetValue 77Q GetValue 71Q GetValue 61Q GetValue 53Q GetValue 45Q GetValue 34Q GetValue 26Q GetValue 17Q GetClassValue 11Q GetValue) (144Q Buy 111Q location 103Q truck 74Q cashBox 66Q truck 56Q qty 50Q location 42Q truck 31Q fuel 23Q truck 14Q MaxFuel 6 truck) NIL FindStoppingPlaceBadApplesRules D1 (P 2 gasStation P 1 roughRoad P 0 ^value I 0 self)   @g g j)@g @g g@gg n @g g @g g @g gY@g g @g g o6@g g j%g @\g LkKhg Z@g g B@g g g )g @^g NkM@g g Y=@g @_g _OkO7@g +@g@g  @g @gI g @_g _OkO@g g Z@g@g @g hg g j@gJ (676Q PutValue 662Q GetValue 653Q PutValue 650Q NthRoadStop 641Q GetValue 632Q GetValue 614Q FurthestRoadStop 611Q RoadStops 603Q GetValue 562Q FetchMethodOrHelp 551Q GetObjectRec 542Q PutValue 526Q Distance 523Q GetValue 514Q Distance 510Q PutValue 505Q GetValue 470Q RoomToParkP 465Q GetValue 441Q FetchMethodOrHelp 430Q Distance 425Q GetValue 413Q NearestRoadStop 410Q RoadStops 402Q GetValue 365Q FetchMethodOrHelp 355Q GetObjectRec 345Q ISA 342Q GetObjectRec 333Q GetValue 325Q GetValue 314Q GetValue 306Q GetValue 272Q NearestRoadStop 267Q RoadStops 252Q FetchMethodOrHelp 242Q GetObjectRec 230Q GetValue 222Q GetValue 202Q GetClassValue 174Q GetValue 165Q GetValue 157Q GetValue 142Q GetValue 131Q GetValue 123Q GetValue 112Q GetValue 104Q GetValue 71Q PutValue 66Q AnyRoadStop 63Q GetObjectRec 43Q GetValue 32Q GetValue 17Q GetValue 11Q GetValue) (672Q stoppingPlace 657Q qty 645Q Room 636Q direction 627Q maxMove 623Q stoppingPlace 606Q Room 600Q direction 557Q Range1 546Q GasStation 536Q stoppingPlace 520Q destination 502Q destination 476Q stoppingPlace 462Q destination 436Q Range1 422Q destination 405Q Room 377Q direction 362Q Range1 352Q RoughRoad 337Q FragileCommodity 330Q cargo 322Q truck 311Q cargo 303Q truck 264Q Room 247Q Range1 237Q GasStation 225Q cashBox 217Q truck 177Q MaxFuel 171Q truck 162Q fuel 154Q truck 145Q SitTight 137Q goal 126Q cargo 120Q truck 107Q cashBox 101Q truck 60Q UnionHall 55Q stoppingPlace 46Q Peddle 40Q goal 27Q goal 14Q fuel 6 truck) (206Q .4) GetConsumerBadApples D1 (P 1 cargo P 0 ^value I 0 self) i @g g Y@g@g @g g j@gI @g Ig @gg H(144Q PutValue 141Q NearestRoadStop 136Q RoadStops 133Q GetObjectRec 117Q GetValue 107Q GetValue 77Q PutValue 74Q NearestRoadStop 71Q Buyers 56Q GetValue 50Q GetValue 40Q PutValue 35Q GetValue 17Q GetValue 11Q GetValue) (130Q CityDump 125Q destination 114Q status 104Q consumer 65Q destination 53Q qty 45Q consumer 32Q consumer 26Q destination 14Q cargo 6 truck) NIL GetHintBadApples D1 (P 2 ruleApplied P 1 ^prevValue P 0 ^value I 0 self) PiJbg@g C@g@\g L@g lK @g@g  @g@g  @g hgg Hk@g g &k@g g @g @g 6@g@g  @g@g  @g@g  XHghI(iH!(320Q PutValue 312Q GetValue 276Q PutValue 271Q GetValue 255Q PutValue 251Q GetValue 234Q AnyBanditsP 231Q GetValue 222Q GetValue 210Q GetValue 202Q GetValue 167Q GetValue 161Q GetValue 147Q RuleSetStop 134Q GetValue 124Q PutValue 116Q GetValue 102Q PutValue 75Q GetValue 61Q PutValue 51Q GetValue 40Q FetchMethodOrHelp 22Q GetValue) (326Q NoRuleApplied 307Q hints 303Q consumer 266Q hints 262Q producer 246Q hints 242Q hints 226Q consumer 217Q producer 205Q qty 177Q consumer 164Q qty 156Q producer 144Q GaveUp 141Q NoGoodMove 131Q hints 113Q hints 107Q consumer 72Q hints 66Q producer 46Q truck 35Q EvalBoard 30Q hints 17Q hints 12Q NoRuleApplied) NIL GoToStoppingPlaceBadApplesRules D1 (P 2 numBuy P 1 realLocation P 0 ^value I 0 self F 21Q PlayerInterface) Z @g@g @g g Y@\g LkK]@g @g g F@g ^g NkM0W"_g _O@dg lO@g g YXI@g o@g o Ig @_g _OkO@g gBI@g 7@_g _OIlOZkJW"_g _O@JlOIg 0I@g %@g g @_ g _O kOH(513Q FetchMethodOrHelp 500Q GetValue 472Q GetValue 460Q GetValue 446Q ISA 443Q GetObjectRec 416Q FetchMethodOrHelp 360Q FetchMethodOrHelp 344Q GetValue 326Q GetValue 304Q FetchMethodOrHelp 271Q ISA 266Q GetObjectRec 256Q WriteGameStatus 247Q GetValue 231Q GetValue 216Q GetValue 210Q GetValue 172Q GetValue 155Q FetchMethodOrHelp 133Q FetchMethodOrHelp 124Q GetValue 112Q GetValue 104Q GetValue 75Q GetValue 56Q FetchMethodOrHelp 44Q GetValue 36Q GetValue 26Q PutValue 23Q DirectionOf 20Q GetValue) (510Q SellGoods 475Q cargo 467Q truck 455Q destination 440Q Consumer 413Q Buy 355Q MaxPurchase 341Q producer 331Q Peddle 323Q goal 301Q BuyGas 263Q GasStation 244Q driver 226Q stoppingPlace 213Q location 205Q truck 167Q stoppingPlace 152Q Move 130Q BanditP 121Q stoppingPlace 107Q location 101Q truck 72Q stoppingPlace 53Q FindStoppingPlace 41Q location 33Q truck 15Q destination 11Q direction) (253Q " Didnt reach stoppingPlace" 240Q "Oh!! ") SellGoodsBadApplesRules D1 (P 2 sellQty P 1 cargo P 0 ^value I 0 self F 5 PlayerInterface) xP@g g YX@g g g hgg HIg @g g g Ig ZkJU\g L@IJlK(153Q FetchMethodOrHelp 133Q MIN 130Q GetValue 121Q GetValue 113Q GetValue 105Q GetValue 74Q GetValue 63Q RuleSetStop 50Q ISA 45Q GetClassValue 37Q GetValue 31Q GetValue 17Q GetValue 11Q GetValue) (150Q Sell 125Q qty 116Q qty 110Q location 102Q truck 71Q status 60Q WrongKindOfBuyer 55Q NoSale 42Q Commodity 34Q location 26Q truck 14Q cargo 6 truck) NIL TakeTurnBadApplesRules D1 (P 1 possibleStops P 0 ^value I 0 self F 12Q Simulator)   @g @gg @g g@g g @[g KkJ@g g@g hgg H@g g@g g @]g MkL@g g@g g @g@g @g g9@g g @g g o@gg @g g#@g g @g @gg @g g @g U@_g OkNl@@g g3@gg @g@g @gg ldWg S@g dgdgdgih3@gg @g@g @gg lWg 9@g g g !@gg @gg @g g @g g @g g @g l@_g _OkO(1165Q FetchMethodOrHelp 1145Q Distance 1142Q GetValue 1133Q GetValue 1125Q GetValue 1110Q GetValue 1071Q GetValue 1061Q PutValue 1046Q PutValue 1043Q NearestRoadStop 1040Q RoadStops 1035Q GetObjectRec 1021Q ISA 1016Q GetObjectRec 1010Q GetValue 1002Q GetValue 770Q GetValue 755Q PutValue 742Q PutValue 737Q PickHiObj 734Q RoadStops 720Q PutValue 715Q NearestRoadStop 712Q RoadStops 707Q GetObjectRec 644Q GetValue 632Q GetValue 617Q PutValue 604Q PutValue 601Q PickHiObj 576Q RoadStops 562Q PutValue 557Q NearestRoadStop 554Q RoadStops 551Q GetObjectRec 531Q GetValue 506Q FetchMethodOrHelp 472Q GetValue 463Q GetValue 455Q GetValue 445Q PutValue 431Q GetValue 422Q GetValue 414Q GetValue 377Q GetValue 367Q PutValue 364Q NearestRoadStop 361Q RoadStops 356Q GetObjectRec 333Q GetClassValue 325Q GetValue 316Q GetValue 310Q GetValue 273Q GetValue 263Q PutValue 260Q GetValue 244Q GetValue 236Q GetValue 221Q GetValue 203Q FetchMethodOrHelp 172Q GetValue 164Q GetValue 147Q GetValue 136Q RuleSetStop 123Q GetValue 106Q GetValue 70Q FetchMethodOrHelp 57Q GetValue 51Q GetValue 34Q GetValue 24Q PutValue 11Q GetValue) (1162Q GoToStoppingPlace 1137Q alices 1130Q location 1122Q truck 1113Q GetClose 1105Q goal 1074Q SitTight 1066Q goal 1056Q GoToAlices 1053Q goal 1032Q AlicesRestaurant 1027Q destination 1013Q AlicesRestaurant 1005Q location 777Q truck 765Q timeLeft 752Q GetClose 747Q goal 731Q RateSpotsNearAlices 725Q destination 704Q AlicesRestaurant 701Q alices 664Q GoToAlices 656Q GetClose 650Q SitTight 641Q goal 627Q timeLeft 614Q GetClose 611Q goal 573Q RateSpotsNearAlices 567Q destination 546Q AlicesRestaurant 543Q alices 534Q SitTight 526Q goal 503Q TimeAtStop 467Q alices 460Q location 452Q truck 442Q SitTight 437Q goal 426Q alices 417Q location 411Q truck 402Q GoToAlices 374Q goal 353Q GasStation 350Q destination 330Q MaxFuel 322Q truck 313Q fuel 305Q truck 276Q Peddle 270Q goal 255Q producer 251Q destination 241Q cargo 233Q truck 224Q Peddle 216Q goal 200Q GetConsumer 167Q cargo 161Q truck 152Q Peddle 144Q goal 133Q WeWillWait 130Q NoMove 120Q hints 111Q Peddle 103Q goal 65Q GetHint 54Q cargo 46Q truck 37Q Peddle 31Q goal 21Q Peddle 16Q goal 6 goal) (337Q .7) (PRETTYCOMPRINT BADAPPLESCOMS) (RPAQQ BADAPPLESCOMS ((CLASSES BadApples) (INSTANCES BuyGasBadApplesRules FindStoppingPlaceBadApplesRules GetConsumerBadApples GetHintBadApples GoToStoppingPlaceBadApplesRules SellGoodsBadApplesRules TakeTurnBadApplesRules) (FNS BESort BadApples.EvalBoard BadApples.FindBandits BadApples.Get BadApples.Sort BuyGasBadApplesRules FindStoppingPlaceBadApplesRules GetConsumerBadApples GetHintBadApples GoToStoppingPlaceBadApplesRules SellGoodsBadApplesRules TakeTurnBadApplesRules))) (DEFCLASSES BadApples) (DEFCLASS BadApples (MetaClass PlayerMeta Edited: (* edited: "15-JUL-83 10:54")) (Supers Peddler) ( ClassVariables (CopyCV (Icon InitializeIVs)) (InitializeIVs ?) (Icon ?)) (InstanceVariables (hints NIL doc (* List of producer consumer rating triples, in decreasing order of rating)) (consumer NIL doc (* Current consumer)) (producer NIL doc (* Current producer))) (Methods (BuyGas BuyGasBadApplesRules RuleSet BuyGasBadApplesRules doc (* RuleSet BuyGasTravelerRules is installed as the selector BuyGas of the class Traveler)) (FindBandits BadApples.FindBandits args NIL doc (* Finds all roadstops wibandits, returns list)) (EvalBoard BadApples.EvalBoard args (ourTruck) doc (* Evaluates all producer-consumer pairs on the board, and returns a list of the top few, according to Dave's handy-dandy evaluation function)) (TakeTurn TakeTurnBadApplesRules RuleSet TakeTurnBadApplesRules args NIL doc (* RuleSet TakeTurnPeddlerRules is installed as the selector TakeTurn of the class Peddler)) (GetHint GetHintBadApples RuleSet GetHintBadApples) (GetConsumer GetConsumerBadApples RuleSet GetConsumerBadApples) (GoToStoppingPlace GoToStoppingPlaceBadApplesRules RuleSet GoToStoppingPlaceBadApplesRules doc (* RuleSet GoToStoppingPlacePeddlerRules is installed as the selector GoToStoppingPlace of the class Peddler)) (SellGoods SellGoodsBadApplesRules RuleSet SellGoodsBadApplesRules doc (* RuleSet SellGoodsPeddlerRules is installed as the selector SellGoods of the class Peddler)) (FindStoppingPlace FindStoppingPlaceBadApplesRules RuleSet FindStoppingPlaceBadApplesRules doc (* RuleSet FindStoppingPlacePeddlerRules is installed as the selector FindStoppingPlace of the class Peddler)))) (DEFINST RuleSet (BuyGasBadApplesRules "LNS.0.5349.128.61126.2") (perspectiveNode #&(RuleSetNode "LNS.0.5349.128.61126.3") myViewName RuleSet) (name #(BuyGasBadApplesRules NIL RememberName)) ( compiledRules BuyGasBadApplesRules) (workSpace BadApples) (args NIL) (tempVars (spaceInTank fuelAffordable fuelAvailable qty)) (taskVars NIL) (debugVars NIL) (numRules 2) (controlStructure DOALL ) (whileCondition NIL) (compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) ( taskClass)) (DEFINST RuleSet (FindStoppingPlaceBadApplesRules "LOS.0.5349.128.29386.107") (perspectiveNode #&( RuleSetNode "LOS.0.5349.128.29386.146") myViewName RuleSet) (name #(FindStoppingPlaceBadApplesRules NIL RememberName)) (compiledRules FindStoppingPlaceBadApplesRules) (workSpace BadApples) (args NIL) (tempVars (roughRoad gasStation)) ( taskVars NIL) (debugVars NIL) (numRules 7) (controlStructure DO1) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSet (GetConsumerBadApples "LOS.0.5349.128.29386.67") (perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.147")) (name #(GetConsumerBadApples NIL RememberName)) (compiledRules GetConsumerBadApples) (workSpace BadApples) (args NIL) (tempVars (cargo)) (taskVars NIL) (debugVars NIL) (numRules 4) (controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSet (GetHintBadApples "LNS.0.5349.128.61126.127") (perspectiveNode #&(RuleSetNode "LNS.0.5349.128.61126.168")) (name #(GetHintBadApples NIL RememberName)) (compiledRules GetHintBadApples) (workSpace BadApples) (args NIL) (tempVars NIL) (taskVars NIL) (debugVars NIL) ( numRules 3) (controlStructure WHILEALL) (whileCondition (ruleApplied)) (compilerOptions NIL) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSet (GoToStoppingPlaceBadApplesRules "LOS.0.5349.128.29386.103") (perspectiveNode #&( RuleSetNode "LOS.0.5349.128.29386.148") myViewName RuleSet) (name #(GoToStoppingPlaceBadApplesRules NIL RememberName)) (compiledRules GoToStoppingPlaceBadApplesRules) (workSpace BadApples) (args NIL) (tempVars (realLocation numBuy)) ( taskVars NIL) (debugVars NIL) (numRules 7) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSet (SellGoodsBadApplesRules "LOS.0.5349.128.29386.106") (perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.149") myViewName RuleSet) (name #(SellGoodsBadApplesRules NIL RememberName)) ( compiledRules SellGoodsBadApplesRules) (workSpace BadApples) (args NIL) (tempVars (cargo sellQty)) ( taskVars NIL) (debugVars NIL) (numRules 3) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSet (TakeTurnBadApplesRules "LNS.0.5349.128.61126.119") (perspectiveNode #&(RuleSetNode "LNS.0.5349.128.61126.169") myViewName RuleSet) (name #(TakeTurnBadApplesRules NIL RememberName)) ( compiledRules TakeTurnBadApplesRules) (workSpace BadApples) (args NIL) (tempVars (possibleStops)) ( taskVars NIL) (debugVars NIL) (numRules 11) (controlStructure DOALL) (whileCondition NIL) ( compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)) (DEFINST RuleSetNode ("LNS.0.5349.128.61126.3") (perspectives ? RuleSet #&(RuleSet "LNS.0.5349.128.61126.2") Source #&(RuleSetSource "LNS.0.5349.128.61126.4"))) (DEFINST RuleSetNode ("LOS.0.5349.128.29386.146") (perspectives ? RuleSet #&(RuleSet "LOS.0.5349.128.29386.107") Source #&(RuleSetSource "LOS.0.5349.128.29386.150"))) (DEFINST RuleSetNode ("LOS.0.5349.128.29386.147") (perspectives ? RuleSet #&(RuleSet "LOS.0.5349.128.29386.67") Source #&(RuleSetSource "LOS.0.5349.128.29386.151"))) (DEFINST RuleSetNode ("LNS.0.5349.128.61126.168") (perspectives ? RuleSet #&(RuleSet "LNS.0.5349.128.61126.127") Source #&(RuleSetSource "LNS.0.5349.128.61126.170"))) (DEFINST RuleSetNode ("LOS.0.5349.128.29386.148") (perspectives ? RuleSet #&(RuleSet "LOS.0.5349.128.29386.103") Source #&(RuleSetSource "LOS.0.5349.128.29386.152"))) (DEFINST RuleSetNode ("LOS.0.5349.128.29386.149") (perspectives ? RuleSet #&(RuleSet "LOS.0.5349.128.29386.106") Source #&(RuleSetSource "LOS.0.5349.128.29386.153"))) (DEFINST RuleSetNode ("LNS.0.5349.128.61126.169") (perspectives ? RuleSet #&(RuleSet "LNS.0.5349.128.61126.119") Source #&(RuleSetSource "LNS.0.5349.128.61126.171"))) (DEFINST RuleSetSource ("LNS.0.5349.128.61126.4") (indexedVars ((#&(Rule "LNS.0.5349.128.61126.5")) ( #&(Rule "LNS.0.5349.128.61126.6")))) (perspectiveNode #&(RuleSetNode "LNS.0.5349.128.61126.3") myViewName Source) (created "27-JAN-83 00:31:21") (creator STEFIK) (edited "14-JUL-83 17:02:59") ( editor OUSTERHOUT)) (DEFINST RuleSetSource ("LOS.0.5349.128.29386.150") (indexedVars ((#&(Rule "LOS.0.0.170.55978.2")) (#& (Rule "LOS.0.0.170.55978.3")) (#&(Rule "LOS.0.0.170.55978.4")) (#&(Rule "LOS.0.0.170.55978.5")) (#&( Rule "LOS.0.0.170.55978.6")) (#&(Rule "LOS.0.0.170.55978.7")) (#&(Rule "LOS.0.0.170.55978.8")))) ( perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.146") myViewName Source) (created " 1-FEB-83 14:25:23") (creator LOOPSCOURSE) (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT)) (DEFINST RuleSetSource ("LOS.0.5349.128.29386.151") (indexedVars ((#&(Rule "LOS.0.5349.128.29386.154") ) (#&(Rule "LOS.0.5349.128.29386.155")) (#&(Rule "LOS.0.5349.128.29386.156")) (#&(Rule "LOS.0.5349.128.29386.157")))) (perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.147")) (created "15-JUL-83 09:06:24") (creator LOOPSCOURSE) (edited "15-JUL-83 10:50:28") (editor OUSTERHOUT)) (DEFINST RuleSetSource ("LNS.0.5349.128.61126.170") (indexedVars ((#&(Rule "LOS.0.5349.128.29386.86")) (#&(Rule "LOS.0.5349.128.29386.158")) (#&(Rule "LOS.0.5349.128.29386.87")))) (perspectiveNode #&( RuleSetNode "LNS.0.5349.128.61126.168")) (created "15-JUL-83 00:57:21") (creator LOOPSCOURSE) (edited "15-JUL-83 09:50:28") (editor OUSTERHOUT)) (DEFINST RuleSetSource ("LOS.0.5349.128.29386.152") (indexedVars ((#&(Rule "LOS.0.5349.128.29386.125") ) (#&(Rule "LOS.0.5349.128.29386.159")) (#&(Rule "LOS.0.5349.128.29386.160")) (#&(Rule "LOS.0.5349.128.29386.161")) (#&(Rule "LOS.0.5349.128.29386.162")) (#&(Rule "LOS.0.5349.128.29386.163" )) (#&(Rule "LOS.0.5349.128.29386.164")))) (perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.148") myViewName Source) (created " 1-FEB-83 14:25:34") (creator LOOPSCOURSE) (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT)) (DEFINST RuleSetSource ("LOS.0.5349.128.29386.153") (indexedVars ((#&(Rule "LOS.0.5349.128.29386.165") ) (#&(Rule "LOS.0.5349.128.29386.166")) (#&(Rule "LOS.0.5349.128.29386.167")) (#&(Rule "LESC@8BT")) ( #&(Rule "LESC@8BU")) (#&(Rule "LESC@8BV")) (#&(Rule "FBS@@A?b")) (#&(Rule "FBS@@A?c")))) ( perspectiveNode #&(RuleSetNode "LOS.0.5349.128.29386.149") myViewName Source) (created " 1-FEB-83 14:25:40") (creator LOOPSCOURSE) (edited "15-JUL-83 10:20:13") (editor OUSTERHOUT)) (DEFINST RuleSetSource ("LNS.0.5349.128.61126.171") (indexedVars ((#&(Rule "LOS.0.0.170.43386.19")) ( #&(Rule "LOS.0.0.170.43386.26")) (#&(Rule "LOS.0.0.170.43386.27")) (#&(Rule "LOS.0.0.170.43386.28")) ( #&(Rule "LOS.0.0.170.43386.20")) (#&(Rule "LOS.0.0.170.43386.21")) (#&(Rule "LOS.0.0.170.43386.22")) ( #&(Rule "LOS.0.0.170.43386.23")) (#&(Rule "LOS.0.0.170.43386.24")) (#&(Rule "LOS.0.0.170.43386.25")) ( #&(Rule "LOS.0.0.170.43386.29")))) (perspectiveNode #&(RuleSetNode "LNS.0.5349.128.61126.169") myViewName Source) (created " 1-FEB-83 14:25:51") (creator LOOPSCOURSE) (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT)) (DEFINST Rule ("LNS.0.5349.128.61126.5") (source "(* Buy gasoline as limited by various constraints.) THEN spaceInTank_truck::MaxFuel-truck:fuel fuelAvailable_truck:location:qty fuelAffordable_truck:cashBox/(PricePerUnit truck:location) qty_(MIN spaceInTank fuelAffordable fuelAvailable);") (edited "14-JUL-83 17:02:59") (editor OUSTERHOUT) (ruleNumber 1) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.2"))) (DEFINST Rule ("LNS.0.5349.128.61126.6") (source "(* Now appropriate quantity has been computed) IF qty>=1 THEN (_ \PlayerInterface Buy self qty );") (edited "14-JUL-83 17:02:59") (editor OUSTERHOUT) ( ruleNumber 2) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.2"))) (DEFINST Rule ("LOS.0.0.170.55978.2") (source "(* Returns a stopping place en route to a destination.) IF truck:fuel=0 goal goal='Peddle THEN stoppingPlace_(AnyRoadStop $UnionHall);") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) ( ruleNumber 1) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.3") (source "IF truck:cashBox < 3000 ~truck:cargo THEN stoppingPlace_(AnyRoadStop $UnionHall);") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) ( ruleNumber 2) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.4") (source "(* Dont run out of gas.) IF goal~='SitTight truck:fuel < .4 * truck::MaxFuel truck:cashBox>0 gasStation_(NearestRoadStop (RoadStops $GasStation .Range1 NIL 'Room)) THEN stoppingPlace_gasStation;") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) (ruleNumber 3) ( ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.5") (source "(* Obey the law - stop at rough road for fragile goods.) IF truck:cargo (ISA (CAR truck:cargo) $FragileCommodity) roughRoad_(NearestRoadStop (RoadStops $RoughRoad .Range1 direction 'Room)) (Distance roughRoad)<(Distance destination) THEN stoppingPlace_roughRoad;") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) (ruleNumber 4) ( ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.6") (source "IF (Distance destination)<=.Range1 (RoomToParkP destination) THEN stoppingPlace_destination;") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) (ruleNumber 5) ( ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.7") (source "IF gasStation_(FurthestRoadStop (RoadStops $GasStation .Range1 direction 'Room)) gasStation:qty>0 THEN stoppingPlace_gasStation;") (edited "15-JUL-83 15:48:28") (editor OUSTERHOUT) (ruleNumber 6) ( ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.0.170.55978.8") (source "THEN stoppingPlace_(NthRoadStop maxMove direction NIL 'Room);") (edited "15-JUL-83 15:48:28") ( editor OUSTERHOUT) (ruleNumber 7) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.107"))) (DEFINST Rule ("LOS.0.5349.128.29386.154") (source "THEN cargo _ (CAR truck:cargo);") (edited "15-JUL-83 10:50:28") (editor OUSTERHOUT) (ruleNumber 1) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.67" ))) (DEFINST Rule ("LOS.0.5349.128.29386.155") (source "THEN destination _ consumer;") (edited "15-JUL-83 10:50:28") (editor OUSTERHOUT) (ruleNumber 2) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.67" ))) (DEFINST Rule ("LOS.0.5349.128.29386.156") (source "(* If our initial consumer couldn't buy, then choose any other) IF consumer:qty=0 THEN destination _ (NearestRoadStop (Buyers cargo));") (edited "15-JUL-83 10:50:28") (editor OUSTERHOUT) (ruleNumber 3) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.67"))) (DEFINST Rule ("LOS.0.5349.128.29386.157") (source "(* If we've got garbage or no consumer, then go to the City Dump) IF (OR ~consumer ~cargo:status) THEN destination _ (NearestRoadStop (RoadStops $CityDump));") (edited "15-JUL-83 10:50:28") ( editor OUSTERHOUT) (ruleNumber 4) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.67"))) (DEFINST Rule ("LOS.0.5349.128.29386.86") (source "IF ~hints THEN hints _ (_ self EvalBoard truck) producer _ (CAAR hints) consumer _ (CADAR hints);") (edited "15-JUL-83 09:50:28") (editor OUSTERHOUT) (ruleNumber 1) ( ruleSet #&(RuleSet "LNS.0.5349.128.61126.127"))) (DEFINST Rule ("LOS.0.5349.128.29386.158") (source "IF ~hints THEN (STOP NIL 'NoGoodMove 'GaveUp);") ( edited "15-JUL-83 09:50:28") (editor OUSTERHOUT) (ruleNumber 2) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.127"))) (DEFINST Rule ("LOS.0.5349.128.29386.87") (source "IF (OR producer:qty<1 consumer:qty<1 (AnyBanditsP producer consumer)) THEN hints _ (CDR hints) producer _ (CAAR hints) consumer _ (CADAR hints);") (edited "15-JUL-83 09:50:28") (editor OUSTERHOUT) (ruleNumber 3) ( ruleSet #&(RuleSet "LNS.0.5349.128.61126.127"))) (DEFINST Rule ("LOS.0.5349.128.29386.125") (source " -> direction_(DirectionOf destination);") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) (ruleNumber 1) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.159") (source " -> realLocation_truck:location;") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) (ruleNumber 2) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.160") (source " IF .FindStoppingPlace stoppingPlace~=truck:location ~stoppingPlace.BanditP THEN (_ \PlayerInterface Move self stoppingPlace) realLocation_truck:location;") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) ( ruleNumber 3) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.161") (source " IF realLocation~=stoppingPlace THEN (WriteGameStatus %"Oh!! %" driver %" Didnt reach stoppingPlace%");") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) (ruleNumber 4) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.162") (source " IF (ISA realLocation $GasStation) THEN .BuyGas;") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) (ruleNumber 5) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.163") (source " IF goal='Peddle realLocation=producer numBuy_(_ self MaxPurchase realLocation) numBuy>=1 THEN (_ \PlayerInterface Buy self numBuy);") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) ( ruleNumber 6) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.164") (source " IF (ISA realLocation $Consumer) realLocation=destination truck:cargo THEN .SellGoods;") (edited "15-JUL-83 10:35:22") (editor OUSTERHOUT) (ruleNumber 7) (ruleSet #&( RuleSet "LOS.0.5349.128.29386.103"))) (DEFINST Rule ("LOS.0.5349.128.29386.165") (source " -> cargo_(CAR truck:cargo);") (edited "15-JUL-83 10:20:13") (editor OUSTERHOUT) (ruleNumber 1) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.106"))) (DEFINST Rule ("LOS.0.5349.128.29386.166") (source " IF ~(ISA cargo truck:location::Commodity) THEN (STOP NIL 'NoSale 'WrongKindOfBuyer);") (edited "15-JUL-83 10:20:13") (editor OUSTERHOUT) ( ruleNumber 2) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.106"))) (DEFINST Rule ("LOS.0.5349.128.29386.167") (source " IF cargo:status sellQty_(MIN truck:location:qty cargo:qty) sellQty>=1 THEN (_ \PlayerInterface Sell self cargo sellQty);") (edited "15-JUL-83 10:20:13") (editor OUSTERHOUT ) (ruleNumber 3) (ruleSet #&(RuleSet "LOS.0.5349.128.29386.106"))) (DEFINST Rule ("LESC@8BT") (source " IF truck:location:pr < 0 THEN (STOP NIL 'NoSale 'NeverSellAtLoss);") (edited " 5-JUL-83 11:57:52") (editor MITTAL) (ruleNumber 4) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LESC@8BU") (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 " 5-JUL-83 11:57:52") (editor MITTAL) (ruleNumber 5) ( ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LESC@8BV") (source " IF cargo:status sellQty_(MIN truck:location:qty cargo:qty) sellQty>=1 THEN (_ \PlayerInterface Sell self cargo sellQty);") (edited " 5-JUL-83 11:57:52") (editor MITTAL) ( ruleNumber 6) (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 ("LOS.0.0.170.43386.19") (source " (* Top-Level RuleSet for taking turns. Sets goal and destination.) IF ~goal THEN goal_'Peddle;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 1) (ruleSet #&( RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.26") (source " IF goal='Peddle ~truck:cargo THEN .GetHint;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 2) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.27") (source " IF goal='Peddle ~hints THEN (STOP NIL 'NoMove 'WeWillWait);") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) ( ruleNumber 3) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.28") (source " IF goal='Peddle truck:cargo THEN .GetConsumer;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 4) (ruleSet #&( RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.20") (source " IF goal='Peddle ~truck:cargo THEN destination_producer;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 5) ( ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.21") (source " IF goal='Peddle truck:fuel< .7*truck::MaxFuel THEN destination_(NearestRoadStop (RoadStops $GasStation));") (edited "15-JUL-83 13:14:39") ( editor OUSTERHOUT) (ruleNumber 6) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.22") (source "(* Don't move away from Alices during endgame.) IF goal='GoToAlices truck:location=alices THEN goal_'SitTight;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 7) (ruleSet #&( RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.23") (source "(* Except dont overstay at Alices.) IF truck:location=alices .TimeAtStop > 25 goal='SitTight THEN alices_(NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ (PickHiObj self 'RateSpotsNearAlices (RoadStops)) goal_'GetClose;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 8) (ruleSet #&( RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.24") (source "(* Get near to Alices when time gets close) IF \Simulator:timeLeft < 100 ~[goal<<'(SitTight GetClose GoToAlices)] THEN alices_(NearestRoadStop (RoadStops $AlicesRestaurant)) destination_ (PickHiObj self 'RateSpotsNearAlices (RoadStops)) goal_'GetClose;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 9) (ruleSet #&( RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.25") (source "(* Go to Alices now that it is time) IF \Simulator:timeLeft < 30 ~(ISA truck:location $AlicesRestaurant) THEN destination_ (NearestRoadStop (RoadStops $AlicesRestaurant)) goal_'GoToAlices ;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 10) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (DEFINST Rule ("LOS.0.0.170.43386.29") (source "IF ~(OR goal='SitTight (AND goal='GetClose (Distance truck:location alices)<=3)) THEN .GoToStoppingPlace;") (edited "15-JUL-83 13:14:39") (editor OUSTERHOUT) (ruleNumber 11) (ruleSet #&(RuleSet "LNS.0.5349.128.61126.119"))) (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 NIL) ( auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSet (SellGoodsToyotaRules "FAS@@&Lr") (perspectiveNode #&(RuleSetNode "FAS@@&Mj") myViewName RuleSet) (name #(SellGoodsToyotaRules NIL RememberName)) (compiledRules SellGoodsToyotaRules) (workSpace Toyota) (args) (tempVars (cargo sellQty)) (taskVars NIL) (debugVars NIL) (numRules 4) (controlStructure DOALL) (whileCondition NIL) (compilerOptions NIL) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass) (arguments)) (DEFINST RuleSetNode ("FRSC@$PH") (perspectives ? RuleSet #&(RuleSet "FRSC@$PC") Source #&( RuleSetSource "FRSC@$PM"))) (DEFINST RuleSetNode ("FAS@@&Mj") (perspectives ? RuleSet #&(RuleSet "FAS@@&Lr") Source #&( RuleSetSource "FAS@@&Mp"))) (DEFINST RuleSetSource ("FRSC@$PM") (indexedVars ((#&(Rule "LESC@8BQ")) (#&(Rule "LESC@8BR")) (#&(Rule "LESC@8BS")) (#&(Rule "LESC@8BT")) (#&(Rule "LESC@8BU")) (#&(Rule "LESC@8BV")) (#&(Rule "FBS@@A?b")) (#&(Rule "FBS@@A?c")))) (perspectiveNode #&(RuleSetNode "FRSC@$PH") myViewName Source) (created " 1-FEB-83 14:25:40") (creator LOOPSCOURSE) (edited " 5-JUL-83 11:57:52") (editor MITTAL)) (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 ("LESC@8BQ") (source " -> cargo_(CAR truck:cargo);") (edited " 5-JUL-83 11:57:52") ( editor MITTAL) (ruleNumber 1) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LESC@8BR") (source " IF ~(ISA cargo truck:location::Commodity) THEN (STOP NIL 'NoSale 'WrongKindOfBuyer);") (edited " 5-JUL-83 11:57:52") (editor MITTAL) ( ruleNumber 2) (ruleSet #&(RuleSet "FRSC@$PC"))) (DEFINST Rule ("LESC@8BS") (source " IF truck:location:pr < 1.1 goal='Peddle THEN (STOP NIL 'NoSale 'AvoidCheapSkates);") (edited " 5-JUL-83 11:57:52") (editor MITTAL) ( ruleNumber 3) (ruleSet #&(RuleSet "FRSC@$PC"))) (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))))) NIL