pop suitability report conflicts
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
pop suitability report conflicts
A number of times I've run into situations where the suitability report said a colony would do fine, but on colonizing the colony promptly died. I finally figured out what was going on-- a few of the population techs (such as Subteranean Habitation) have a requirement that the population suitability report is not currently handling properly when there is an Eccentric Orbit special present. This is the requirement that TargetPopulation be at least zero (which incidentally is not reflected in their Pedia description, at least not for Sub Hab). In the screenshot below, my empire had SubHab researched, and the suitability report appears to think it applies and shows a positive target pop, but as can be seen in the tooltip detail it does not apply and the actual target pop is negative. I think this probably stems from the fact that the population techs are applied in the species Effects processing phase whereas the Eccentric Orbit effect gets processed after. A normal turn has multiple rounds of effects processing to get things to work out "right" in this situation, but the suitability report does not and so gets it wrong.
One possible solution would probably be to move the Eccentric Orbit population effect into species.txt where all the other pop modifiers are processed. That's probably fairly straightforward. Of course, we'd also have to mention the target pop restriction in the appropriate Pedia articles.
Another possible solution would probably be to have the suitability report do the multi-round effect processing; this is also probably at least theoretically fairly straightforward except I've forgotten too much about this handling to say anything concrete. Again, some Pedia correction would be needed.
A third solution would just be to remove that (target pop >= 0) requirement from these techs (and I think growth focus is the same situation). I vaguely recall there having been some discussion of a reason for it before, to avoid making it too easy to colonize everything, but I just don't think it really makes a whole lot of practical difference on that front, and it is seeming to me to be a clear KISS violation. After all this time, we programmers had been unable to get the Suitability Report correct, and even after I noticed a problem with colonies dying it took me a while to figure out the cause, so how can that be considered "simple"? This solution would be the most straightforward of all, and to my eye has policy in its favor as well.
One possible solution would probably be to move the Eccentric Orbit population effect into species.txt where all the other pop modifiers are processed. That's probably fairly straightforward. Of course, we'd also have to mention the target pop restriction in the appropriate Pedia articles.
Another possible solution would probably be to have the suitability report do the multi-round effect processing; this is also probably at least theoretically fairly straightforward except I've forgotten too much about this handling to say anything concrete. Again, some Pedia correction would be needed.
A third solution would just be to remove that (target pop >= 0) requirement from these techs (and I think growth focus is the same situation). I vaguely recall there having been some discussion of a reason for it before, to avoid making it too easy to colonize everything, but I just don't think it really makes a whole lot of practical difference on that front, and it is seeming to me to be a clear KISS violation. After all this time, we programmers had been unable to get the Suitability Report correct, and even after I noticed a problem with colonies dying it took me a while to figure out the cause, so how can that be considered "simple"? This solution would be the most straightforward of all, and to my eye has policy in its favor as well.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: pop suitability report conflicts
Possibly related: Self Sustaining species find it hard to colonise Poor (which is virtually everywhere for Trith), and I assume that might be linked to SubHab not kicking in properly.
Given that creating one of those reports already takes a fair bit of processing time I'm loath to see it take even longer.
Moving Eccentric Orbit malus into species would work, but if so I think it ought to be a generalised effect that could then be applied in other ways (for example the last Generator that no one uses as the population malus is too big) and possibly made planet size dependent.
If removing the target pop => 0 requirement for subhab also fixes Trith so they can colonise Poor planets with the first three techs then I approve generally anyway.
Given that creating one of those reports already takes a fair bit of processing time I'm loath to see it take even longer.
Moving Eccentric Orbit malus into species would work, but if so I think it ought to be a generalised effect that could then be applied in other ways (for example the last Generator that no one uses as the population malus is too big) and possibly made planet size dependent.
If removing the target pop => 0 requirement for subhab also fixes Trith so they can colonise Poor planets with the first three techs then I approve generally anyway.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: pop suitability report conflicts
Or just remove the Eccentric Orbit special. It's one of the oldest, from the group I originally added like slow rotation, high axial tilt, etc. that were just physical characteristics. Most of these are less interesting / relevant to gameplay than the resource type ones, I think...Dilvish wrote:One possible solution would probably be to move the Eccentric Orbit population effect into species.txt where all the other pop modifiers are processed.
Re: pop suitability report conflicts
The (target pop >= 0) requirements have a simple reason:Dilvish wrote:A third solution would just be to remove that (target pop >= 0) requirement from these techs (and I think growth focus is the same situation). I vaguely recall there having been some discussion of a reason for it before, to avoid making it too easy to colonize everything, but I just don't think it really makes a whole lot of practical difference on that front, and it is seeming to me to be a clear KISS violation. After all this time, we programmers had been unable to get the Suitability Report correct, and even after I noticed a problem with colonies dying it took me a while to figure out the cause, so how can that be considered "simple"? This solution would be the most straightforward of all, and to my eye has policy in its favor as well.
Symbiotic Biology is supposed to unlock Adequate planets (meaning that you can't colonize them otherwise).
Poor is unlocked by XENO_GENETICS and Hostile by XENO_HYBRIDS.
The construction techs are meant to be better when you have the option to expand your empire to colonize more good planets. So while they do improve all planet types, they aren't supposed to unlock anything.
A fourth solution could be to tweak the numbers so that Adequate, Poor and Hostile start with -20 population and the unlock tech bonus is increased by 20.
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Re: pop suitability report conflicts
Hmm, which three techs are you referring to? I just checked and SymBio + XenoGen lets Trith colonize Poor planets just fine, without any changes to the techs. SymBio, even with SubHab, is not enough for any species to populate Poor planets.MatGB wrote:If removing the target pop => 0 requirement for subhab also fixes Trith so they can colonise Poor planets with the first three techs then I approve generally anyway.
What you might be seeing is that since the Self Sustaining bonus and SubHab both have the targetPop >= 0 requirement, neither can help overcome a negative target pop. What this is emphasizing to me is that we need to either make the system simpler (as in remove this targetPop requirement in some or all places, and/or remove, move or otherwise change the Eccentric Orbit special and other specials with population effects), or explain it better, or a mixture of the two. In addition to making things more clear for the player/user, I think we need to make the setup a bit more clear for scripters also.
Sloth's point about the unlocking intent is a good reminder; I think that the unlocking paradigm is an appealing rubric and reasonable to retain even if the other complications render it incomplete. I think we need to acknowledge though, it is just a general (not absolute) rubric. I would also say that the additional complications need to be organized better so the interactions can be reasonably understood.
The biggest KISS issue is that right now the target population result is highly dependent on order of processing, which is currently a confusing mishmash and multiple rounds are necessary to get the final result. The way it is now regular players really have no hope of getting it right. Relying on the magic 8-ball Suitability Report (if it was actually working right) is perhaps just barely acceptable, but for something so critical as this I would think we would want the situation to actually be reasonably understandable to the players. I think the minimum acceptable reorganization would be either the following or something very very close to it. The current setup is similar but not quite close enough because some of the unconditional specials get processed last; a key aspect of the following is ensuring that the proper result can be determined in a single pass (for the benefit of players and the Suitability Report). The key thing is first processing all population effects that are not contingent on TargetPop >= 0. The particulars I would propose are:
- All pop negatives are assessed first (excluding Bad Pop which is only negative if target pop is already negative)
- Next all unconditional boosts (those not gated by targetPop) are processed (other than the proportional Good/Bad/Etc Pop). These are currently Good Environment, the local Homeworld bonus, the local growth specials, SymBio, XenoGen, XenoHybrids and Cyborgs.
- Next the bonuses contingent on (targetPop >= 0) are processed, these are currently the Growth Focii, SubHab, Gaia, WorldTree, NDimStructures, OrbitalHab, SelfSustaining and Phototropic (sort of, see below)
- Finally, the proportional Good/Bad/Etc Pop bonii/malii are processed
And of course, along with the above we'd have to ensure that all the Pedia descriptions are very clear about whether or not their population effect is conditional or unconditional.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: pop suitability report conflicts
How to growth specials apply? Probiotic soup and such, Positronic Ash and so on? Can they unlock a planet type? I can't quite remember, but I think they can? Then self-sustaining should be able to unlock, too, since it's supposed to be the same.
Besides, Symbiotic Biology does not currently unlock adequate planets, that can be achieved with SubHab quite well... If it should unlock, then I favor the -20/20 approach, and a description of "unlocks colonization of adequate planets" and so on. That would be more intuitive. Then I'd also remove the boni for good planets from e.g. Symbiotic Biology.
Btw: I still can't intuitively navigate the habitation wheel for anything but terran native species, and even then my grasp is sketchy. So I do rely quite heavily on that report.
Besides, Symbiotic Biology does not currently unlock adequate planets, that can be achieved with SubHab quite well... If it should unlock, then I favor the -20/20 approach, and a description of "unlocks colonization of adequate planets" and so on. That would be more intuitive. Then I'd also remove the boni for good planets from e.g. Symbiotic Biology.
Btw: I still can't intuitively navigate the habitation wheel for anything but terran native species, and even then my grasp is sketchy. So I do rely quite heavily on that report.
Attached patches are released under GPL 2.0 or later.
Re: pop suitability report conflicts
I remain a fan of keeping Eccentric Orbit, the research boost is a nice bonus in the early/mid game and makes a planet a good choice over similar planets. But, how about replacing the population malus with a supply malus? It originally had a construction/infrastructure malus and that used to key into supply range, and if it sorts other problems easily then it's an easy fix.
However, it would be nice to have the flexibility for other, future, specials, that give bonuses and population maluses so solving the root problem strikes me as a good plan.
Growth specials do apply and let you colonise planets otherwise out of reach. Ergo, Self Sustaining should also do so (however, I do think it's overpowered, and should be the equivalent of two out of three, self sustaining is particularly overpowered if you go for no/low specials but is good compared to all the others anyway).
I basically agree with Dilvish on this, it has to work and be consistent—if it isn't clear when a bonus applies, if it isn't clear when and why you can/can't colonise a planet with a particular species, even to experienced established players, and especially if the suitability report isn't working properly given the new mechanics for colonising that's an issue we need to fix.
However, it would be nice to have the flexibility for other, future, specials, that give bonuses and population maluses so solving the root problem strikes me as a good plan.
Until relatively recently I never used to queue XenoGen for ages, Orbital Habitation was always my third 'growth' tech, and with those three a normal species can, just, colonise a poor planet, but a self sustaining species can't, I mentioned it as something I'd noticed ages ago but I never did figure out why, the target>=0 requirement for several of them would explain it.which three techs are you referring to? I just checked and SymBio + XenoGen lets Trith colonize Poor planets just fine, without any changes to the techs. SymBio, even with SubHab, is not enough for any species to populate Poor planets.
Growth specials do apply and let you colonise planets otherwise out of reach. Ergo, Self Sustaining should also do so (however, I do think it's overpowered, and should be the equivalent of two out of three, self sustaining is particularly overpowered if you go for no/low specials but is good compared to all the others anyway).
I basically agree with Dilvish on this, it has to work and be consistent—if it isn't clear when a bonus applies, if it isn't clear when and why you can/can't colonise a planet with a particular species, even to experienced established players, and especially if the suitability report isn't working properly given the new mechanics for colonising that's an issue we need to fix.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: pop suitability report conflicts
We need to get that effect priority system going, where you can specify in the content scripts in which order the effects get processed. That would be one huge step to solving a lot of issues...
Re: pop suitability report conflicts
Whatever the fix, please keep in mind that making the suitability computation less CPU-hungry would be way cool, as currently it makes the game hang for seconds if an objlistwnd with suitabilities is displayed.
That is a patch I would like to propose soon...
That is a patch I would like to propose soon...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
Re: pop suitability report conflicts
Am I right that planet population is counting 3 times in differrent code blocks with different result?
Server
Client
Python ai code
Is it possible to change it? Maybe make meter for planet, map species: max pop. Actually two metters, permanent and by temp effects like specials.
Server
Client
Python ai code
Is it possible to change it? Maybe make meter for planet, map species: max pop. Actually two metters, permanent and by temp effects like specials.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: pop suitability report conflicts
Short answer: Yes and No. The python AI code is a different block of code, but I wasn't aware of any current circumstances where it gets a different result. The human client uses the same primary code and generally gets the same result, except that the suitability report it is not being quite careful enough to set up with initial conditions properly to avoid rare glitchy interactions with quirks of the population scripts.Cjkjvfnby wrote:Am I right that planet population is counting 3 times in differrent code blocks with different result?
Server
Client
Python ai code
I don't think that would do anything to actually solve the underlying issue with the suitability code, it would just require that the same code and fix be implemented in a different location (and run more often). As has been noted in this thread, making the population estimates is noticeably cpu hungry, at least on many machines. I don' t think it would be practical to always calculate it for every planet for every species for every empire, each turn.Is it possible to change it? Maybe make meter for planet, map species: max pop. Actually two metters, permanent and by temp effects like specials.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: pop suitability report conflicts
So indeed, what about some logic to simply make planets "uninhabitable" of sorts (no colonize button) unless the tech to colonize that habitation type is researched? Should lessen the calculation effort, since there is a simpler check first to see if it's needed to calculate the numbers for that species?
Attached patches are released under GPL 2.0 or later.
Re: pop suitability report conflicts
I think you're missing the point a bit. The unlocking paradigm is not absolute-- no one (to my knowledge) is complaining about growth specials helping to make the planet they're on habitable. Also, techs unlocking different environment levels (adequate, poor, etc) are purely a content issue, and won't get hardcoded into a shortcut for the colonize buttons. And even if they were it wouldn't do anything to solve the problem I originally posted about above, which has to do with an independent malus applying in a manner which is not properly captured by the suitability setup.Chriss wrote:So indeed, what about some logic to simply make planets "uninhabitable" of sorts (no colonize button) unless the tech to colonize that habitation type is researched? Should lessen the calculation effort, since there is a simpler check first to see if it's needed to calculate the numbers for that species?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: pop suitability report conflicts
Bumping this with some screenshots
If I comment out the pop requirements and hit end turn, the next turn I get: which is clearly better but still a bit weird. Unless someone strongly objects I'm going to run some test games this week with all the pop requirements commented out and then remove them assuming I find no problems.
Clearly in this shot, the report is wrong, but shouldn't beIf I comment out the pop requirements and hit end turn, the next turn I get: which is clearly better but still a bit weird. Unless someone strongly objects I'm going to run some test games this week with all the pop requirements commented out and then remove them assuming I find no problems.
- Attachments
-
- Mu-ursh-1.png (146.97 KiB) Viewed 895 times
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.