FreeOrion

Forums for the FreeOrion project
It is currently Mon Nov 20, 2017 6:48 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Sep 08, 2017 8:48 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
At your prompting now I was doing some more testing of RC2, and, well, remember that previously reported AI bug I had asked for some time to try tracking down, but then couldn't replicate and after asking about any recent sightings no one had replied so I gave up on it? Well, I just now replicated it with RC2, *sigh*.
Quote:
AI_6: AI_Error: AI script error in "calculate_priorities": "Unable to find key in unordered_map."
AI_6: AI_Error: AI script error in "assign_military_fleets_to_systems": "Unable to find key in unordered_map."


It had been previously hypothesized this might be resulting from an empire that lost all its planets but had surviving fleets, which I had tried testing for, but it seems that is just part of the story-- it turns out that the surviving fleets need to specifically include a military fleet, and even then the bug does not appear unless/until that military fleet completes/ends its current mission without having been destroyed. In this case that happened 7 turns after the AI had lost all its planets.

Although the error then gets triggered twice each turn in not-obviously-related tasks (calculate_priorities, assign_military_fleets_to_systems), the actual error stems from the same bit of code that gets called from both places. My fix/workaround is essentially that if the AI has lost all planets it will not attempt to provide military backup for exploration efforts. I've confirmed that this fix/workaround solves the problem in my RC2 testcase and I have committed it now in master.

Regarding the question of whether to include this in 0.4.7.1, I am inclined to say it's not worth it at this point. Although the bug is quite visible when it does occur, it arises in a very narrow circumstance that seems to be pretty rare, and the actual impact is extremely minor-- the AI military fleet in this situation will wind up just sitting still and being a minor obstacle, but it is extremely unlikely that the AI in this situation would be able to accomplish much more even with the workaround in place. There is also a minor bit of conflict resolution that needs to be done to copy the commit from master into 0.4.7.1. If anyone is wanting to further consider this and test it out, I could post a PR to 0.4.7.1 in which I take care of that conflict resolution.

_________________
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: Sat Sep 09, 2017 11:40 am 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
I just pushed another bugfix for the AI not colonizing large/huge planets in the early game due to their supply penalty.

Not critical enough to warrant another RC but I wanted to mention it here in case another RC gets out.

_________________
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: Sat Sep 09, 2017 4:21 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
Morlic wrote:
I just pushed another bugfix for the AI not colonizing large/huge planets in the early game due to their supply penalty. Not critical enough to warrant another RC but I wanted to mention it here in case another RC gets out.
I'm very glad you posted here about that commit, I try to review the commit log but sometimes a slew of commits come in at once and it's possible to miss things.

I agree that you found a bug, and that it's not critical enough for another RC. I think I've identified a deeper source for the problem that you observed, and I've opened a discussion for that; even if we have another RC I'm doubtful that I'd want to go with the approach of your commit.

_________________
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 Sep 10, 2017 12:42 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
I agree with your assessments regarding both issues, that they are not serious enough to warrant another RC. So I still plan to declare the 0.4.7.1 release later today (provided no critical issues turn up in the last moment).


Top
 Profile  
 
PostPosted: Sun Sep 10, 2017 6:45 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
0.4.7.1 has been released.


Top
 Profile  
 
PostPosted: Sun Sep 10, 2017 11:57 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
Vezzra wrote:
0.4.7.1 has been released.

Thanks much for shepherding that through; it's great to have it taken care of.

_________________
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: Mon Sep 11, 2017 5:26 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
:D


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

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