Simulating Resource Output, Building Construction, and Unit Mobilizations

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Simulating Resource Output, Building Construction, and Unit Mobilizations

      I'm kicking off a thread to collect feedback for the Resource Output, Building Construction, and Unit Mobilization simulator I'm taking a run at writing.

      So far I'm
      • Approximating Morale evolution from Day to Day (Thanks @Zozo001)
        • The Morale calculation is a little pessimistic (it tops out about 1 percentage-point below the max I saw in some real-game data I have)
      • Using the changing Morale and a constant population to compute cities' daily Resource output for cities (Supp/Comp/Fuel/Rare/Elec) (Thanks @playbabe)
      I think the next step is approximating daily population growth and feeding that into the Resource production results.

      The goal is being able to put in a description of a hypothetical game's progress, and being able to determine what/when buildings and units can be produced, and what/when research projects that can be finished.
      Along with specifying when to start mobilizations, constructions, and research projects, user-inputs will include specifying expected market purchases/sales, daily morale penalties, and expected city conquests/annexations.

      The current simulation results:

      On Day 1, Home City TestCity with 6.00 Population, 70.0 Morale, and 0.0 Distance, produces 1,786.1 Supp per Day = 74.4 Supp per Hour
      On Day 2, Home City TestCity with 6.00 Population, 72.0 Morale, and 0.0 Distance, produces 1,821.8 Supp per Day = 75.9 Supp per Hour
      On Day 3, Home City TestCity with 6.00 Population, 73.0 Morale, and 0.0 Distance, produces 1,839.6 Supp per Day = 76.7 Supp per Hour
      On Day 4, Home City TestCity with 6.00 Population, 74.0 Morale, and 0.0 Distance, produces 1,857.5 Supp per Day = 77.4 Supp per Hour
      On Day 5, Home City TestCity with 6.00 Population, 75.0 Morale, and 0.0 Distance, produces 1,875.4 Supp per Day = 78.1 Supp per Hour
      On Day 6, Home City TestCity with 6.00 Population, 76.0 Morale, and 0.0 Distance, produces 1,893.2 Supp per Day = 78.9 Supp per Hour
      On Day 7, Home City TestCity with 6.00 Population, 77.0 Morale, and 0.0 Distance, produces 1,911.1 Supp per Day = 79.6 Supp per Hour
      On Day 8, Home City TestCity with 6.00 Population, 78.0 Morale, and 0.0 Distance, produces 1,928.9 Supp per Day = 80.4 Supp per Hour
      On Day 9, Home City TestCity with 6.00 Population, 78.0 Morale, and 0.0 Distance, produces 1,928.9 Supp per Day = 80.4 Supp per Hour
      On Day 10, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 11, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 12, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 13, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 14, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 15, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 16, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 17, Home City TestCity with 6.00 Population, 79.0 Morale, and 0.0 Distance, produces 1,946.8 Supp per Day = 81.1 Supp per Hour
      On Day 18, Home City TestCity with 6.00 Population, 76.0 Morale, and 0.0 Distance, produces 1,893.2 Supp per Day = 78.9 Supp per Hour
      On Day 19, Home City TestCity with 6.00 Population, 75.0 Morale, and 0.0 Distance, produces 1,875.4 Supp per Day = 78.1 Supp per Hour

      On Day 20, Home City TestCity with 6.00 Population, 75.0 Morale, and 0.0 Distance, produces 1,875.4 Supp per Day = 78.1 Supp per Hour

      The post was edited 1 time, last by KFGauss ().

    • KFGauss wrote:

      The Morale calculation is a little pessimistic (it tops out about 1 percentage-point below the max I saw in some real-game data I have)
      I think this is the consequence of the roundoff issue, rather than being pessimistic. The formula provides the average expectation value, based on the input given (which has +/-0.5 uncertainty in all its terms). So real results would come out either a bit above, or a bit below, but scatter around that mean level calculated.
      Commander Zozo001 :thumbsup:
      humble player
    • playbabe wrote:

      How did morale fall and population dont even growing
      Well he stated that a constant population is modeled. The morale should reach its target, however (with possibly a slight overshooting) - so the real question is why it went up so high, 4% above target, and then not come down immediately? This seems like an implementation error, as my formula does not do this in a spreadsheet.
      Commander Zozo001 :thumbsup:
      humble player
    • playbabe wrote:

      How did morale fall and population dont even growing
      Currently Population is constant. The program doesn't change population from day-to-day yet.

      What you see in the original post uses At-War and Civilian-Casualty morale penalties I wrote down while I was playing my recent PT game. Those penalties went up and down (that's normal).

      I'll add the penalties to what I'm printing, and put the results in the new thread I mentioned in my previous post.
    • Dealer of Death wrote:

      KFG won't be happy until he's reduced the game to equations.

      K2/x -[h7 + 2h-34]
      Knowledge is power.

      Also - Clarifying how things work and letting people experiment with the result, sort of does the exact opposite of what you seem to be saying.

      That's because the part of the game that can't be turned into a simulation full of equations is precisely each player's on-the-fly cleverness, adaptability, strategic thinking/planning skills, and poker-playing ability.

      For me at least (beyond the satisfaction of figuring out a puzzle) a decent planning tool puts a cork in some of the debating over whether fish or bicycles are more important when playing CoN.

      But, good simulations aren't the end of the story.

      Some fiction from my past that informs my current attitude is here (search for the title "The Bully And The Crazy Boy" once you navigate to the web page): archive.org/stream/gentleseduc…eseduction00stie_djvu.txt


      There's another similar(ish) story I remember, but I don' remember enough keywords to find it in the web.

      The post was edited 1 time, last by KFGauss ().

    • KFGauss wrote:

      Dealer of Death wrote:

      KFG won't be happy until he's reduced the game to equations.

      K2/x -[h7 + 2h-34]
      Knowledge is power.
      Also - Clarifying how things work and letting people experiment with the result, sort of does the exact opposite of what you seem to be saying.

      That's because the part of the game that can't be turned into a simulation full of equations is precisely each player's on-the-fly cleverness, adaptability, strategic thinking/planning skills, and poker-playing ability.

      For me at least (beyond the satisfaction of figuring out a puzzle) a decent planning tool puts a cork in some of the debating over whether fish or bicycles are more import when playing CoN.

      But, good simulations aren't the end of the story.

      Some fiction from my past that informs my current attitude is here (search for the title "The Bully And The Crazy Boy" once you navigate to the web page): archive.org/stream/gentleseduc…eseduction00stie_djvu.txt


      There's another similar(ish) story I remember, but I don' remember enough keywords to find it in the web.
      Oh, lol, I was just yanking your chain.

      I actually appreciate your knowledge and expertise in this arena and commend your skills in simulation construction and treatment of data. It is your Hall Monitor attitude that I find distasteful and chaps my ass. And I find it inexplicable that someone sporting a Calvin and Hobbes avatar would be so devoid of a sense of humor.
      *** The Creator of Zombie Farming ***
      The KING of CoN News!!!
      The "Get off my lawn!" cranky CoN Forums Poster - not affiliated with Dorado in any way


      "Death comes to us all. Shall I deal you in?" - DoD
    • Dealer of Death wrote:

      Oh, lol, I was just yanking your chain.
      I actually appreciate your knowledge and expertise in this arena and commend your skills in simulation construction and treatment of data. It is your Hall Monitor attitude that I find distasteful and chaps my ass. And I find it inexplicable that someone sporting a Calvin and Hobbes avatar would be so devoid of a sense of humor.
      Consider it successfully yanked. :)

      Yep and people who insist on making fart noises during serious conversations (instead of during the unserious ones) chap my ass. Especially when part of why they do it appears to be for a reason as stupid as earning a forum rank.

      While we're passing out compliments, the Ask DoD thread was and is a good one. Maybe it needs a bump once every couple of weeks?

      The post was edited 1 time, last by KFGauss ().

    • Status update for the simulator:

      During a project like this one I expect to shift back and forth between implementing algorithms and putting those algorithms into a program that will use them in several game-days worth of calculations.

      When I was in the middle of figuring out how to do the Population Growth calculations I decided I needed to spend a little time on the program that will be wrapped around them.

      This boring little set of printouts is about being able to tell the program to simulate 20 game-days, one minute at a time.

      In this run I started up two 5-city countries. The city names are a mashup of what the cities' produce and the city names from my last game.

      I'm thinking that user will enjoy being able to simultaneously simulate and compare at least two countries that are researching and producing different units.

      Each country and city history has 28,800 entries because 20 days contain 28,800 minutes.

      Country BLUE Country's status history has 28,800 entries
      • City SuppUlgi's status history has 28,800 entries
      • City CompKhov's status history has 28,800 entries
      • City FuelToso's status history has 28,800 entries
      • City ElecUlia's status history has 28,800 entries
      • City RareAlta's status history has 28,800 entries
      Country RED Country's status history has 28,800 entries
      • City SuppUlgi's status history has 28,800 entries
      • City CompKhov's status history has 28,800 entries
      • City FuelToso's status history has 28,800 entries
      • City ElecUlia's status history has 28,800 entries
      • City RareAlta's status history has 28,800 entries
    • Lol. If I were the game developers, seeing this would make me implement random variations into the actual output of a given city each given day. :)

      In part I appreciate this and have thought about scripting rough estimations to help myself plan.

      However, it also bugs me... let me explain.

      I think there are 3 main aspects of play in CoN:
      * Economy/Strategy - meaning picking military technologies that give you a useful array of tools and setting up production to support mobilization
      * Tactics - meaning your ability to use the units you have to take land and destroy units while loosing few to none of your own
      * Monitoring - meaning how often you check the game and can respond to changes in circumstances

      1. The last aspect (monitoring) varies a lot from player to player and in my opinion this is the biggest shortcoming of CoN - You can't play super competitively unless you put CoN at the top of your real life priorities and commit to routinely checking.
      2. The second aspect (tactics) are probably the most interesting part of the game, but depend quite a lot on the other 2 aspects in terms of what and how many units you have available and whether you can employ micro-management heavy tactics (like using single infantry to take all unoccupied lands while stopping and going a different direction if you find one occupied).
      3. This brings me back to the first aspect and my main point... if you calculate economy to perfection with a computer, it becomes a massive advantage for the players who has the script OR it shifts more weight to the other 2 aspect if both players use the script. That means more of the game is determined by monitoring (the biggest short-coming of the game IMO) and tactics since economy is no longer a factor. This is why I am also a bit annoyed by this project as well. :)

      Just a commentary since your topic perked my interest. Good luck with your efforts! :)
    • Rainmaker2112 wrote:

      Lol. If I were the game developers, . . .


      . . .

      Just a commentary since your topic perked my interest. Good luck with your efforts! :)
      My imagined future is that this or something like it will let players plan and execute a strategy more easily (when/if I can finish and distribute the simulation). Of course the player's opponents will get a "vote".

      Before a game players will be able to plan the "When", "What Level", and "How Many" for the units in their army; and that plan will be the result of creating several what-if scenarios and choosing the scenario they think will work best for them.

      They'll be able to do that planning whether they've played 1000 previous games or 1.

      However, when it comes to choosing, adjusting, and executing a plan I think the 1000-game player should have the advantage (as they should).
    • Tonight's progress
      • Using morale values I recorded during my last game,
      • I used the @playbabe algorithms to predict Population Growth and City-Resource Production
      • The Population values match my in-game results very well
        • The current population growth figures don't include Buildings' effects (Hospitals)
      • I assume the Resource Production values are pretty good (@'playbabe''s formula is pretty good)
        • <edit> The Resource/Minute values below are FUBAR (too low). The was a mistake in my software, not in Playbabe's formula - DOH! <\edit>
        • During my game I recorded my countries total resource production, but didn't record each individual city's output - DOH!
        • The current output figures don't include Buildings' effects (Air Bases, Naval Bases, Arms Industries)
      In the tables, "NAN" stands for "Not A Number" and appears in the rightmost columns because the game ended at the start of Day 18.

      BLUE Country's Morale GAME DATA
      CITY 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
      Ulgi: 70.0 75.0 79.0 83.0 86.0 89.0 92.0 95.0 97.0 99.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 NaN NaN
      Khov: 70.0 72.0 73.0 74.0 75.0 76.0 77.0 78.0 79.0 80.0 81.0 79.0 80.0 81.0 79.0 80.0 79.0 76.0 NaN NaN
      Toso: 70.0 72.0 73.0 74.0 75.0 76.0 77.0 78.0 79.0 80.0 81.0 79.0 80.0 81.0 79.0 80.0 79.0 76.0 NaN NaN
      Ulia: 70.0 72.0 73.0 74.0 75.0 76.0 77.0 78.0 79.0 80.0 81.0 79.0 80.0 81.0 79.0 80.0 79.0 76.0 NaN NaN
      Alta: 70.0 72.0 73.0 74.0 75.0 76.0 77.0 78.0 79.0 80.0 81.0 79.0 80.0 81.0 79.0 80.0 79.0 76.0 NaN NaN

      BLUE Country's Population PREDICTIONS
      CITY 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
      Ulgi: 6.00 6.03 6.11 6.19 6.27 6.36 6.44 6.52 6.61 6.69 6.77 6.85 6.94 7.01 7.07 7.12 7.17 7.23 NaN NaN
      Khov: 5.00 5.06 5.20 5.34 5.48 5.62 5.76 5.91 6.03 6.11 6.20 6.28 6.36 6.44 6.53 6.61 6.69 6.77 NaN NaN
      Toso: 5.00 5.06 5.20 5.34 5.48 5.62 5.76 5.91 6.03 6.11 6.20 6.28 6.36 6.44 6.53 6.61 6.69 6.77 NaN NaN
      Ulia: 5.00 5.06 5.20 5.34 5.48 5.62 5.76 5.91 6.03 6.11 6.20 6.28 6.36 6.44 6.53 6.61 6.69 6.77 NaN NaN
      Alta: 4.00 4.13 4.43 4.75 5.03 5.17 5.31 5.46 5.61 5.76 5.91 6.03 6.11 6.20 6.28 6.36 6.44 6.52 NaN NaN

      BLUE Country's City Resource/Minute PREDICTIONS
      CITY 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
      Ulgi.Supp: 1.240 1.242 1.247 1.252 1.257 1.261 1.266 1.271 1.276 1.281 1.286 1.291 1.296 1.300 1.303 1.306 1.310 1.313 NaN NaN
      Khov.Comp: 1.013 1.015 1.022 1.030 1.037 1.044 1.051 1.059 1.065 1.069 1.073 1.077 1.081 1.086 1.090 1.094 1.098 1.102 NaN NaN
      Toso.Fuel: 1.181 1.185 1.193 1.201 1.209 1.218 1.226 1.235 1.242 1.247 1.252 1.257 1.262 1.267 1.271 1.276 1.281 1.286 NaN NaN
      Ulia.Elec: 0.844 0.846 0.852 0.858 0.864 0.870 0.876 0.882 0.887 0.891 0.894 0.898 0.901 0.905 0.908 0.912 0.915 0.919 NaN NaN
      Alta.Rare: 0.540 0.557 0.599 0.641 0.676 0.681 0.686 0.691 0.695 0.701 0.706 0.710 0.713 0.715 0.718 0.721 0.724 0.726 NaN NaN

      The post was edited 1 time, last by KFGauss ().

    • This is just a little FYI for folks like me who are interested in teasing out or confirming Morale and Population change forumlae.

      Right now, for my project I'm running a country in a simple Flashpoint game and I'm not doing anything (no mobilizing, no market purchases, no construction, no wars) other than writing down my country's stats. I'm recording population, resource, production, and morale values hourly (when I'm not taking care of the rest of my life).

      One thing I'm hoping will bear fruit is that I'm going to try to use production rate changes between 23:59 and 00:01 for a few days to figure out exactly what moral changes were from one day to the next. I think I'll be able to do that because my civilian casualties are zero. The only reason Morale is changing is that the game is shrinking the gap between my morale target (90%) and my current morale.

      Of course during the rest of each day the only reason production rate change should be my population changes.

      I have a question for the Forum: When I look at my country's status (the popup that also shows you who you are At War with), I see an Average Morale value - Does anyone know how that number is calculated? Searching for "average morale" didn't turn up anything useful.
    • KFGauss wrote:

      I have a question for the Forum: When I look at my country's status (the popup that also shows you who you are At War with), I see an Average Morale value - Does anyone know how that number is calculated? Searching for "average morale" didn't turn up anything useful.

      The "average morale" is basically an average of the morale of your provinces. I assume it's calculated by adding up the current morale of all your provinces and dividing by 100.
      "CoN is a game of 80% skill and 20% luck" - Tifo_14

      "I don't get paid enough to do anything" - Germanico

      Nothing stops the Tifo :thumbup:
    • Tifo_14 wrote:

      KFGauss wrote:

      I have a question for the Forum: When I look at my country's status (the popup that also shows you who you are At War with), I see an Average Morale value - Does anyone know how that number is calculated? Searching for "average morale" didn't turn up anything useful.
      The "average morale" is basically an average of the morale of your provinces. I assume it's calculated by adding up the current morale of all your provinces and dividing by 100.
      OK & Thanks - I had hoped it included more than just the provinces so that I could use it to get a better handle on my cities' morale changes. :(

      It's nice that the average morale contains a decent level of precision. It's disappointing that it seems to be a fairly useless parameter to know.

      I'd gladly buy a really nice dinner for anyone Dorado who increased the city morale and population values' displayed-precision. :)