0.4.7.1 bugfix release

Discussion about the project in general, organization, website, or any other details that aren't directly about the game.
Message
Author
User avatar
Dilvish
AI Lead, Programmer
Posts: 4683
Joined: Sat Sep 22, 2012 6:25 pm

Re: 0.4.7.1 bugfix release

#16 Post by Dilvish » Fri Sep 08, 2017 8:48 pm

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*.
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

Morlic
AI Contributor
Posts: 238
Joined: Tue Feb 17, 2015 11:54 am

Re: 0.4.7.1 bugfix release

#17 Post by Morlic » Sat Sep 09, 2017 11:40 am

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

User avatar
Dilvish
AI Lead, Programmer
Posts: 4683
Joined: Sat Sep 22, 2012 6:25 pm

Re: 0.4.7.1 bugfix release

#18 Post by Dilvish » Sat Sep 09, 2017 4:21 pm

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

User avatar
Vezzra
Release Manager, Design
Posts: 4605
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: 0.4.7.1 bugfix release

#19 Post by Vezzra » Sun Sep 10, 2017 12:42 pm

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).

User avatar
Vezzra
Release Manager, Design
Posts: 4605
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: 0.4.7.1 bugfix release

#20 Post by Vezzra » Sun Sep 10, 2017 6:45 pm

0.4.7.1 has been released.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4683
Joined: Sat Sep 22, 2012 6:25 pm

Re: 0.4.7.1 bugfix release

#21 Post by Dilvish » Sun Sep 10, 2017 11:57 pm

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

User avatar
Vezzra
Release Manager, Design
Posts: 4605
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: 0.4.7.1 bugfix release

#22 Post by Vezzra » Mon Sep 11, 2017 5:26 pm

:D

Post Reply