Weird AI behavior (keeps depopulating own planet)
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.
-
- Space Kraken
- Posts: 189
- Joined: Tue May 16, 2017 3:42 am
- Location: Catalonia, France, Europe, Earth, Sol, Orion Arm, Milky Way, Virgo Cluster
Weird AI behavior (keeps depopulating own planet)
FreeOrion_v0.4.7_2017-04-24.60d06dc, Linux (cmake) build.
This is something I can't find an explanation for.
The game was a testbed of sorts, I wanted to see how fast and far the AI could expand if left on its own with plenty of room to play with. So I picked 3 maniacals AI in an absurdly large universe (4000 systems IIRC), low planets, low starlanes. Turns out it was a bad idea, I've since learned that those aren't the preferred AI settings by far, but anyway I'm not here to discuss this.
To the point: since the beginning of the game (now at turn 200), Blue AI keeps colonizing/losing a planet. I can only assume it's always the same planet, since I haven't met any AI yet. Here's the 'Colonies' graph (bottom only, sorry - I had to stretch the window over several workspaces for the behavior to be noticeable.) Also, this: So, what could cause the AI to do this, and why so regularly? Could there be a bug in the code where the AI evaluates whether a planet is inhabitable or not? Something else?
This is something I can't find an explanation for.
The game was a testbed of sorts, I wanted to see how fast and far the AI could expand if left on its own with plenty of room to play with. So I picked 3 maniacals AI in an absurdly large universe (4000 systems IIRC), low planets, low starlanes. Turns out it was a bad idea, I've since learned that those aren't the preferred AI settings by far, but anyway I'm not here to discuss this.
To the point: since the beginning of the game (now at turn 200), Blue AI keeps colonizing/losing a planet. I can only assume it's always the same planet, since I haven't met any AI yet. Here's the 'Colonies' graph (bottom only, sorry - I had to stretch the window over several workspaces for the behavior to be noticeable.) Also, this: So, what could cause the AI to do this, and why so regularly? Could there be a bug in the code where the AI evaluates whether a planet is inhabitable or not? Something else?
Re: Weird AI behavior (keeps depopulating own planet)
[quote="Jaumito"]
So, what could cause the AI to do this, and why so regularly? Could there be a bug in the code where the AI evaluates whether a planet is inhabitable or not? [quote]
Could be. Please post savegames and the AI logs so we can figure it out instead of doing random guesses.
So, what could cause the AI to do this, and why so regularly? Could there be a bug in the code where the AI evaluates whether a planet is inhabitable or not? [quote]
Could be. Please post savegames and the AI logs so we can figure it out instead of doing random guesses.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Weird AI behavior (keeps depopulating own planet)
Other option is misusing Concentration Camps?
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.
-
- Space Kraken
- Posts: 189
- Joined: Tue May 16, 2017 3:42 am
- Location: Catalonia, France, Europe, Earth, Sol, Orion Arm, Milky Way, Virgo Cluster
Re: Weird AI behavior (keeps depopulating own planet)
It's been happening since the very early game (about turn 20-30, I'd say), so unlikely. Unless the AI gets Concentration Camps tech for free.MatGB wrote:Other option is misusing Concentration Camps?
Re: Weird AI behavior (keeps depopulating own planet)
Could be Trith or Eaxaw, both species start with it
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: Weird AI behavior (keeps depopulating own planet)
Does AI logs inform you of the species of the AI?
-
- Space Kraken
- Posts: 189
- Joined: Tue May 16, 2017 3:42 am
- Location: Catalonia, France, Europe, Earth, Sol, Orion Arm, Milky Way, Virgo Cluster
Re: Weird AI behavior (keeps depopulating own planet)
Just checked, and you're right. Although there's indeed a Trith AI, it's actually a Laenfa (AI #3) that seems to have problems with depopulation - its in-log Empire name ("Union") matches the in-game Blue AI's.Oberlus wrote:Does AI logs inform you of the species of the AI?
Re: Weird AI behavior (keeps depopulating own planet)
That's weird, it's maybe not got the phototrophic calculation right for a dim/no star system?
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: Weird AI behavior (keeps depopulating own planet)
The planet in question (if you load the game as multiplayer and select the Union empire for a human player) is Maretta II:
- Medium Swamp for Laenfa (Adequate)
- Blue star
- Temporal anomaly special
(- irrelevant Resonant moon special)
The suitability report is completely broken (see screenshot)
The AI makes at least 2 calculation mistakes:
1) Phototrophic bonus is applied ignoring the condition that it requires a target population > 0.
2) GRO_PLANET_ECOL has an effect after population
I am working on a fix.
- Medium Swamp for Laenfa (Adequate)
- Blue star
- Temporal anomaly special
(- irrelevant Resonant moon special)
The suitability report is completely broken (see screenshot)
The AI makes at least 2 calculation mistakes:
1) Phototrophic bonus is applied ignoring the condition that it requires a target population > 0.
2) GRO_PLANET_ECOL has an effect after population
I am working on a fix.
- Attachments
-
- PlanetSuitabilityBug.png (90.63 KiB) Viewed 1907 times
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Weird AI behavior (keeps depopulating own planet)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Weird AI behavior (keeps depopulating own planet)
I assume that only applies to the broken AI calculations, so the suitability report is still broken, right? In this case an issue about that should be opened.Morlic wrote:Hopefully fixed in master:
Re: Weird AI behavior (keeps depopulating own planet)
In the past I had noticed that the suitability report seems to go similarly broken (overestimating max pop for all species) on the actual turn that a planet became either apparently-depopulated or actually-depopulated via Evacuation, but never got around to tracking down just why. (Partly because that situation is relatively rare, and there is also some funny handling that makes the species icon be removed and the pop show as zero apparently one turn prior to it actually hitting zero and being totally converted to an outpost, destroying the Evac building before it autodestructs can allow the species to return).Morlic wrote:The suitability report is completely broken (see screenshot)
It looks like this may be related, when the planet has a low enough pop that for some purposes it is getting treated like an outpost, but the pop is actually nonzero, then the projections wind up off. It reminds me of some trouble we had a while back in trying to get the projections accurate since some of the effects are gated by the target pop already being above zero, I think we had to make some sort of two-step process to get the projection right, but perhaps that is still being thrown off if the current pop is between zero and one.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Weird AI behavior (keeps depopulating own planet)
That, we think, was fixed, it became more important with the Ancient Guardians as you tend to do a suitability report on the turn you capture themDilvish wrote:In the past I had noticed that the suitability report seems to go similarly broken (overestimating max pop for all species) on the actual turn that a planet became either apparently-depopulated or actually-depopulated via Evacuation, but never got around to tracking down just why.Morlic wrote:The suitability report is completely broken (see screenshot)
Numbers in planet suitability report are wrong on the turn right after a planet has been depopulated · Issue #979 · freeorion/freeorion
I think the best approach is to remove such gates to population, they apply weirdly depending on timing anyway and it would be better to balance things differently, if you can live underground you can live underground, etc. I did take several out when I did the effects priority for population boosts but I almost certainly missed some.It looks like this may be related, when the planet has a low enough pop that for some purposes it is getting treated like an outpost, but the pop is actually nonzero, then the projections wind up off. It reminds me of some trouble we had a while back in trying to get the projections accurate since some of the effects are gated by the target pop already being above zero, I think we had to make some sort of two-step process to get the projection right, but perhaps that is still being thrown off if the current pop is between zero and one.
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: Weird AI behavior (keeps depopulating own planet)
Done.Vezzra wrote:I assume that only applies to the broken AI calculations, so the suitability report is still broken, right? In this case an issue about that should be opened.Morlic wrote:Hopefully fixed in master:
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0