Kroah's Game Reverse Engineering Page

 

~ M.U.L.E. ~

You are here:  
  • Home
    • »  M.U.L.E.
      • »  Reverse Engineering

Menu

Reverse Engineering

Computing mode
Glossary (avec min maj pour lexique ? Land Auction ou land auction ?)
Selling land

+ Credits
+ Easter eggs / Unknown
+ Cheats

corriger accords: lands auctions -> land auction (voire land auctions car sinon pas de pluriel visibles o_O (good ratings) + accor dverbe pluriel)
ordre des chapitres pour expliquer:
C (utilisé par B)
B (utilisé par A)
A

ou
A
B
C
- finir les liens + back links:
A->B (classique)
B utilisé par A
  1. Table of contents






  2. Introduction

    1. MULE version

      The MULE version, used as a basis for this document, is a dump of the game for Atari 800 system in ATR format whose checksum is F76D2896.

    2. Time unit

      1. Base Time Unit (BTU)

        1 jiffy is the time elapsed between two VBL (Vertical Blank Line). The event processor of MULE is called each 4 jiffy. This is the Base Time Unit (BTU). According to the system in which the game runs (PAL or NTSC), a jiffy hasn't the same duration because there isn't the same amount of VBL each second and so the time between 2 VBL is different.

        The duration of 1 BTU for each system is:

        SystemFrequency1 jiffy1 BTU (= 4 jiffy)
        PAL50 Hz1/50s1/12.5s = 0.08s
        NTSC60 Hz1/60s1/15s = 0.067s

        That means that a PAL game runs more slowly than a NTSC game (if the game uses the VBL to synchronize motion).

        In this whole document, the reference system is NTSC. The following value will thus be used:

        1 BTU = 1/15s = 0.067s

        The BTU is used in the game for:

      2. Player Time Unit (PTU)

        The Player Time Unit (PTU) determines the rate of the time flow during the humans players turn. 1 pixel of the bar time lasts 1 PTU. It thus decreases of 1 pixel each PTU. The smaller the PTU is, the faster the time decreases.

        Initialy, the value of a PTU is equal to 7 BTU and modified by the following conditions:

        1 PTU = 7 BTU + modifiers

        The race modifiers are:

        RaceModifier
        Flapper+2 BTU
        Human-2 BTU
        OthersNone

        The level modifiers are:

        LevelModifier
        Beginner+2 BTU
        StandardNone
        TournamentNone

        Some examples of PTU for race and level choice:

        DescriptionPTU (in BTU)PTU (in second)
        Beginner with Flapper11 BTU0.73s
        Standard or Tournament with Flapper9 BTU0.6s
        Standard or Tournament with any race but Flapper or Human7 BTU0.47s
        Standard or Tournament with Human5 BTU0.33s

        In the whole document, a default value of 1 PTU = 7 BTU = 7/15s = 0.47s is used when no value for the PTU is specified. This gives an indicative information in seconds for the examples.

        The PTU is used in the game for:

      3. Auction Time Unit (ATU)

        Similarly to the PTU, the Auction Time Unit (ATU) determines the rate of time flow during the auctions. 1 pixel of the bar time lasts 1 ATU. It thus decreases of 1 pixel each ATU. The smaller the ATU is, the faster the time decreases.

        The value of the ATU is based on the BTU and only dependent of the level:

        LevelATU (in BTU)ATU (in second)ATU/4 (in second)
        Beginner (*)50 BTU3.33s0.83s
        Standard30 BTU2s0.5s
        Tournament25 BTU1.67s0.42s

        (*) At Beginner level, the value of the ATU is doubled for first round (100 BTU).

        When no player moves, the value of the ATU is temporarily divided by 4, until a player moves again.

      4. Cursor Time Unit (CTU)

        Similarly to the PTU, the Cursor Time Unit (CTU) determines the rate of time flow during the land grant. The cursor moves to the next land at each CTU. The smaller the CTU is, the faster the cursor moves.

        The value of the CTU is based on the BTU and only dependent of the level:

        LevelCTU (in BTU)CTU (in second)
        Beginner8 BTU0.53s
        Standard4 BTU0.27s
        Tournament3 BTU0.2s
    3. Computing mode

      Type de calculSignificationPhase
      A: réelOn ne simule rien. On possède la parcelle et l'exploitation.Production, Price
      B: simuléOn possède la parcelle et on y simule la présence de l'exploitation donnée.Player Turn
      C: simuléOn ne possède pas la parcelle. On simule la présence de la parcelle et de l'exploitation.Grant Land
      Land Auction
    4. Glossary

      Shortage, requirement, critical level, surplus...
      • Map
      • Plot (terre) une des 45 cases (dont store, river, ...)
      • Land (parcelle)
      • Exploitation
      • River
      • Turn
      • Round
      • Player (joueur humain)
      • Player (joueur ordinateur) WIP
      • Human
      • Store
      • Capacité de production d'une exp (avec ecos)
      • Production de base d'une terre
  3. Game setting

    1. Number of rounds

      The number of rounds at each level is:

      Beginner6
      Standard12
      Tournament12

      Before the first round starts (at the first status summary when the ship lands), the round number is #0. It's incremented at the beginning of the round.

    2. Map generation

      The map is divided in 5 rows of 9 columns. There's 44 lands (30 plains, 10 with at least 1 moutain, 4 rivers) and 1 Store in the middle. The location of the mountains and the Crystite deposits are randomly chosen (see algorithms Mountains setup andCrystite deposits setup).

      1. Mountains setup

        This algorithm divides each row in 4 quarter (4 small rows). The map having 5 rows, there's a total of 20 quarters.

        The picture bellow shows this division:

        Map division

        The following rules are always applied for the mountains distribution:

        • each row has 2 groups of mountains, each on a river side
        • each row has exactly 4 mountains (one in each quarter).
        • each group has at least 1 mountain, at the most 3 mountains

        The distribution of the mountains on each row is as follows:

        • 2 lands are randomly chosen on the row, one on the left side, the other on the right side of the river. The 2 groups of moutains are located on these 2 lands.
        • On each quarter of the row, a mountain is randomly put either on the left or on the right group. If a mountain is added to a group already having 3 mountains, it's moved to the other group on the same quarter of the row.
      2. Crystite deposits setup

        mettre ., L, M, H, V ?

        4 Crystite deposits of quality 3 (High) are randomly put on 4 lands among the 44 lands and the Store. A deposit can thus be located on a plain, a moutain, a river or the Store.

        Each deposit (in black) is then expanded like a star shape:

        . . L . .
        . L M L .
        L M H M L
        . L M L .
        . . L . .
        

        If a deposit expansion overlaps another one, the highest qualities are kept:

        . . L . . .
        . L M L L .
        L M H M M L
        . L M M H M L .
        . . L L M L . .
        . . . . L . . .
        

        A Crystite deposit of quality 4 (Very high) appears only after a meteorite strike (and no expansion is done).

      3. Number of maps

        The Crystite is ignored in these enumerations.

        To compute the number of distinct maps, without taking into account the configurations of a land which are visually different but having the same production (for example one mountain at each quarter give the same production), the configurations are enumerated for 1 row:

        • with 1 mountain on the left, 3 mountains on the right: 16 configurations
        • with 2 mountains on the left, 2 mountains on the right: 16 configurations
        • with 3 mountains on the left, 1 mountain on the right: 16 configurations

        That's 16+16+16=48 configurations for 1 row and a total of 48^5 = 254 803 968 configurations for the 5 rows of the map (each configuration hasn't the same probability to occur).

        The number of distinct maps, taking into account the configurations of a land which are visually different but giving the same production, are:

        • with 1 mountain on the left, 3 mountains on the right: 64 configurations
        • with 2 mountains on the left, 2 mountains on the right: 96 configurations
        • with 3 mountains on the left, 1 mountain on the right: 64 configurations

        That's 64+96+64=224 configurations for 1 row and a total of 224^5 = 563 949 338 624 configurations for the 5 rows of the map (each configuration hasn't the same probability to occur).

    3. Players setup

      1. Players initial goods quantity

        All the players begin with an equal quantity of goods, which depends of the level:

        LevelFoodEnergySmithore & Crystite
        Beginner840
        Standard420
        Tournament420
      2. Players initial money

        Human players begin with an amount of money depending of their race:

        RaceMoney
        Flapper1600$
        Human600$
        Others1000$

        Computer players begin with an amount of money depending of the level:

        LevelMoney
        Beginner1000$
        Standard1000$
        Tournament1200$
    4. Store setup

      1. Store initial quantities

        The Store initial quantities are depending of the level:

        LevelBeginnerStandard &
        Tournament
        Food168
        Energy168
        Smithore08
        Crystite00
        Mule2514
      2. Store initial prices

        The Store initial prices are depending of the level:

        Food30$
        Energy25$
        Smithore50$
        Crystite100$
        Mule100$
  4. Game rounds

    1. Round initialization

      At the beginning of each round, the following actions are done:

      At the Beginner level, the Store initializes:

    2. the quantity of Smithore to 0
    3. the quantity of mules to 25
    4. That's why the Smithore price is constant at 50$ for this level (no Shortage).

    5. Lands grant

      1. Cursor speed

        The cursor is moving at a speed of 1 land each CTU. When a land is selected by a player, a pause of 4 CTU is done.

      2. Computers maps of lands rating AI

        Each computer use its own map of lands rating to determin the land he'll select during the land grant.

        The map contains the rating of the available lands, taking into accounts the exploitations owned (the economic bonuses raise the rating) and the distance to the Store. The map doesn't specify for which types of exploitation the ratings are given.

        The stages of the algorithm, for 1 computer map, are:

        • computation of the goods rating on 3 simulated rounds
        • if this is the first round, a rating of 32 (the maximum) is given to a random good with the following probabilities:

          GoodProbability
          Food50%
          Energy25%
          Smithore25%
          Crystite0%
        • for each land of the map, its rating is computed:

          • If the land is available, the rating is equal to the best exploitation rating (using the goods rating) whose could be installed on the land if the computer owned it. The value is then deduced by half the distance from the Store to the land (-1 to -5).
          • If the land is not available, the rating is set to 0.
      3. Computers best land AI

        To select the best land during the land auction, the computers analyse their map of lands rating:

        • for each land of the map (from the start if not specified)
          • the final rating of the land is computed withdrawing the following penality:
            • no penality if the land is among the 3 first rows
            • -1 if the land is on the fourth row
            • -2 if the land is on the last row
          • if no land has already been selected, the new land is selected
          • if a land has been already selected and the result is better than the final rating of the selected land, there's a 25% probability the new land is selected (and thus 75% to keep the last selected land)
      4. Computers land grant AI

        At the beginning of the land grant, the computers think of the land they will select. Each one:

        If 2 computers have chosen the same land and there's at least 4 available lands, the computer having the better rank select another one. This is repeated until all computers have chosen a different land.

        During the land selection, the computers simulate a button click as soon as the cursor attains the land they've chosen. If several players simultaneously click, the one having the worst rank wins the land and all the concerned computers choose another best land among their map from the next cursor position.

    6. Lands auctions

      1. Number of colony land auctions

        At the Beginning level, there's no land auctions.

        The number of colony land auctions is limited by the number of lands still available and equal to the normal distribution of 1 with an amplitude of:

        • 1 for the Standard level
        • 2 for the Tournament level

        This gives the following probabilities:

        Plots for saleStandardTournament
        016.168%31.126%
        167.664%37.748%
        216.063%24.303%
        30.105%6.248%
        40%0.562%
        50%0.013%
      2. Computers land auction rating AI

        At a land auction, each computer computes his rating of the land for sale in the following way:

        • the computer good ratings are set to:
          GoodRating
          Food3
          Energy2
          Smithore6
          Crystite12.5+round/2
        • the land rating is equal to the best exploitation rating (without the bonus because of a shortage) whose could be installed on the land if the computer owned it
        • a random value between 0 and 7 is added to the rating
        • the rating is finally multiplied by the number of rounds left (thus the rating is null at the last round)
      3. Land auctions set

        There's two kinds of land auction set, that occur in the following order:

        • player land auction set: composed of the lands put for sale by the players
        • Colony land auction set: composed of the random lands put for sale by the Colony

        The scheme is the same in both cases:

        • for each auction in the set:
          • the increment is 4$ per pixel
          • the available time is 70 ATU
          • each computer compute his land auction rating
          • the selling price at the beginning of the auction is:
            • for the first auction of the game: equal to 160$
            • for the first auction of the set: equal to the average selling price of the previous land auction set deduced by 60$
            • for the others auctions of the set: equal to the previous land auction deduced by 60$
          • the selling price at the end of the auction is:
            • if there's a buyer: equal to high bid
            • if not: equal to the bid start divided by 2 and incremented by 52$ (bid start/2 + 52$)
          • he land auction set is ended when all the lands are sold or when a Colony land hasn't been bought
        • the average price is computed using the selling price at the end of each auction
      4. Computers land auction AI

        TODO

    7. Players turn

      1. Player Food requirement

        The player Food requirement for the current and the next round is:

        RoundFood requirement
        (for current round)
        Next Food requirement
        (for next round)
        133
        233
        333
        434
        544
        644
        744
        845
        955
        1055
        1155
        1250
      2. Turns order

        The players take their turn in the order of their rank. If there's 7 or less mules in the Store, the order is reversed to help last ranked players.

      3. Random player event

        1. Player event probability

          At the beginning of each player turn, there's a 27.5% probability an event appends. In this case, one among the 22 is randomly chosen until it complies to the following rules:

          • an event appends only one time in the game
          • a good event never occurs to the first ranked player
          • a bad event never occurs to the 2 last ranked players
          • certain events require a particular condition

          If none of the events complies to the rules, nothing happens.

          The event is automatically changed to the first of the list if:

          • a valid event has already been chosen
          • the player has no Food unit
          • the player is not first ranked
        2. Player event effect

          The following variables are used in the player event effect chart:

          • m is the price multiplicative factor of the round (given by the chart below)
          • x is the event multiplicative factor (strength of the event)
          • y is the player multiplicative factor (number of elements concerned)

          The price multiplicative factor m is equal to 25$*(round/4+1):

          Round123456789101112
          m2525255050505075757575100

          Player event effect chart:

           TypexConditionEvent
          Good   YOU JUST RECEIVED A PACKAGE FROM YOUR HOME-WORLD RELATIVES CONTAINING 3 FOOD AND 2 ENERGY UNITS.
          The player wins 3 Food units and 2 Energy units.
             A WANDERING SPACE TRAVELER REPAID YOUR HOSPITALITY BY LEAVING TWO BARS OF SMITHORE.
          The player wins 2 Smithore units.
          A2At least 1 exploitationYOUR MULE WAS JUDGED "BEST BUILT" AT THE COLONY FAIR. YOU WON $?.
          The player wins 2*m $.
          A4At least 1 exploitationYOUR MULE WON THE COLONY TAP-DANCING CONTEST. YOU COLLECTED $?.
          The player wins 4*m $.
          B2At least 1 exploitation of FoodTHE COLONY COUNCIL FOR AGRICULTURE AWARDED YOU $? FOR EACH FOOD PLOT YOU HAVE DEVELOPED. THE TOTAL GRANT IS $?.
          The player wins 2*m*y $.
          A4 THE COLONY AWARDED YOU $? FOR STOPPING THE WART WORM INFESTATION.
          The player wins 4*m $.
          A8 THE MUSEUM BOUGHT YOUR ANTIQUE PERSONAL COMPUTER FOR $?.
          The player wins 8*m $.
          A2 YOU WON THE COLONY SWAMP EEL EATING CONTEST AND COLLECTED $?. (YUCK!)
          The player wins 2*m $.
          A3 A CHARITY FROM YOUR HOME-WORLD TOOK PITY ON YOU AND SENT $?.
          The player wins 3*m $.
          A6 YOUR OFFWORLD INVESTMENTS IN ARTIFICIAL DUMBNESS PAID $? IN DIVIDENDS.
          The player wins 6*m $.
          A4 A DISTANT RELATIVE DIED AND LEFT YOU A VAST FORTUNE. BUT AFTER TAXES YOU ONLY GOT $?.
          The player wins 4*m $.
          A2 YOU FOUND A DEAD MOOSE RAT AND SOLD THE HIDE FOR $?.
          The player wins 2*m $.
            At least 1 available landYOU RECEIVED AN EXTRA PLOT OF LAND TO ENCOURAGE COLONY DEVELOPMENT.
          The player wins a random free land.
          Bad   MISCHIEVOUS GLAC-ELVES BROKE INTO YOUR STORAGE SHED AND STOLE HALF YOUR FOOD.
          The player loses half his Food units.
          A3At least 1 exploitationONE OF YOUR MULES LOST A BOLT. REPAIRS COST YOU $?.
          The player loses 3*m $.
          B2At least 1 exploitation of Smithore or CrystiteYOUR MINING MULES HAVE DETERIORATED FROM HEAVY USE AND COST $? EACH TO REPAIR. THE TOTAL COST IS $?.
          The player loses 2*m*y $.
          B1At least 1 exploitation of EnergyTHE SOLAR COLLECTORS ON YOUR ENERGY MULES ARE DIRTY. CLEANING COST YOU $? EACH FOR A TOTAL OF $?.
          The player loses 1*m*y $.
          A6 YOUR SPACE GYPSY INLAWS MADE A MESS OF THE TOWN. IT COST YOU $? TO CLEAN IT UP.
          The player loses 6*m $.
          A4 FLYING CAT-BUGS ATE THE ROOF OFF YOUR HOUSE. REPAIRS COST $?.
          The player loses 4*m $.
          A4 YOU LOST $? BETTING ON THE TWO-LEGGED KAZINGA RACES.
          The player loses 4*m $.
          A4 YOUR CHILD WAS BITTEN BY A BAT LIZARD AND THE HOSPITAL BILL COST YOU $?.
          The player loses 4*m $.
            At least 1 plotYOU LOST A PLOT OF LAND BECAUSE THE CLAIM WAS NOT RECORDED.
          The player loses his last land from the map.

          The exact formula which gives the amount won or lost is:

          • For the type A events:

            x * 25 * (round/4 + 1) = x * m

          • For the type B events:

            x * 25 * (round/4 + 1) * y = x * m * y

      4. Available time for turn

        The available time for the turn depends of the quantity of Food the player has compared to the round requirement.

        The formula is: 10 PTU (4.67s) + 91 PTU (42.47s) * ratio

        The ratio is: Food units owned by the player divided by Food units required for the round (maximum of 100%)

        This gives the following cases:

        CaseTime limits
        No shortage101 PTU (47.13s)
        Partial shortage10 + 91*ratio PTU ]4.67s; 47.13s[
        Total shortage10 PTU (4.67s)
      5. Outfits price

        The outfit prices are:

        Food25$
        Energy50$
        Smithore75$
        Crystite100$
      6. Installing a mule

        To interact with a land (Assay, to install a mule, ...), the player must be located inside a zone smaller than the land:

        • if we consider the whole Player Missile:

          Plot

        • if we consider the visible part of the Player Missile (example for the Bonzoid):

          Plot

        The mule position during the interaction doesn't have any importance. Only the position of the player does matter.

      7. Selling land

        TODO:

        mise en vente -> temps arrêté, continuera dès retour ou après 250 BTU

      8. Wampus hunting

        1. Wampus aspect

          The Wampus is a mysterious creature hidden into the mountains.

          Wampus

          It appears on the screen as a colored point on one of the 20 mountains.

          This color depends of the game level:

          LevelBeginnerStandardTournament
          Wampus ColorBeginner Wampus ColorStandard Wampus ColorTournament Wampus Color
        2. Wampus catching

          The Wampus is only catchable when:

          • the point is visible
          • the player is at the exact location (there's only one for each mountain)

          The exact player position (the green pixel) must be the following, according to the Wampus position (between red lines):

          • The vertical Wampus position is located 4 pixels below the vertical player position:

            Player Vertical Position
          • According to the horizontal Wampus position, two cases can happen. In both, the horizontal Wampus position is on the left of the player:

            Player Vertical Position Player Vertical Position

          The Wampus is:

          • never visible when the player is dragging a mule.
          • only catchable one time for each player turn.
        3. Wampus initial delay

          The Wampus only appears after an initial delay Tw (in PTU). This delay is proportional to Ta (in BTU), which is the waited time before the player press the button to play is turn (event included). The maximum value of Ta is 255 BTU (17s).

          For example, if the player waits 10s before clicking:

          Ta = 10s = 10/(1/15) BTU = 150 BTU (10s)

          If a player event occurs, Ta is deduced by 100 BTU (6.7s). Thus, the maximum value of Ta is 155 BTU (10.3s).

          The delay Tw (in PTU), before the Wampus appears, is equal to Ta divided by 4.

          Example 1:

          • the player play with Flapper at level Standard: 1 PTU = 7+2 BTU = 0.6s
          • the player waits 3s before clicking (no event occurs):
            • Ta = 3s = 3/(1/15) BTU = 45 BTU
            • Tw = 45/4 PTU = 11 PTU = 11*0.6s = 6.6s

          Example 2:

          • the player play with Human at level Tournament: 1 PTU = 7-2 BTU = 0.33s
          • the player waits 12.1s before clicking (an event occurs):
            • Ta = 12.1/(1/15) BTU - 100 BTU = 81 BTU
            • Tw = 81/4 PTU = 20 PTU = 20*0.33s = 6.6s

          We can see the Wampus appears after the same initial delay. This can seem strange at first glance because the Flapper waits lesser than the Human, but it's in fact completely normal:

          • the Wampus appears after 11 PTU for the Flapper and 20 PTU for the Human
          • the value of the PTU isn't the same for the 2 players: 0.6s for the Flapper and 0.33s for the Human, thus the time decreases faster for the Human than for the Flapper
          • the Flapper has more time to play his turn (101 PTU = 60.6s) than the Human (101 PTU = 33.67s), thus in seeing the ratio "initial delay" with "time available", the Human is more penalized than the Flapper

          To sum up:

          • Without event, Ta has a maximum of 255 BTU (17s), so Tw has a maximum of 255/4 PTU = 63 PTU = 29.4s, what is rather big
          • With an event, Ta has a maximum of 155 BTU (10.3s), so Tw has a maximum of 155/4 PTU = 38 PTU = 17.73s

          To have the maximum time to catch the Wampus (and therefore it appears as soon as possible), the player must click quickly at the beginning of his turn. If an event occurs, the player has 6.7 free seconds to read it.

        4. Wampus movement

          After the initial delay, the Wampus behavior switch over 2 states:

          • a visible state:

            It lasts between 1 to 4 PTU (0.47s to 1.87s).

          • a hidden state which can randomly have 2 behavior (50% probability each):

            • Case 1: the Wampus stays at the same location, it lasts between 4 to 7 PTU (1.87s to 3.27s).
            • Case 2: the Wampus moves randomly to a mountain (eventually the same), it lasts exactly 2 PTU (0.93s).

          Thus, if the Wampus isn't appeared again at 2 PTU (0.93s), it won't move (case 1).

          Be aware, if the player stays on any mountain (in collision), when the Wampus is switching to the visible state, it will hide again instantaneously and switch to the hidden state.

        5. Wampus reward

          if the player succeeds to catch the Wampus, he wins a sum of money equal to 100$ * (round+4)/4:

          Round123456789101112
          Cash100100100200200200200300300300300400
      9. Gambling at the Pub

        At the end of his turn, the player can go to the Pub for Gambling and wins some cash. The quantity is equal to the round gambling bonus added by a value between 0$ and two times the amount of time left (in PTU):

        Cash = round bonus + random value [0; temps restant*2[

        • The round bonus is:

          Round123456789101112
          Cash505050100100100100150150150150200
        • Some typical values for remaining time

          Time leftMaximum amount
          Full (100 PTU) 200$
          75% (75 PTU)150$
          50% (50 PTU)100$
          25% (25 PTU)50$
          Shortage (10 PTU)20$

        The final amount has a maximum of 250$.

        Example:

        Round #3, 30% remaining time (30 PTU), the Gambling value will be between 50$ and 110$ (50$ + random (101*30/100*2).

      10. Computers turn AI

        The computer turn AI is splitted in 3 chronological parts:

        • Phase 1: Development
        • Phase 2: Assay
        • Phase 3: Gambling
        1. Phase 1: Development

          The Development phase loops through the following algorithm:

          • if the remaining time is less than 35 PTU (16.33s), next phase
          • computation of the good rating for 2 rounds
          • for each player land (from the end):
            • if the land has already been processed this turn, next land
            • if the land hasn't any exploitation:
              • if the Store hasn't any mule, next land
              • if the player hasn't enough money to buy a mule, next land
              • purchase of a mule
              • initialization of its current exploitation rating to 0
            • if the land has an exploitation:
            • computation of the best exploitation rating (simulated) for this land
            • if the best exploitation is of the same type than the current, next land
            • computation of the delta between the rating of the best exploitation and the current exploitation
            • if the delta is inferior to 3, next land
            • if the delta is worst than the best actually memorized, next land
            • if the player hasn't enough money to outfit the mule, next land
            • memorization of this best choice: land, exploitation and delta
            • next land
          • if the delta of the best choice is zero, next phase
          • process of the best choice:
            • purchase of the outfit for the exploitation
            • installation of the mule on the land
            • mark this land as processed
            • decrease of the time by 25+distance*2 PTU
          • loop

          Comparison of the time used to put an exploitation between a human controlled player and a computer:

          • Computer controlled:
            • Purchase of the mule and an outfit: 25 PTU (11.67s)
            • Installation of the mule: 4 to 20 PTU (1.87s to 9.33s)
            • Total time: 29 to 45 PTU (13.53s to 21s)
          • Human controlled:
            • Purchase of the mule and an outfit: ~22 PTU (~10.27s)
            • Installation of the mule: ~4 to ~22 PTU (~1.87s to ~10.27s)
            • Total time: ~26 to ~44 PTU (~12.13s to ~20.53s)

          Observations:

          • the total installation time is roughly the same
          • the computer doesn't exchange exploitation between 2 lands, but he doesn't need to go out to take the mule of an exploitation to outfit it again
          • the computer can install a maximum of 3 mules
        2. Phase 2: Assay

          The computer doesn't assay any land if:
          • the level is Beginner or Standard
          • the number of High Crystite is superior to 2

          The Assay phase is splitted in 2 stages:

          • Stage 1: its own lands

            • for each land of the player (from the end, other than the river)

              • if the remaining time is inferior than 22 PTU (10.27s), next phase
              • if the Crystite of the land is already known (by Assay, deduction or production), next land
              • probability of 87.5%, next land
              • Assay
              • Crystite deduction
              • decrease of the time by 10+distance*2 PTU
          • Stage 2: free plots

            This stage is equivalent to the first, but the free plots are covered instead of the lands owned.

          Comparison of the time used to assay between a human controlled player and a computer:

          • Computer controlled:
            • Assay: 10 PTU (4.67s)
            • Move: 4 to 20 PTU (1.87s to 9.33s)
            • Total time: 14 to 30 PTU (6.53s to 14s)
          • Human controlled:
            • Assay: ~5 PTU (~2.33s)
            • Move: ~4 to ~22 PTU (~1.87s to ~10.27s)
            • Total time: ~9 to ~27 PTU (~4.2s to ~12.6s)

          Observations:

          • a human controlled player is usually faster than a computer
          • the computer doesn't assay the plots for which he knows the supposed value (by deduction) but not the real value
        3. Phase 3: Gambling

          If the remaining time is inferior to 3 PTU (1.4s), the computer runs out of time. If not, he goes to the Pub for Gambling.

    8. Production

      1. Player Energy requirement

        Each Food, Smithore or Crystite exploitation needs one Energy unit to be able to produce. If an exploitation has no Energy unit, it produces 0 units. An Energy exploitation doesn't need any Energy unit to produce.

      2. Exploitation base production capacity (EBPC)

        The exploitation base production capacity (EBPC) is used as a basis to compute the EPC.

        For Food, Energy and Smithore, the EBPC depends of the terrain type on which it is located:

         FoodEnergySmithoreCrystite
        Plain231Variable
        River42Not allowedNot allowed
        1 Mountain112Variable
        2 Mountains113Variable
        3 Mountains114Variable
         FoodEnergySmithoreCrystite
        PlainPlot - Food on PlainPlot - Energy on PlainPlot - Smithore on PlainPlot - Crystite on Plain
        RiverPlot - Food on RiverPlot - Energy on RiverPlot - Smithore on RiverPlot - Crystite on River
        1 MountainPlot - Food on Mountain 1Plot - Energy on Mountain 1Plot - Smithore on Mountain 1Plot - Crystite on Mountain 1
        2 MountainsPlot - Food on Mountain 2Plot - Energy on Mountain 2Plot - Smithore on Mountain 2Plot - Crystite on Mountain 2
        3 MountainsPlot - Food on Mountain 3Plot - Energy on Mountain 3Plot - Smithore on Mountain 3Plot - Crystite on Mountain 3

        For Crystite exploitation, the production relies on the deposit quality of the land:

        None0
        Low1
        Medium2
        High3
        Very High4

        The EBPC is shown at the bottom right of the exploitation with points. It's updated at the beginning of the production phase.

      3. Exploitation production capacity (EPC)

        The exploitation production capacity (EPC) is computed for a player land and an exploitation type. It's used as a basis for the EP.

        There's 2 kinds of EPC:

        • the real EPC, used by the EP with Energy penalty for the production phase
        • the simulated EPC, used by:
          • the EP, without Energy penalty, for the land grant AI and player turn AI
          • the computer exploitation rating AI for the land grant AI, land auction AI and player turn AI
        1. The real EPC is given by adding the 3 following values:

          • the EBPC

          • the 1st economic bonus ("The learning curve theory"): 1 EPC is added for each 3 exploitations of the same type

          • the 2nd economic bonus ("The economies of scale theory"): 1 EPC is added if at least 1 exploitation of the same type is adjacent

        2. The simulated EPC is similar but the economic bonuses are slightly different, taking into account if the exploitation (eventually the land) isn't already owned. It's given by adding the 3 following values:

          • the EBPC (or the known Crystite for a Crystite exploitation)

          • the 1st economic bonus ("The learning curve theory"):

            • 1 EPC is added for each 3 exploitations of the same type (the simulated exploitation is counted in the exploitations)
            • if the simulated exploitation makes it possible to reach a better economic bonus (than without it), the bonus is added by the number of exploitations already owned of this type (this is the additional production the simulated exploitation would give)
          • the 2nd economic bonus ("The economies of scale theory"):

            • 1 EPC is added if at least 1 exploitation of the same type is contiguous
            • if the land is already owned (player turn AI), this bonus has a maximum of 2 EPC
            • if not (land grant AI and land auction AI), 2 EPC is added for each land (with or without an exploitation) adjacent to the simulated exploitation (this help the choice of a contiguous land), this bonus has a maximum of 3 EPC
      4. Exploitation production (EP)

        The exploitation production (EP) is the number of units produced at the production phase (before the turn event occurs).

        There's 2 kinds of EP:

      5. the real EP, with Energy penalty for the production phase
      6. the simulated EP, without Energy penalty for the computer good rating AI
      7. The steps to compute the production of all the exploitation are:

        • for each exploitation:

          • computation of the real EPC
          • variation of the real EPC with normal distribution, the amplitude depends of the level:

            LevelAmplitude
            Beginner0 (No variation)
            Standard1
            Tournament2

            wich gives the following variations for each level:

             Probability
            VariationBeginnerStandardTournament
            -3  0.6%
            -2 0.1%6.2%
            -1 16.1%24.3%
            0100.000%67.6%37.8%
            +1 16.1%24.3%
            +2 0.1%6.2%
            +3  0.6%
          • production limitation with a minimum of 0 unit and a maximum of 8 units
        • eventually, Energy penalty for each player:

          • computation of the number of Energy units required by the player
          • computation of the quantity of missing Energy units (quantity required substracted by the quantity owned).
          • for each missing Energy unit, the production of a random exploitation owned by the player is cleared
    9. Random round event

      A random event always occurs after the production phase (even if visually, the event appears before the production like the Acid Rain Storm, Sunspot Activity and Earthquake).

      1. Round event probability

        At the last game round, the event is the return of the colonial ship. Otherwise, a random event is chosen.

        Each event can occur only a limited number of time per game:

        EventMax per game
        Pest Attack3
        Pirate Ship2
        Acid Rain Storm3
        Planetquake3
        Sunspot Activity3
        Meteorite Strike2
        Radiation2
        Fire in Store2

        The probability of an event is equal to the number of time it can still happen divided by the total number of possibilities.

        Example 1: round #1

        Event# of time the event may occur
        until the end of the game
        ProbabilityPercent
        Pest Attack33/2015%
        Pirate Ship22/2010%
        Acid Rain Storm33/2015%
        Planetquake33/2015%
        Sunspot Activity33/2015%
        Meteorite Strike22/2010%
        Radiation22/2010%
        Fire in Store22/2010%
        Total2020/20100%

        Exemple 2: Round #3 (event Acid Rain Storm and Meteorite Strike already occured)

        Event# of time the event may occur
        until the end of the game
        ProbabilityPercent
        Pest Attack33/1816.67%
        Pirate Ship22/1811.11%
        Acid Rain Storm22/1811.11%
        Planetquake33/1816.67%
        Sunspot Activity33/1816.67%
        Meteorite Strike11/185.55%
        Radiation22/1811.11%
        Fire in Store22/1811.11%
        Total1818/18100%

        By enumerating the possibilities, the following exact probabilities can be computed:

        EventNever occursOccurs 1xOccurs 2xOccurs 3xOccurs at least 1x
        Pest Attack, Acid Rain Storm,
        Planetquake, Sunspot Activity
        7.37%34.74%43.42%14.47%92.63%
        Pirate Ship, Meteorite Strike,
        Radiation, Fire in Store
        18.95%52.10%28.95%0%81.05%
      2. Round event effect

        The effects of the round events are the following:

        EventDescription
        Pest Attack

        A random Food exploitation owned by one of the two first players and having produced at least 1 unit of Food lose all its production.

        Pirate Ship

        If the level is Beginner or Standard:

        • the Store loses all its Smithore units
        • the players lose all their Smithore units
        • the players lose all their Smithore production

        If the level is Tournament:

        • the players lose all their Crystite units
        • the players lose all their Crystite production
        Acid Rain Storm

        The storm passes through a random row.

        For each exploitation in the row:

        • if it's a Food exploitation, 4 units are added to the production
        • if it's an Energy exploitation, 2 units are removed from the production

        For each exploitation outside the row:

        • if it's a Food exploitation, 1 unit is added to the production
        • if it's an Energy exploitation, 1 unit is removed from the production

        The production is limited by a minimum of 0 unit and a maximum of 8 units.

        Planetquake

        This event has 2 consequences:

        • a mountain eventually moves:

          The move has a probability of 50% to occur. A random mountain is chosen among the columns 2, 3, 7 and 8. It's randomly moved to the left or right adjacent plot. Both of the exploitations (the in and out locations) are lost with their production.

        • the mining production is halved:

          All the Smithore and Crystite exploitations lose half of their production.

        Sunspot Activity

        All the Energy exploitations gain 3 units, with a maximum of 8 production units.

        Meteorite Strike

        A meteor strike a random plot (other than the river and the Store) and wich the Crystite deposit is None, Low or Medium (the meteor never strikes a High or Very High deposit). The plot Crystite deposit becomes Very High and the known Crystite is updated. If an exploitation is located on the plot, it's lost with its production..

        Radiation

        A random exploitation owned by one of the two first players is lost with its production.

        Fire in Store

        The Store loses all its Food, Energy and Smithore units.

    10. The Store

      1. Goods price variation

        Ces algorithmes sont utilisés pour calculer:

        • le prix réel des biens
        • le prix simulé et la qualité des biens pour l'AI (sélection de la terre et placement des exploitations)

        Le prix réel des biens est mis à jour en effectuant:

        • la variation du prix du Food
        • la variation du prix de l'Energy
        • la variation du prix du Smithore
        • la variation du prix du Crystite
        1. Price variation with supply and demand

          Entrées:

          • le type du bien (Food, Energy ou Smithore/Mule)
          • la quantité totale en jeu pour le round suivant (Food, Energy ou Mule
          • la quantité totale requise pour le round suivant (Food, Energy ou Mule
          • le prix courant (Food, Energy ou Smithore)
          • le prix minimum (Food, Energy ou Smithore)

          Sorties:

          • le nouveau prix

          Le ratio de l'offre et la demande est calculé en divisant la quantité totale en jeu par la quantité totale requise. Un ratio supérieur à 1 indique que l'offre est insuffisante pour la demande. Un ratio inférieur à 1 indique que l'offre est supérieure à la demande.

          Dans le cas du Smithore/Mule, le ratio est borné par ]0.25; 3.0].

          Le nouveau prix est alors calculé avec la formule suivante:

          prix = 25% * prix + 75% * (prix * ratio)

          ou encore

          prix *= 0.25 + 0.75 * ratio

          Finalement, le prix est borné en fonction du bien et de la raison du calcul du prix (réel ou simulé pour l'AI):

          GoodReasonMinimum
          FoodReal30
          EnergyReal25
          SmithoreReal50
          FoodSimulated (AI)10
          EnergySimulated (AI)10
          SmithoreSimulated (AI)50
        2. Next round mules requirement

          La quantité théorique de mules requise est calculée en sommant:

          • le nombre de terrain libre susceptibles d'être prises au round suivant (plafonné par 4)
          • le nombre de parcelles sans exploitation (et donc nécessitant une mule)

          La valeur est bornée par [0; 8]

        3. Food price variation

          Entrées:

          • la quantité totale initiale en jeu
          • la quantité possédée de chaque joueur
          • la quantité produite de chaque joueur
          • la quantité requise pour le round
          • le prix courant
          • le prix minimum

          Sorties:

          • la quantité totale finale en jeu
          • le nouveau prix

          La quantité totale initiale en jeu est égale:

          • pour le calcul du prix réel ou simulé (AI): à la quantité du store
          • pour les prix simulés suivant (AI): à la quantité totale finale en jeu du calcul simulé précédent

          Dans un premier temps, on calcul le nombre d'unité totale qu'il y aura à la fin du round possédé par chaque joueur. On applique les 3 phases (Usage, Spoilage et Production):

          • Usage (borné par 0): quantité possédée -= quantité requise
          • Spoilage: quantité possédée *= 2/4
          • Production: quantité possédée += quantité produite

          La quantité totale finale en jeu est alors calculée en sommant la quantité totale initiale en jeu et la quantité possédée par chaque joueur après les 3 phases.

          Ensuite on calcul la quantité totale requise pour le round suivant (égale à la quantité requise pour le round suivant multiplié par 4)

          Finalement, on calcul le nouveau prix en appliquant la théorie de l'offre et de la demande avec comme paramètres:

          • le type du bien (Food)
          • la quantité totale finale en jeu pour le round suivant
          • la quantité totale requise pour le round suivant
          • le prix courant
          • le prix minimum

          La variation du prix du Food prend en compte le nombre d'unités possédées par les joueurs. Ainsi, tant que les joueurs en garderont une quantité suffisante, le prix du Food ne montera pas même si le store est en rupture.

        4. Energy price variation

          Entrées:

          • la quantité totale initiale en jeu
          • la quantité possédée de chaque joueur
          • la quantité produite de chaque joueur
          • la quantité requise de chaque joueur pour le round
          • le prix courant
          • le prix minimum

          Sorties:

          • la quantité totale finale en jeu
          • le nouveau prix

          L'algorithme est identique à celui pour le Food, avec les différences suivantes:

          • la quantité requise est propre à chaque joueur (et non dépendante du round)
          • le Spoilage est de 3/4 (et non de 2/4)
          • la quantité totale requise pour le round suivant égale à la somme des quantités requises de chaque joueur pour ce round + 4 (pour les futures exploitations)
          • la fluctuation de l'offre et la demande est calculée pour le bien Energy
        5. Smithore price variation

          Entrées:

          • la quantité de mules potentiellement disponible
          • la quantité de mules requise pour le round
          • le prix courant

          Sorties:

          • le nouveau prix

          La quantité de mules potentiellement disponibles est égale:

          • pour le calcul du prix réel ou simulé (AI): à la quantité de mules dans le store plus la moitié du Smithore en store
          • pour les prix simulés suivant (AI): à la quantité de mules potentiellement disponibles du calcul simulé précédent soustrait de la quantité de mules requise précédente (= 5)

          La quantité de mules requise est égale:

          • pour le calcul du prix réel: au calcul classique (calcMuleReq)
          • pour le calcul du prix simulé (AI): à 5

          On applique la théorie de l'offre et de la demande avec comme paramètres:

          • le type du bien (Smithore/Mule)
          • la quantité de mules potentiellement disponibles
          • la quantité de mules requise
          • le prix courant du Smithore
          • un prix minimum du Smithore égal à 50

          Ensuite on applique la variation naturelle du Smithore si le niveau n'est pas Beginner. Pour cela on calcul la binomiale avec une amplitude 2 pour la valeur 0. Le résultat est multiplié par 7 et ajouté au prix. Ainsi on obtient les variations suivantes:

          Amplitude 2 (Factor 1)
          VariationProbability
          -280.013%
          -210.562%
          -146.248%
          -724.303%
          037.748%
          +724.303%
          +146.248%
          +210.562%
          +280.013%

          Le prix est borné par 20.

          Contrairement au prix du Food et de l'Energy, le prix du Smithore ne prend pas en compte les unités possédées par les joueurs, mais uniquement les unités dans le store et le nombre de mules disponibles. Ainsi, le prix grimpera dès que le store sera en rupture et/ou le nombre de mules sera insuffisant, et cela quelque soit le nombre d'unités possédées par les joueurs.

        6. Crystite price variation

          Le prix du Crystite est égal à 50 additionné à un nombre alétaoire entre 0 et 99 (bornes incluses).

      2. Purchase and sale price

        GoodBuy priceSell priceIncrement (per pixel)
        SmithoreCurrent priceBuy price + 35$1$
        CrystiteCurrent price
        (to bottom multiple of 4)
        Buy price + 140$4$
        FoodCurrent price - 15$Buy price + 35$1$
        EnergyCurrent price - 15$Buy price + 35$1$
    11. Goods auctions

      L'enchère du Smithore et du Crystite a lieu s'il y a au moins 1 unité potentiellement disponible à la vente. C'est à dire si:

      • un des joueurs possède au moins 1 unité
      • ou un des joueurs a produit au moins 1 unité
      • ou le store a au moins 1 unité en stock
      expliquer l'ordre des auctions + phases
      1. Players status

        Usage, Spoilage, Production, Surplus et Shortage, (Critical Level = Requirement)
        PhaseDescription
        UsageNombre d'unités consommées pour le round courant.
        SpoilageNombre d'unités gaspillées pour le round courant.
        ProductionNombre d'unités produites pour le round courant.
        RequirementNombre d'unités théoriques nécessaires pour le round suivant pour ne pas être pénalisé (Usage théorique du round suivant).
        1. Smithore and Crystite players status

          PhaseDescription
          UsageAucune unité consommée.
          SpoilageToutes les unités au-delà de 50 sont perdues.
          ProductionLa production du round est ajoutée et le total plafonné à 255 unités.
          RequirementAucune unité nécessaire.

          50 unités de Smithore et de Crystite peuvent être gardées sans risque de Spoilage (mais attention au Pirate !).

        2. Food players status

          PhaseDescription
          UsageLe nombre d'unités pour le round courant est consommé.
          SpoilageLa moitié des unités (après Usage) est perdue (partie entière de la division).
          ProductionLa production du round est ajoutée et le total plafonné à 255 unités.
          RequirementLe nombre d'unités nécessaires pour le round suivant (afin de ne pas être pénalisé en temps).

          Aucune unité n'est perdue par le Spoilage si:

          • il reste au maximum 1 unité après l'Usage
          • il reste au maximum Usage+1 unités avant l'Usage
          • on garde Requirement+1 unités au tour précédent

          Ainsi, on peut garder 1 unité au-delà du Requirement sans Spoilage au tour suivant.

        3. Energy players status

          PhaseDescription
          UsageLe nombre calculé d'unités pour le round courant est consommé.
          SpoilageLe quart des unités (après Usage) est perdu (partie entière de la division).
          ProductionLa production du round est ajoutée et le total plafonné à 255 unités.
          RequirementLe nombre d'unités nécessaires pour le round suivant (afin ne pas être pénalisé en production) en comptant 1 exploitation supplémentaire.

          Aucune unité n'est perdue par le Spoilage si:

          • il reste au maximum 3 unités après l'Usage
          • il reste au maximum Usage+3 unités avant l'Usage

          Le Requirement considère qu'au round suivant, il n'y aura qu'une exploitation supplémentaire. Or si le joueur achète une parcelle ou en gagne une, il manquera d'Energy pour les nouvelles exploitations. Il faut donc garder le maximum d'unités d'Energy pour les nouvelles exploitations du round suivant, tout en évitant de subir le Spoilage.

          Le tableau suivant donne, pour le nombre d'unités d'Energy gardées en Surplus par rapport au Requirement, le nombre minimum (sans pénalité de production par manque d'Energy) et maximum (sans Spoilage) de nouvelles exploitations possibles (autre que d'Energy) pour le round suivant. Ne pas oublier qu'une unité d'Energy a déjà été ajoutée dans le Requirement pour 1 exploitation supplémentaire.

          SurplusMin Exp to put
          without Spoilage
          Max Exp to put
          without Penalty
          001
          1 (**)02
          203
          3 (*)14
          425
          536

          (*) Ce choix est le plus judicieux car il permet de garder un maximum d'unités d'Energy et de poser de 1 à 4 nouvelles exploitations sans Spoilage ni pénalité (sachant qu'en général, on pose 1 exploitation).

          (**) C'est le choix fait par l'ordinateur

      2. Declaring

        1. Available time for declaring

          Le temps disponible pour choisir l'action Buy/Sell, est de 30 ATU.

        2. Smithore and Crystite declaring

          Un joueur est automatiquement placé:

          • en Seller, s'il possède au moins 1 unité
          • en Buyer, s'il n'en possède aucune
        3. Food and Energy declaring

          L'enchère du Food a lieu si:

          • un des joueurs possède au moins 1 unité
          • ou le store a au moins 1 unité en stock

          Le joueur est automatiquement placé:

          • en Seller, s'il possède au moins 1 unité en Surplus
          • en Buyer, s'il n'en possède aucune en Surplus
        4. Computers declaring AI

          TODO

      3. Trading

        L'enchère a lieu si:

        • au moins un des joueurs est Seller
        • ou le store a au moins 1 unité en stock

        A la fin de chaque enchère, le prix du bien est mis à jour si au moins une unité a été vendue. Le nouveau prix est égal au prix moyen des unités vendues.

        A la fin de l'enchère du Crystite, le nombre d'unités de Crystite dans le Store est mis à zéro.

        1. Available time for trading

          Le temps disponible pour l'enchère est de 70 ATU.

        2. Computers trading AI

          TODO

    12. Corral mules building and pricing

      Le Store contient un maximum de 14 mules. Le nombre de mules manquantes est donc égal à 14 moins le nombre de mules dans le Store.

      Les mules manquantes sont construites à partir des unités de Smithore que le Store possède, sachant que chaque mule nécessite 2 unités de Smithore.

      Si le Store n'a pas assez de Smithore pour construire la totalité des mules manquantes, alors il en construit le maximum possible avec le Smithore disponible.

      Ensuite le nouveau prix des mules est calculé. Il est égal à 2 fois le prix du Smithore arrondi au multiple de 10 inférieur (Si le prix du Smithore est de 49$, alors le prix des mules sera de 90$). Le prix moyen du Smithore étant de 50$, le prix moyen des mules est donc de 100$.

    13. Status summary

      1. Score computing

        Les points de chaque joueur sont divisés en 3 types:

        • Money
        • Land
        • Goods

        Les points sont calculés ainsi:

        TypeEntityPoint value
        Moneyeach 1$1 point
        Land(each Plot)(500 points + Outfit price)
        each Plot without Exploitation500 points
        each Plot with a Food Exploitation525 points
        each Plot with a Energy Exploitation550 points
        each Plot with a Smithore Exploitation575 points
        each Plot with a Crystite Exploitation600 points
        Goodseach Mule35 points
        each Food unitCurrent price
        each Energy unitCurrent price
        each Smithore unitCurrent price
        each Crystite unitCurrent price
      2. Ranks update

        Les joueurs sont ordonnés selon la valeur décroissante de leur score. En cas d'égalité entre joueurs, leur position est déterminée aléatoirement entre eux.

      3. Colony difficulties message

        Le nombre total d'unités de Food en jeu est calculé. Il est égal à la somme des unités de Food des joueurs et du Store.

        Le nombre total d'unités de Smithore en jeu est calculé de la même manière.

        Echec de la colonie:

        • Si la colonie n'a aucune exploitation de Food et que le nombre total d'unités de Food est nul, alors le jeu se termine et le message suivant est affiché: The Colony failed because of a total lack of Food !
        • Si la colonie n'a aucune exploitation d'Energy et que le nombre total d'unités d'Energy est nul, alors le jeu se termine et le message suivant est affiché: The Colony failed because of a total lack of Energy !

        Shortage de la colonie:

        • Si le nombre total d'unités de Food est inférieur au nombre total d'unités de Food requis de tous les joueurs pour le round suivant, alors la colonie est en Shortage de Food.
        • Si le nombre total d'unités d'Energy est inférieur au nombre total d'unités d'Energy requis pour toutes les exploitations actuelles de tous les joueurs, alors la colonie est en Shortage d'Energy.
        • Si le nombre de mules dans le Store est inférieur au nombre de mules théoriquement requises pour le tour suivant (calcMuleReq), alors la colonie est en Shortage de Smithore.

        Le message est ensuite construit en fonction des différents Shortage de la colonie:

        • Pour un Shortage de Food et/ou d'Energy: The Colony has a shortage of[ Food][ and][ Energy] !
        • Pour un Shortage de Smithore: The Store has a shortage of Smithore for mules!
      4. Colony achievement message

        Le message final apparait à la fin du dernier round. Une note de 0 à 6 est attribuée à la colonie en fonction du score total final:

        Rating = round ((totalScore - 10000) / 20000), borné par [0; 6]

        Selon la note, un des messages suivant est affiché:

        RatingColony ScoreMessage
        00 to 19999Overall, the Colony failed... Dismally. The Federation debtors' prison is your next home!
        120000 to 39999Overall, the Colony failed... The Federation will no longer send trade ships. You are on your own!
        240000 to 59999Overall, the Colony survived... Barely. You will be living in tents. Few trading ships will come your way!
        360000 to 79999Overall, the Colony was a success. You have met the minimum standards set by the Federation, but your life will not be easy!
        480000 to 99999Overall, the Colony succeeded. The Federation is pleased by your efforts. You will live comfortably!
        5100000 to 119999Overall, the Colony succeeded... Extremely well. You can now retire in elegant estates!
        6120000 to +ooOverall, the Colony delighted the Federation with your exceptional achievement. Your retirement will be luxuriou!

        La Federation décerne le titre de First Founder au premier joueur du classement si la Colonie est un succès, c'est à dire si le score est supérieur ou égal à 60000 (la note est au moins égale à 3).

  5. Appendix

    1. Computers Crystite AI

      1. Computers known Crystite AI

        L'ensemble des 45 cases de la carte du Crystite connu est initialisé à l'état inconnu "?":

        ?????????
        ?????????
        ?????????
        ?????????
        ?????????
        

        Cela signifie que les ordinateurs ne connaissent pas la présence ou l'absence de Crystite sur les terres. La carte sera complétée au cours du jeu lors des différents événements (Assay, phase de production et chute de météorite) puis mise à jour avec des valeurs potentielles déduites à partir des valeurs déjà présentes (Déduction du Crystite).

        Cette carte ne spécifie pas si la valeur est une valeur réelle donnée par un Assay ou une valeur théorique obtenue suite à une déduction.

      2. Computers Crystite deduction AI

        La carte du Crystite connu par les ordinateurs est étendue par rapport à son contenu. Les déductions sont faites à partir des terres de qualité 2 (Medium) et 3 (High) de part la construction initiale des dépôts de Crystite en étoile au début du jeu:

          1
         121
        12321
         121
          1
        

        Ainsi les terres contigues aux terres de qualité 2 (Medium) sont forcément de qualité 1 (Low) au minimum, et les terres de qualité 3 (High) sont forcément entourées en étoile de terres de qualité 2 (Medium) et 1 (Low) au minimum. Aucune déduction n'est faite à partir des terres de qualité 4 (Very High) car elles proviennent uniquement des chutes de météorite et ne provoquent pas de dépôt en étoile (seule la terre touchée par le météorite est concernée).

        Exemple de déduction:

        • Carte avant déduction

          ??1??????
          ?????1???
          ?1???????
          123?2????
          ?1???????
          
        • Carte après déduction

          ??1??????
          ??1??1???
          ?1211????
          123221???
          ?1211????
          

        Si suite à un Assay, une terre de qualité 3 (High) est trouvée, alors la déduction suivante sera faite:

        • Carte avant déduction

          ??1??????
          ??13?1???
          ?1211????
          123221???
          ?1211????
          
        • Carte après déduction

          ??121????
          ?12321???
          ?1221????
          123221???
          ?1211????
          

        La déduction du Crystite est effectuée:

        • au début de chaque round, à partir des capacités de production visibles des exploitations de Crystite
        • après chaque Assay réalisé par un ordinateur

        Lorsqu'un joueur humain réalise un Assay, seule la terre analysée est mise à jour et aucune déduction n'est faite immédiatement autour de cette terre.

        Lorsqu'un joueur ordinateur réalise un Assay, la terre analysée est mise à jour et une déduction est faite immédiatement autour de cette terre.

    2. Miscellaneous

      1. Number variation with normal distribution

        Entrées:

        • un nombre entier N
        • une amplitude A

        Sorties:

        • un nombre entier

        Cet algorithme calcul la variation autour d'un nombre N, avec une amplitude A, en utilisant une répartition binomiale symétrique comprise aléatoirement entre [-6.0; 6.0[ avec les probabilités suivantes:

        NumberProbability
        [-6.0; -4.5[0.000%
        [-4.5; -3.5[0.013%
        [-3.5; -2.5[0.562%
        [-2.5; -1.5[6.248%
        [-1.5; -0.5[24.303%
        [-0.5; 0.5[37.748%
        [0.5; 1.5[24.303%
        [1.5; 2.5[6.248%
        [2.5; 3.5[0.562%
        [3.5; 4.5[0.013%
        [4.5; 6.0[0.000%

        L'amplitude détermine le facteur multiplicatif:

        Amplitude AFactor F
        00
        10.5
        21
        32
        nn-1

        Le résultat final s'obtient avec la formule:
        f (N, F) = N + round (F * binomial ())

        La variation du nombre [=round (F * binomial ())] en fonction de l'amplitude est:

        Amplitude 0 (Factor 0)
        VariationProbability
        0100.000%
        Amplitude 1 (Factor 0.5)
        VariationProbability
        -20.105%
        -116.063%
        067.664%
        +116.063%
        +20.105%
        Amplitude 2 (Factor 1)
        VariationProbability
        -40.013%
        -30.562%
        -26.248%
        -124.303%
        037.748%
        +124.303%
        +26.248%
        +30.562%
        +40.013%

        Exemple pour N=6 et A=2:
        Le facteur multiplicatif est 1, la formule est donc: f (6, 1) = 6 + round (1 * binomial ())

        Les résultats possibles de f (6, 1) sont:

        NumberProbability
        20.013%
        30.562%
        46.248%
        524.303%
        637.748%
        724.303%
        86.248%
        90.562%
        100.013%

        Exemple pour N=5 et A=1:
        Le facteur multiplicatif est 0.5, la formule est donc: f (5, 0.5) = 5 + round (0.5 * binomial ())

        Les résultats possibles de f (5, 0.5) sont:

        NumberProbability
        30.105%
        416.063%
        567.664%
        616.063%
        70.105%

        La répartition binomiale est utilisée pour calculer:

        • la production des exploitations
        • la variation du prix su Smithore
        • le nombre de terres à vendre chaque tour
      2. Store to plot distance

        Entrées:

        • la position de la terre

        Sorties:

        • la distance de la terre au store
        Tout multiplié par 2

        Cet algorithme calcul la distance d'une terre au store, en prenant en compte un malus pour la rivière.

        Les distances entre chaque terre et le store sont les suivantes:

        444454444
        432232234
        4321 1234
        432232234
        444454444
        

        La distance est utilisée pour calculer:

        • la qualité d'une terre
        • le temps de déplacement lors d'une action d'un ordinateur

        La distance ne prends pas en compte les montagnes.

    3. Computers AI

      1. Computer goods rating AI

        Entrées:

        • le nombre de rounds à simuler

        Sorties:

        • la qualité des biens [0; 31]

        Cet algorithme est utilisé par l'AI:

        • lors de la sélection de la terre (3 rounds simulés) land grant AI
        • lors du placement des exploitations (2 rounds simulés) player turn AI
        map of land rating (land grant AI) player turn AI

        Chacun des biens est noté (de 0 à 31) en fonction des prix simulés.

        Pour chaque round à simuler, on effectue:

        • production (sans malus d'Energy) du Food et de l'Energy (mais pas du Smithore)
        • calcul du prix simulé pour le Food, Energy et Smithore (avec Usage, pas de Spoilage, construction des mules avec le Smithore)

        La qualité d'un bien est alors égale à la moyenne des prix du bien sur les rounds simulés divisé par 8.

        La qualité du Crystite est égal à: (100 + 4 * n° du round courant) / 8

      2. Computer exploitation rating AI

        Entrées:

        • le type d'exploitation
        • la terre concernée
        • le joueur concerné
        • la qualité du bien pour ce type d'exploitation [0; 255]
        • le type de calcul (réel ou simulé)

        Sorties:

        • la qualité de l'exploitation
        Utilisé par: - player turn AI - computer best exploitation AI ***

        Si ce n'est pas le premier round et ce n'est pas pour une land auction, la qualité du bien est modifié en fonction de son type (Food ou Energy) et de la situation du jeu. Cela reflète l'importance accordé à un bien donné face à une difficulté particulière. Un seul bonus peut être ajouté:

        • si le bien est du Food:

          • si le joueur n'est pas en manque de Food après Usage, Spoilage, Prod

            • si le joueur a au moins une exploitation de Food

              • aucun bonus
            • si le joueur n'a aucune exploitation de Food

              • bonus de 11
          • si le joueur est en manque de Food après Usage, Spoilage, Prod

            • si la colonie n'est pas en Shortage de Food

              • bonus de 10
            • si la colonie est en Shortage de Food

              • bonus de 14
        • si le bien est de l'Energy:

          • si le joueur est en manque d'Energy après Usage, Spoilage, Prod

            • si la colonie n'est pas en Shortage d'Energy

              • bonus de 11
            • si la colonie est en Shortage d'Energy

              • bonus de 15
          • si le joueur n'est pas en manque d'Energy après Usage, Spoilage, Prod

            • si le nombre d'exploitation d'Energy du joueur représente moins du 1/4 des exploitations du joueur

              • bonus de 12
            • si le nombre d'exploitation d'Energy du joueur est égal au 1/4 des exploitations du joueur

              • si la colonie n'est pas en Shortage d'Energy

                • bonus de 11
              • si la colonie est en Shortage d'Energy

                • bonus de 15
            • si le nombre d'exploitation d'Energy du joueur représente plus du 1/4 des exploitations du joueur

              • aucun bonus

        La capacité de production de la terre (avec les bonus économiques, sans variation binomiale) est ensuite calculée pour ce type d'exploitation et ce joueur avec le type de calcul souhaité (réel ou simulé). Elle est borné par [0; 8].

        La qualité de la terre, pour ce type d'exploitation et ce joueur, est calculée en multipliant la qualité du bien (additionné de son bonus) par la capacité de production de la terre.

      3. Computer best exploitation rating AI

        Entrées:

        • la terre concernée
        • le joueur concerné
        • la qualité de tous les biens [0; 31]
        • le type de calcul (réel ou simulé)

        Sorties:

        utilisé par: - map of land rating AI (land grant) - player turn AI - computer land auction AI
        • le type d'exploitation
        • la qualité de l'exploitation [0; 255]

        Cet algorithme recherche le meilleur type d'exploitation pour une terre et un joueur donné en fonction de la qualité des biens et du type de calcul. Pour cela, il calcule la qualité de chaque exploitation possible sur la terre en prenant en compte:

        • qu'il n'y a pas de Crystite au niveau Beginner et Standard
        • qu'il ne peut pas y avoir de Smithore ni de Crystite sur la rivière
Visitors visitors since 05/01/2006. Sitemap
Copyright © 2006-2020 by Kroah. Total or partial reproduction forbidden.
All trademarks and copyrights are the property of their respective owners. All rights reserved.
Email Me      Get Firefox Powered by PHPEdit      Valid XHTML 1.1 Valid CSS