FreeOrion

Forums for the FreeOrion project
It is currently Sat Nov 18, 2017 6:19 am

All times are UTC


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.



Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jun 23, 2017 1:23 pm 
Offline
Space Squid

Joined: Tue May 16, 2017 3:42 am
Posts: 51
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.)
Attachment:
colonies.png
colonies.png [ 11.04 KiB | Viewed 256 times ]

Also, this:
Attachment:
planets.png
planets.png [ 42.82 KiB | Viewed 256 times ]

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?


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 5:03 pm 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
[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.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 7:42 pm 
Offline
Space Squid

Joined: Tue May 16, 2017 3:42 am
Posts: 51
Done.


Attachments:
AI_3.log [154.47 KiB]
Downloaded 4 times
AI_2.log [158.48 KiB]
Downloaded 3 times
AI_1.log [188.21 KiB]
Downloaded 6 times
FreeOrion_Ramuz_Litharchy_0202_20170623_141917.sav [3.82 MiB]
Downloaded 5 times
Top
 Profile  
 
PostPosted: Sat Jun 24, 2017 2:23 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
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.


Top
 Profile  
 
PostPosted: Sat Jun 24, 2017 7:43 am 
Offline
Space Squid

Joined: Tue May 16, 2017 3:42 am
Posts: 51
MatGB wrote:
Other option is misusing Concentration Camps?

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.


Top
 Profile  
 
PostPosted: Sat Jun 24, 2017 10:01 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
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.


Top
 Profile  
 
PostPosted: Sat Jun 24, 2017 2:39 pm 
Offline
Dyson Forest
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 212
Does AI logs inform you of the species of the AI?


Top
 Profile  
 
PostPosted: Sun Jun 25, 2017 12:24 am 
Offline
Space Squid

Joined: Tue May 16, 2017 3:42 am
Posts: 51
Oberlus wrote:
Does AI logs inform you of the species of the AI?

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.


Top
 Profile  
 
PostPosted: Sun Jun 25, 2017 8:52 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
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.


Top
 Profile  
 
PostPosted: Sun Jun 25, 2017 10:00 am 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
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.


Attachments:
PlanetSuitabilityBug.png
PlanetSuitabilityBug.png [ 90.63 KiB | Viewed 166 times ]

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Top
 Profile  
 
PostPosted: Sun Jun 25, 2017 11:02 am 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
Hopefully fixed in master:

https://github.com/freeorion/freeorion/ ... a3ced4cc7e

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Sun Jun 25, 2017 4:04 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
Morlic wrote:
Hopefully fixed in master:
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.


Top
 Profile  
 
PostPosted: Wed Jun 28, 2017 12:41 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
Morlic wrote:
The suitability report is completely broken (see screenshot)
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).

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


Top
 Profile  
 
PostPosted: Wed Jun 28, 2017 7:56 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
Dilvish wrote:
Morlic wrote:
The suitability report is completely broken (see screenshot)
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.

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 them
Numbers in planet suitability report are wrong on the turn right after a planet has been depopulated · Issue #979 · freeorion/freeorion
Quote:
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.

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.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Jun 28, 2017 6:10 pm 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
Vezzra wrote:
Morlic wrote:
Hopefully fixed in master:
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.


Done.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group