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.

    • Zozo001 wrote:

      KFGauss wrote:

      Why does the morale do that? I don't know.
      Like I said before, this can be explained by rounding.
      I've been writing and using computer software that includes integer and floating-point calculations for signal processing mathematics and other purposes for decades.

      I understand rounding and I also understand that what is going on isn't explained by "rounding".

      "Rounding" isn't a description of the underlying algorithm producing results that might or might not be getting rounded in this situation.

      In the period shown in my post with the graph snippet, the city's morale had spent 28 days climbing to and (already) reaching what I believe should have been a steady-state value of 95. In that period the entire country's average morale had reached a stable value also.

      Instead, as I wrote earlier in my post with the graph snippet, the city's reported morale value was oscillating between 95 and 94 for several days (I'm at Day 48? right now and the oscillations are still happening).

      The resource output changes are consistent with Morale changes of +/-1, not +/- some tiny change around a stable floating point value.

      If a floating point Morale is oscillating around a floating point target-value, then getting rounded/truncated, and then getting used in the Resource production calculations; all of that would mean that the actual morale change algorithm is noticeably different from the (curve fit?) (useful but apparently not the final answer) equation you described in this thread a while ago.

      All of that would also indicate that the actual Morale change algorithm isn't stable (doesn't produce consistent outputs when fed consistent inputs).

      So, to repeat myself, I don't think we're done explaining what's going on if our answer is "rounding".

      The post was edited 2 times, last by KFGauss ().

    • This link takes you to a GoogleSheets spreadsheet containing 70 Days of (Flashpoint) Iran doing noting except constructing a few buildings, plus a brief at-war period declared by the Game "AI" and perhaps some AI thefts-of-cash.

      docs.google.com/spreadsheets/d…0a2F87kg/edit?usp=sharing

      The records contain 70 days of morale, population, and resource-production values copied from the Browser GUI.

      In the early days I recorded values frequently. In the later days, less often.

      The cities' morale behavior is odd. Instead of stabilizing at some target value it goes up, then down, then up, . . . by one count daily in the later days.

      The resource production figures are also odd. The figures at the top of the browser page often (usually) don't match the figures at the bottom.

      In the early days I overlooked that I could get daily Resource production values from the summary area at the top of the screen. During Day 9 I started recording those.

      Unusual events are recorded in the text notes in the first few rows of the sheet in the column corresponding (roughly) to when they occurred.

      Questions are welcome. The game ended several weeks ago - Let's hope I can remember answers.

      The post was edited 3 times, last by KFGauss ().

    • KFGauss wrote:

      This link takes you to a GoogleSheets spreadsheet containing 70 Days of (Flashpoint) Iran doing noting except constructing a few buildings, plus a brief at-war period declared by the Game "AI" and perhaps some AI thefts-of-cash.

      docs.google.com/spreadsheets/d…0a2F87kg/edit?usp=sharing

      The records contain 70 days of morale, population, and resource-production values copied from the Browser GUI.

      In the early days I recorded values frequently. In the later days, less often.

      The cities' morale behavior is odd. Instead of stabilizing at some target value it goes up, then down, then up, . . . by one count daily in the later days.

      The resource production figures are also odd. The figures at the top of the browser page often (usually) don't match the figures at the bottom.

      In the early days I overlooked that I could get daily Resource production values from the summary area at the top of the screen. During Day 9 I started recording those.

      Unusual events are recorded in the text notes in the first few rows of the sheet in the column corresponding (roughly) to when they occurred.

      Questions are welcome. The game ended several weeks ago - Let's hope I can remember answers.
      First of all, thank you for taking the time and effort to provide this data.

      While I probably didn't see the whole spreadsheet, I did notice the up-down city morale trend in the later part of the game that you pointed out. My guess is that it has something to do with the way Dorado's system adjusts the morale when a war starts or any other morale effect. Usually when a new morale modifier is introduced, the city takes 2 or 3 days to fully reach the new target morale. Also, did you happen to catch signs of potential spy activity, perhaps in the newspaper? Any enemy spy activity in your city usually drops the morale of that city by a few points, even if the spy's action was not to decrease morale.

      By the resource production "figures" being off, do you mean that the total amount of a resource being produced in a city does not match the value that appears under "Production" when you hover over the resource panel (on Desktop)? I've heard of a bug a couple years ago where one resource's value would appear where a different resource's value should be, e.g. the total amount of Oil produced could appear under the Supplies dropdown. Hopefully it's not back again.
      "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 Thank you.

      The data came from Iran and it was sitting in the map corner doing nothing most of the time. The other players weren't interfering with me/Iran (that was nice of them), and Iran's neighbors were inactive (until Finland captured some Russian and Turkish provinces late in the game.

      I recorded each cities' morale modifiers in rows 47 through 51. If you dig through the mountain of data, you can see that they don't explain the morale oscillations.

      So... No Morale modifier changes except for the very few times that I listed in the top rows (like the time the game AI took over and declared a war). In general no morale modifiers were being introduced. The morale was just going up and down for no obvious reason.

      Some quick checks in a few places show that the Daily resource (rows 36 through 42) shown at the top of the browser GUI matches the amount my resource stockpiles (rows 18 through 24) were growing; but those figures from the top of the screen don't match the figures (such as row 87) you see when you look at the city info gotten from the bottom of the browser GUI.

      The bug you described isn't back. Something else is causing the mismatch.
    • KFGauss wrote:

      The cities' morale behavior is odd. Instead of stabilizing at some target value it goes up, then down, then up, . . . by one count daily in the later days.
      To pin this down exactly, one would have to model it to a decimal precision, 0.1%. Which is hard when the displayed values are rounded to integer percentages.

      I think the hardest part is figuring out how exactly the Adj.Prov. modifier changes. Note that when you record 5 or 6, we are really talking about a value somewhere between 4.5-5.5 and 5.5-6.5, resp.!
      Although these are only uncertain to a few tenths of %, their complicated behavior (feedback) may well explain the morale oscillations observed near the target asymptote.

      EDIT: On second thought, homeland province Adj.Prov. modifiers are likely integers, actually. Nevertheless, I think their somewhat chaotic development, coupled with the floating point nature of the rest of morale components, is likely part of the oscillatory behavior.
      Commander Zozo001 :thumbsup:
      humble player

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

    • At various times you've empahsized the difference among floating point and integer stored values, displayed precisions, and truncated or rounded values used in internal calculations.

      I've been writing and using software for scientific uses for decades. I understand those topics and their effects. There's no need to repeat that info for me.

      Keeping all of that in mind, I've still been unable to think of a simple way those effects would create what occured (yet)

      I don't doubt those effects are present in some parts of the software, but . . . They alone don't cause an oscillating result.

      Let's move the conversation past those and focus on teasing the algorithm out of the numbers we have - Or perhaps showing Dorado they have a bug or two in the morale calcs.

      PS: I have the benefit (or curse) of havibg stared at these numbers for a long time. I noticed that whatever is causing the oscillations caused some cities to follow an up-down-up-down-... pattern while others did the opposite (down-up-down-...). Any explanation needs to account for that.
    • Zozo001 wrote:

      KFGauss wrote:

      I noticed that whatever is causing the oscillations caused some cities to follow an up-down-up-down-... pattern while others did the opposite (down-up-down-...).
      An obvious possibility is a small RNG component
      Yeah, randomness is a possibility, and it's one reason (to check for consistency) why I continued collecting the data for 70 days (Ugh!).

      The pattern's consistency across long periods and multiple cities (with some cities perfectly out of phase with the others) went on long enough to make me think that randomness is a very unlikely suspect.
    • Adding a bit of data for the puzzle on neighboring morale dynamics.

      I got an FP game playing Iran, at Day 2 just now. Average morale is 73.55, with the capital at 75%, the rest of cities at 73%.

      I located exactly 1 province (Mehraban) with Neighboring Morale -2; this is one of the 2 provinces that have 2 cities next to them (both happen to have 5 neighboring provinces). The other one is Saveh, one of whose neighbors is the capital; the Neighboring Morale is -1 for this province. The rest of the provinces next to the capital have Neighboring Morale 0.

      All other provinces with city neighbor have Neighboring Morale -1 (and vice versa: all non-zero Neighboring Morale provinces have a city neighbor); their morale is 73%, while the rest of the provinces are at 74%.

      EDIT I've just started another FP game playing Iran, to verify Day 1 morale factors. As I expected, all provinces with city neighbor have Neighboring Morale -1, now including those next to the capital (whose starting morale is 70% like other cities'). The two exceptions are those that have 2 cities next to them (Mehraban and Saveh); their Neighboring Morale is -2 on Day 1.
      Commander Zozo001 :thumbsup:
      humble player

      The post was edited 4 times, last by Zozo001 ().

    • Yep - The province morales were often confusing. There were patches that were usually lower than most for no apparent reason.

      I recorded some info about them in the spreadsheet and I felt like I could sort-of detect some patterns, but frequently their individual changes made no sense to me.

      I did develop a hunch that a city/province is directly influenced by both the location's immediate neighboring provinces and the neighbors of those provinces.

      IIRC when Finland captured Russia, the direct effects in Iran seemed to extend beyond the Iranian provinces immediately adjacent to Russia.

      Those direct effects were different from the daily cascade you would expect as the captured provinces' low-morale contagion spread each day.
    • KFGauss wrote:

      I did develop a hunch that a city/province is directly influenced by both the location's immediate neighboring provinces and the neighbors of those provinces.
      Yeah, based on an earlier dataset I was looking at, this is the case. I mean, on a given day only the immediate neighbors interact I think, but the next day ripple effects combine together. This got too messy for me to figure some definite rules back then, alas...
      Commander Zozo001 :thumbsup:
      humble player
    • I'm totally making a wild guess here: Some apparent inconsistencies in neghboring-province morale effects might come from running through a list of provinces only once to do the calculations.

      First provinces in the list would see different neighboring morales than last provinces in the list would see, because the latter ones would be updated after the first ones had already been updated.
    • KFGauss wrote:

      I'm totally making a wild guess here: Some apparent inconsistencies in neghboring-province morale effects might come from running through a list of provinces only once to do the calculations.

      First provinces in the list would see different neighboring morales than last provinces in the list would see, because the latter ones would be updated after the first ones had already been updated.
      I had a similar thought but I'm pretty sure they should be turn based, so each province (and city) morale (should) be based on the previous turn's moral but I agree it's possible they may not have been coded properly.

      Regardless the whole situation reminds me of a program called the Game of Life.
    • KFGauss wrote:

      At various times you've empahsized the difference among floating point and integer stored values, displayed precisions, and truncated or rounded values used in internal calculations.

      I...

      Keeping all of that in mind, I've still been unable to think of a simple way those effects would create what occured (yet)

      I don't doubt those effects are present in some parts of the software, but . . . They alone don't cause an oscillating result.

      ...
      depends on the programming, because code is essentially turn-based the way a function is written especially if it's intended to truncate a number can do so multiple times (loops or recursively) giving some weird results.

      I think the issue for us is that something isn't exposed, we can see some effects on morale (neighboring provinces, enemy wars, etc) but i think there are some that we can't see. For example distance from capital is supposed to have an effect (and I'm confident it does) but it's not listed.

      We just see "increasing" or "neutral" I think.
    • Hakville wrote:

      . . .
      For example distance from capital is supposed to have an effect (and I'm confident it does) but it's not listed.
      . . .
      Yeah - If you're referring to distance-from-the-capital not appearing in my Iran morale bonus/penalty data, it's absent because it's effect was universally zero.

      All of Iran' original cities are close to Iran's capital; and to minimize perturbing the systems I was trying to study, I didn't do anything with the Iran military, such as intentionally going to war with another country or capturing a far-away city of province.

      Those can be the subject of future experiments.
    • KFGauss wrote:

      Hakville wrote:

      . . .
      For example distance from capital is supposed to have an effect (and I'm confident it does) but it's not listed.
      . . .
      Yeah - If you're referring to distance-from-the-capital not appearing in my Iran morale bonus/penalty data, it's absent because it's effect was universally zero.
      I'm referring to the (I)nfo screen in mobile app, which shows some modifiers... and an indication of overall trend.

      All of Iran' original cities are close to Iran's capital;
      Well, if they aren't 100%...


      and to minimize perturbing the systems I was trying to study, I didn't do anything with the Iran military, such as intentionally going to war with another country or capturing a far-away city of province.
      I wouldn't expect other effects except for the distance from capital, like think upgraded Helicopter distance ~500 vs SF ~1k vs Bomber...
    • Hakville wrote:

      KFGauss wrote:

      Hakville wrote:

      . . .
      For example distance from capital is supposed to have an effect (and I'm confident it does) but it's not listed.
      . . .
      Yeah - If you're referring to distance-from-the-capital not appearing in my Iran morale bonus/penalty data, it's absent because it's effect was universally zero.I'm referring to the (I)nfo screen in mobile app, which shows some modifiers... and an indication of overall trend.

      All of Iran' original cities are close to Iran's capital;
      Well, if they aren't 100%...

      I suspect that the Distance from Capital penalty is only applied in integer increments.

      My hunch comes from only seeing the penalty listed in (Browser GUI) when it's value is 1 or greater.

      If a (short-distance) floating-point penalty was being applied to the Iranian cities I monitored, and if (separately) the penalties were only displayed as integers, I'd expect to see some instances of 0 penalties displayed (when an actual penalty of something like 0.2 was getting displayed as 0).

      Because I didn't see any zero-valued Distance Form Capital penalties in Iran, I don't think that any of Iran's home cities were suffering from any Distance-From-Capital penalties.

      I dunno while the Mobile App doesn't show any Distance-From-Capital penalties - Sounds like a reportable bug.