Thoughtful development, Turns 2..13

For topics that do not fit in another sub-forum.

Moderator: Oberlus

Message
Author
Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Thoughtful development, Turns 2..7

#31 Post by Uriuk »

1 turn every two weeks
This is factual error.

You made an assumption, that this is my first game. But that's wrong assumption. Your next assumption might be that I lie about the first. But this will be incorrect too (incorrect in 2 ways: 1) wrong and 2) impolite).

Wrong facts and wrong assumptions lead to wrong conclusions.

User avatar
Oberlus
Cosmic Dragon
Posts: 3028
Joined: Mon Apr 10, 2017 4:25 pm

Re: Thoughtful development, Turns 2..7

#32 Post by Oberlus »

Uriuk wrote: Wed Feb 12, 2020 11:44 am
1 turn every two weeks
This is factual error.
I'm sorry, you're right.
Game begun 1st January, so it's been 6 days per turn, not 2 weeks.
Uriuk wrote: Wed Feb 12, 2020 11:44 amYou made an assumption, that this is my first game. But that's wrong assumption.
I'm sorry I indeed made such assumption. I understood by your comments on this 7-turns game that you didn't know anything about how are galaxies, what techs are interesting to get first, what could do the AI, if it was appropriate to use colony ships as scouts, etc. So I assumed without questioning you that this was your first game. Also, when some forum users questioned your arguments and recommended you to play more games to get experience instead of trying to predict the best strategy out of the box, your answers didn't indicate that you had any previous experience (only that you were confident on your uninformed calculations).
Uriuk wrote: Wed Feb 12, 2020 11:44 amYour next assumption might be that I lie about the first.
No, I trust you. I have no reasons not to.
I hope my above statement gives you a plausible explanation for my wrong assumptions that does not include considering you a liar.
But this will be incorrect too (incorrect in 2 ways: 1) wrong and 2) impolite).
Indeed calling someone a liar would be quite impolite.

Now I'm curious of how many games did you play (either till the end or partially) before starting the one on this thread. But don't feel obliged to answer.

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Turn 7

#33 Post by Uriuk »

At the turn 7 the ruled civilization meets an another life in the galaxy.
Fortunately that encountered specie don't achieve high level of concision, and don't have space program.

Several types of situation development is possible.
1) Focus on space exploration to establish second colony first
2) The focus on inftrastructure and production development on the homeworld as a preparation to the attack
3) Direct attacking with minimal forces (its possible with non 100% probability and losses)
4) Definitive attack with unstoppable forces

Do they able to see my spy satellite?
Scouts of Etty species have Stealth = 5
Special Moderate Tech Native gives Detection = 20
I think they should discover the satellite and see it clearly.

Is it good idea to make natives turn into AI players with time or with key events like alien discovery?

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Turn 7

#34 Post by Uriuk »

In order to calculate and compare different plans, I need to know how growth is calculated, to make projections of population, production and research for next several turns. This is necessary to calculate total production and scientific output of different plans.

And I was unable to find explanations of growth mechanics.

In particular, I want to know what is better - to postpone history analyzer, and build troopships, or to finish analyzer and lose points from the several turns of second planet output. Intuitively the former is better, but I want to see it in numbers.

Force-Energy structures tech have a description:
Increases the growth of resource and infrastructure meters below target value to 3 per turn, and the decay of resource meters above target value to 5 per turn.
But looking to actual growth, it's possible to observe, that it's non-linear (may be it's related to simultaneous population growth, may be not).

The following actions affect the industry and research output:
- number of turn when history analyzer is finished
- number of turn when planetary focus is changed from research to production
- number of turn when TroopShip fleet completed
- number of turn when the second planet is captured (it's tied to previous one with a constant number of turns, distance of flight)

User avatar
Oberlus
Cosmic Dragon
Posts: 3028
Joined: Mon Apr 10, 2017 4:25 pm

Re: Thoughtful development, Turns 2..7

#35 Post by Oberlus »

Instead of calculating the outcome of each decission, you could try to simulate it.

Two alternatives here:
- Spreedsheet magic (make sure to know the equations for each thing first). But be aware this is like chess: the number of possible choices grow exponentially with the number of steps of depth you consider.
- Play the game until certain moment whatching what happens, reload an replay for each possible decision.
Uriuk wrote: Fri Feb 14, 2020 8:13 am Force-Energy structures [...] looking to actual growth, it's possible to observe, that it's non-linear (may be it's related to simultaneous population growth, may be not).
The tech refers to each planetary meter. Each planet can increase or decreae it's output by a maximum of +/-1 without this tech, +3 or -5 with FES. So yes, it's related to the growth of multiple planets simultaneously, and some of them will reach it's maximum sooner than others so growth rate will vary.
I need to know how growth is calculated
Which growth? Population? Production/Research output?

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Turn 7

#36 Post by Uriuk »

Oberlus wrote: Fri Feb 14, 2020 9:10 am Which growth? Population? Production/Research output?
These three (there are other meters like "trade", which are unimportant now)
Oberlus wrote: Fri Feb 14, 2020 9:10 am Each planet can increase or decreae it's output by a maximum of +/-1 without this tech
No! It's not +1/-1 change!
I used your approach with saves and reloads and here are my observations:
Turn 7
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 22.914 Init: 22.042

METER_TARGET_INDUSTRY: Cur: 11.021 Init: 10.495
METER_INDUSTRY: Cur: 11.021 Init: 10.495

METER_TARGET_RESEARCH: Cur: 9.4084 Init: 9.1981
METER_RESEARCH: Cur: 9.4084 Init: 9.1981

======
Turn 8
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 23.621 Init: 22.914

METER_TARGET_INDUSTRY: Cur: 11.457 Init: 11.021
METER_INDUSTRY: Cur: 11.457 Init: 11.021

METER_TARGET_RESEARCH: Cur: 9.5829 Init: 9.4084
METER_RESEARCH: Cur: 9.5829 Init: 9.4084

======
Turn 9
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 24.183 Init: 23.621

METER_TARGET_INDUSTRY: Cur: 11.811 Init: 11.457
METER_INDUSTRY: Cur: 11.811 Init: 11.457

METER_TARGET_RESEARCH: Cur: 12.086 Init: 11.874
METER_RESEARCH: Cur: 11.408 Init: 10.408

======
Turn 10
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 24.623 Init: 24.183

METER_TARGET_INDUSTRY: Cur: 12.092 Init: 11.811
METER_INDUSTRY: Cur: 12.092 Init: 11.811

METER_TARGET_RESEARCH: Cur: 12.255 Init: 12.086
METER_RESEARCH: Cur: 12.255 Init: 11.408

======
Turn 11
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 24.962 Init: 24.623

METER_TARGET_INDUSTRY: Cur: 12.311 Init: 12.092
METER_INDUSTRY: Cur: 12.311 Init: 12.092

METER_TARGET_RESEARCH: Cur: 12.387 Init: 12.255
METER_RESEARCH: Cur: 12.387 Init: 12.255

======
Turn 12
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 25 Init: 24.962

METER_TARGET_INDUSTRY: Cur: 12.481 Init: 12.311
METER_INDUSTRY: Cur: 12.481 Init: 12.311

METER_TARGET_RESEARCH: Cur: 12.489 Init: 12.387
METER_RESEARCH: Cur: 12.489 Init: 12.387

======
Turn 13
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 25 Init: 25

METER_TARGET_INDUSTRY: Cur: 12.5 Init: 12.481
METER_INDUSTRY: Cur: 12.5 Init: 12.481

METER_TARGET_RESEARCH: Cur: 17.5 Init: 17.489
METER_RESEARCH: Cur: 14.387 Init: 13.387


As you can see the sequence (for population)
22.042
22.914
23.621
24.183
24.623
24.962
25

Is looks more quadratic, than linear (I analysed it with "fit" function from Wolfram Alpha)

And this is the only planet here, no "sum of planets"

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Thoughtful development, Turns 2..7

#37 Post by Uriuk »

Oberlus wrote: Fri Feb 14, 2020 9:10 am make sure to know the equations for each thing first
That is what I am asking for.

viewtopic.php?f=15&t=9765&p=80744&hilit ... ula#p80749
says
The base calculation for population increase is PopChange = Current * (Target + 1 - Current)/100
And this looks correct at the current stage of development.

I need formulas, because I don't want to simulate different decision trees by hands, I want to automate that with scripts.

User avatar
Oberlus
Cosmic Dragon
Posts: 3028
Joined: Mon Apr 10, 2017 4:25 pm

Re: Thoughtful development, Turns 2..7

#38 Post by Oberlus »

More specifically:

Each colony (inhabited planet) has a Population and a TargetPopulation (two meters).

TargetPopulation meter is determined by the match "species environment preference - planet environment", modified by certain species traits (e.g. Self-Sustaining), planetary specials (mostly growth specials for organic/robotic/lithic metabolisms, or the star bright for phototrophic species, but there are some more) and the habitability techs (such as Subterranean Habitation or Simbiotic Biology).
If you hover the mouse over the population icon of a colony you can see a breakdown of what is determining the current value of TargetPopulation

(Current) Population meter starts at 1 for every newly created colony (or at 3 once you get certain tech and use the upgraded colony parts), and from there on it uses the formula you've quoted above to determine the change per turn towards TargetPopulation meter.

Each colony also has also another four meters for industrial and scientific production: Industry, TargetIndustry, Research and TargetResearch.

TargetIndustry meter of a colony is determined by traits of the local species, buildings on the planet or connected to it, technologies researched, and the planetary focus set on that planet, as well of some other effects (e.g. the harrasing effect from xenophobic species nearby).
Some of the effects add (or substract) flat bonuses, independent from the population of the colony and (most often) indepent of the planetary focus. Adaptive Automation does that: +5 PPs on every colony, regardless of planetary focus or population. This are very good at start, when populations are small, and get the most from fast-expansion strategies (the more colonies, the merrier).
However, most effects are based on the current population of the meter AND are subject to having set the right planetary focus (e.g. Robotic Production, +0.1 PPs per population of industry-focused planets). These outperform flat bonuses on the long run, and get the mostr from techs that increase population.
Again, a breakdown of all the effects affecting the current and target industry of a colony can be inspected by hovering the mouse over the industry meter icon in each colony.

(Current) Industry meter starts at 0 for newly acquired/founded colonies (only exception is starting HW, that starts at TargetIndustry value), and changes towards TargetIndustry meter at most by +/-1 every turn, or +3/-5 if you got FES tech.
This means, if you have Industry=4.87 and TargetIndustry=4.89 you won't have next turn Industry=5.87 (current + 1), you'll have 4.89 (max(target, current+1)).

All the same for Research and TargetResearch.

You may want to inspect some of the files in default/scripting/species/common and default/scripting/common, among others. There you'll find some more equations useful for your calculations.

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Thoughtful development, Turns 2..7

#39 Post by Uriuk »

Oberlus wrote: Fri Feb 14, 2020 12:18 pm+0.1 PPs per population
I recovered all other history (like Manual History Analyzer :) ):

Researched Techs:
Subterranean Habitation : Turn 5
The Physical Brain : Turn 2
Planetary Ecology : Turn 2
Deception : Before First Turn
Planet Stealth Modifier : Before First Turn
Optical Scanner : Before First Turn
Empire Intelligence Agency : Before First Turn
Armor Plating : Before First Turn
Aggression : Before First Turn
Galactic Exploration : Before First Turn
Predictive Stockpiling : Before First Turn
Self Defense : Before First Turn

=====
Turn 1
METER_TARGET_POPULATION: Cur: 20 Init: 20
METER_POPULATION: Cur: 20 Init: 20

METER_TARGET_INDUSTRY: Cur: 10 Init: 10
METER_INDUSTRY: Cur: 10 Init: 10

METER_TARGET_RESEARCH: Cur: 9 Init: 9
METER_RESEARCH: Cur: 9 Init: 9

=====
Turn 2
METER_TARGET_POPULATION: Cur: 20 Init: 20
METER_POPULATION: Cur: 20 Init: 20

METER_TARGET_INDUSTRY: Cur: 10 Init: 10
METER_INDUSTRY: Cur: 10 Init: 10

METER_TARGET_RESEARCH: Cur: 9 Init: 9
METER_RESEARCH: Cur: 9 Init: 9

=====
Turn 3 (Planetary Ecology complete, Population 20->21)
METER_TARGET_POPULATION: Cur: 21 Init: 21
METER_POPULATION: Cur: 20 Init: 20

METER_TARGET_INDUSTRY: Cur: 10 Init: 10
METER_INDUSTRY: Cur: 10 Init: 10

METER_TARGET_RESEARCH: Cur: 9 Init: 9
METER_RESEARCH: Cur: 9 Init: 9

=====
Turn 4
METER_TARGET_POPULATION: Cur: 21 Init: 21
METER_POPULATION: Cur: 20.726 Init: 20.4

METER_TARGET_INDUSTRY: Cur: 10 Init: 10
METER_TARGET_INDUSTRY: Cur: 10.2 Init: 10

METER_TARGET_RESEARCH: Cur: 9 Init: 9
METER_TARGET_RESEARCH: Cur: 9.08 Init: 9

=====
Turn 5
METER_TARGET_POPULATION: Cur: 21 Init: 21
METER_POPULATION: Cur: 20.99 Init: 20.726

METER_TARGET_INDUSTRY: Cur: 10.363 Init: 10.2
METER_INDUSTRY: Cur: 10.363 Init: 10.2

METER_TARGET_RESEARCH: Cur: 9.1453 Init: 9.08
METER_RESEARCH: Cur: 9.1453 Init: 9.08

=====
Turn 6 (Subterrain Habitation complete, Population 21->25)
METER_TARGET_POPULATION: Cur: 25 Init: 25
METER_POPULATION: Cur: 22.042 Init: 20.99

METER_TARGET_INDUSTRY: Cur: 10.495 Init: 10.363
METER_INDUSTRY: Cur: 10.495 Init: 10.363

METER_TARGET_RESEARCH: Cur: 9.1981 Init: 9.1453
METER_RESEARCH: Cur: 9.1981 Init: 9.1453

So, I now can check some formulas in Libre Office Calc, and ...

The Industry lags one turn from population!
ProductionLag.gif
ProductionLag.gif (60.34 KiB) Viewed 443 times
Growth=Population*(Population+1-Target Population)/100
Population Prediction=MIN(Population+Growth, Target Population)

Production Estimation=Population*0.5

Cultural Archives description says:
Increases Target Research by 5 and Target Industry by half the planet's Population.
At Turn 4 Population is already 20.4 (and with delta +0.33 up to 20.73), but Target Industry is not yet increased. Very strange logic.
But, probably it compensates the necessity to calculate production delta in more complex way in turn 3

I think this is a bug. It's Industry meter, what should lags. Target Industry should be calculated the same turn from the actual population.

User avatar
swaq
Space Dragon
Posts: 336
Joined: Tue Aug 20, 2019 1:56 pm

Re: Thoughtful development, Turns 2..7

#40 Post by swaq »

Uriuk wrote: Sat Feb 15, 2020 2:47 am At Turn 4 Population is already 20.4 (and with delta +0.33 up to 20.73), but Target Industry is not yet increased. Very strange logic.
But, probably it compensates the necessity to calculate production delta in more complex way in turn 3

I think this is a bug. It's Industry meter, what should lags. Target Industry should be calculated the same turn from the actual population.
I just started a test game and found that target industry was increased to 10.2 the same turn population reached 20.4. Can you show a screenshot?

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Thoughtful development, Turns 2..7

#41 Post by Uriuk »

TargetIndustry.gif
TargetIndustry.gif (104.05 KiB) Viewed 423 times
May be I don't understood the difference between "Init" and "Cur"
but look at Population Meter - Cur is 20.73, Init is 20.4

Ophiuchus
Programmer
Posts: 1727
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Thoughtful development, Turns 2..7

#42 Post by Ophiuchus »

Uriuk wrote: Sat Feb 15, 2020 4:22 am May be I don't understood the difference between "Init" and "Cur"
but look at Population Meter - Cur is 20.73, Init is 20.4
Init is the value before effects are applied - many effects in FOCS (those which do not use "Value" or "Value(..)") use the Initial value as a base for calculation.

During evaluation the current value (aka "Cur") changes. What you see is the final value of Current, so after applying all effects.

When predictions for the next turn are made (e.g. growth/expected changes in UI) in that context Init would be effective value and Cur the prediction for next turn.

Without looking at the code I would expect that population based industry effects take effect one turn after a population change. It may be this is inconsistent though, a short grep supports my expectation (no Value(Target.Population) used when SetTargetIndustry).

Your spreadsheet formula for industry prediction needs to take the population value from the row above.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Uriuk
Pupating Mass
Posts: 99
Joined: Wed Jan 01, 2020 9:06 am

Re: Thoughtful development, Turns 2..7

#43 Post by Uriuk »

So, you just confirmed my observation, that Industry Target is calculated 1 turn later than population growth.
Now, please try to explain, why this should be calculated this way from the logical point of view.
Why not to calculate delta properly on the Turn 3 ?
Basically you just saying - it is programmed this way, do the same. But why? May be it's game code should be corrected.

Ophiuchus
Programmer
Posts: 1727
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Thoughtful development, Turns 2..7

#44 Post by Ophiuchus »

Uriuk wrote: Sat Feb 15, 2020 10:35 am So, you just confirmed my observation, that Industry Target is calculated 1 turn later than population growth.
Now, please try to explain, why this should be calculated this way from the logical point of view.
Why not to calculate delta properly on the Turn 3 ?
Basically you just saying - it is programmed this way, do the same. But why? May be it's game code should be corrected.
I already gave the explanation - read it again please. Your mental model is flawed/does not fit the way the game works. Adjust your mental model accordingly.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 3028
Joined: Mon Apr 10, 2017 4:25 pm

Re: Thoughtful development, Turns 2..7

#45 Post by Oberlus »

Uriuk wrote: Sat Feb 15, 2020 10:35 am calculated 1 turn later than population growth.
...
May be it's game code should be corrected.
It has sth to do with C++-FOCS communication. There's a seemingly unavoidable delay between what backend knows and what FOCS know.
You might want to check out code and see what you could improve.

Post Reply