Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

Describe your experience with the latest version of FreeOrion to help us improve it.

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.
Post Reply
Message
Author
Dragget
Space Floater
Posts: 40
Joined: Mon Feb 10, 2014 9:39 am

Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#1 Post by Dragget »

(Windows 10)
I'm noticing some problems with how trade routes are open/blocked in the last few test releases. Essentially, I'm seeing blockades implemented incorrectly in situations where I am allied with another empire. If I'm at peace, I shouldn't have my trade routes blocked by my ally, and nor should their trade be blocked by me. This used to work properly, but now it doesn't make sense.

Example 1
Image
Here, we can see that, in spite of the fact that I am at peace with the Domination, my outpost on Phecda is blocked from the trade network by the Domination. This in spite of the fact that I have a warship in orbit there and they have no military ships further up the warp line. This situation has been ongoing for several turns, so it's not a case of having just colonized and the trade route hasn't recalculated yet.

Example 2
Image
Here, we can see that my ships are blocking the Order's colonies in Haleth δ. Again, we're at peace, so this shouldn't be occuring. I don't even have any colonies farther along that warp line.

These are just two examples of the most annoying cases with blockades, but I've also seen trade routes frequently interrupted by the presence of NONMILITARY (i.e. no offensive armament) enemy ships that manage to slip past my border defenses. In older versions of the game, trade routes would overlap when the empires in question were at peace, but apparently that is not happening correctly any more.
Attachments

[The extension sav has been deactivated and can no longer be displayed.]


User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#2 Post by Geoff the Medio »

Dragget wrote:In older versions of the game, trade routes would overlap when the empires in question were at peace, but apparently that is not happening correctly any more.
The mechanics for supply propagation have been intentionally changed. Now, only one empire can connect planets and supply fleets in any particular system.

It is planned soon to allow at peace empires to use eachothers' supply connections, however this is not yet implemented.

Dragget
Space Floater
Posts: 40
Joined: Mon Feb 10, 2014 9:39 am

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#3 Post by Dragget »

Geoff the Medio wrote:The mechanics for supply propagation have been intentionally changed. Now, only one empire can connect planets and supply fleets in any particular system.
That still doesn't explain the first example, where I have military units in case to protect my trade route. If it was calculating correctly, the military units present should be sufficient to keep the route open for my empire. The Domination doesn't control any star systems beyond Pern, nor do they have any ships out beyond that point that would serve as an anchor to extend their trade routes.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#4 Post by Geoff the Medio »

Dragget wrote:That still doesn't explain the first example, where I have military units in case to protect my trade route. If it was calculating correctly, the military units present should be sufficient to keep the route open for my empire. The Domination doesn't control any star systems beyond Pern, nor do they have any ships out beyond that point that would serve as an anchor to extend their trade routes.
You are at peace with the Domination, so your warship has no effect on their supply propagation, and their supply pushes back yours. Try switching to war with them for a test turn.

Dragget
Space Floater
Posts: 40
Joined: Mon Feb 10, 2014 9:39 am

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#5 Post by Dragget »

So you're saying that my warship doesn't affect the supply line calculation since I'm not at war, but in the second example, once my fleet moved into position, the supply route WAS recalculated, cutting off the Order's outlying system. What accounts for this difference then?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#6 Post by Geoff the Medio »

In cases where there are ties for who has more supply range at a system, presence of a ship is one of the factors that can break the tie. If another empire has more supply range at a system than you, and you are at peace with them, the ship will not overcome their greater range and they will supply into the system.

Other factors are distance (not jumps, actual distance along the lanes) to the nearest source of supply, having a planet in the system (that doesn't provide any supply), having the most total supply output in the system...

https://github.com/freeorion/freeorion/ ... y.cpp#L436

Dragget
Space Floater
Posts: 40
Joined: Mon Feb 10, 2014 9:39 am

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#7 Post by Dragget »

So, here is what transpired a few turns later, after I had set my nearest colony to Supply focus and built a colony on that outpost:
Image
Apparently, when the situation flips in my favor, the AI empire gets to share the supply route. Seems to me that there is an inconsistency with how this gets calculated.

Maybe when this gets addressed, an more nuanced solution could be implemented with differing levels of access besides "Peace" and "War". For example:
  1. War: armed enemy ships will interrupt trade
  2. Nonagression: armed foreign ships and/or colony/outposters not allowed passage except in systems where both empires own planets, but trade routes are not blocked
  3. Peace Treaty: free passage to all ships from treaty partner and trade/supply routes are cooperative
  4. Alliance: as above, but in addition, ships parked in allied systems with repair facilities will be serviced/repaired as if they belonged to that empire

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

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#8 Post by Dilvish »

Dragget wrote:Apparently, when the situation flips in my favor, the AI empire gets to share the supply route. Seems to me that there is an inconsistency with how this gets calculated.
No, the backend code taking care of supply calculations is totally oblivious to who is an AI and who is a regular player. I don't think we have yet been shown enough information about the planets at Pern and Pecca and whatever colony you set to Supply focus (and what the supply meters are at the various planets) to say anything definitive, but it's still my expectation that those meters tell the story and that things are working as intended, at least with the actual supply calcs. Also, I'm not sure if the code in charge of the fat "supply-connect-core" lines was updated when the supply-exclusion code was put into place, it could be that perhaps the fat 'core' lines should not be displayed around Phecca there.
Here, we can see that my ships are blocking the Order's colonies in Haleth δ. Again, we're at peace, so this shouldn't be occuring. I don't even have any colonies farther along that warp line.
It sure looks to me like the supply from your colony at Haleth Epsilon could be what is blocking your ally's supply, not your warships.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Dragget
Space Floater
Posts: 40
Joined: Mon Feb 10, 2014 9:39 am

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#9 Post by Dragget »

Dilvish wrote: I don't think we have yet been shown enough information about the planets at Pern and Pecca and whatever colony you set to Supply focus (and what the supply meters are at the various planets) to say anything definitive, but it's still my expectation that those meters tell the story and that things are working as intended, at least with the actual supply calcs.
I attached the .SAV file to the first post. If you load that up, set the colony in Primodious system to "Supply" focus and advance a few turns until the supply balance flips, you can recreate this scenario and inspect whatever data you need to determine what is causing this result.
Dilvish wrote:It sure looks to me like the supply from your colony at Haleth Epsilon could be what is blocking your ally's supply, not your warships.
Confirmed. I moved that fleet off later on and it's still blocked. Supply emanating from my outpost at Haleth ε seems to be the culprit. IMO armed warships stationed along supply lines should trump everything else, regardless of peace or war, but apparently that is not how it is coded.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#10 Post by Geoff the Medio »

Dragget wrote:Apparently, when the situation flips in my favor, the AI empire gets to share the supply route. Seems to me that there is an inconsistency with how this gets calculated.
No, just with how it's displayed. See a similar situation as viewed by two players:
Attachments
supply propagation and display quirk
supply propagation and display quirk
supply_prop.png (644.86 KiB) Viewed 1439 times

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#11 Post by MatGB »

OK, in the first example, having had to jump through some hoops to get the save working, Phecda is a Huge planet and you've only researched Orbital Construction, so it has a supply of zero. An individual planet needs to have supply 1 in order to block other empires propagating into the system.

In the other case, it's not your fleet blocking the AI supply propagation, it's your Egassem colony on the Tiny world in Haleth y, which has a supply of 5 and thus beats most other sources (Egassem on Tiny worlds are incredibly powerful).

I haven't played through yet and I don't think it's worth it, bear in mind two points: 1) Diplomacy is an incomplete implementation, basically the 'peace' status only means ships don't attack each other, if you look at the AI colony at Haleth that's blocked, they're scared of you and have gone on Defence focus. 2) You've barely explored the Construction tech tree and are missing the two techs that are needed to make Phecda viable on its own.

Basically, peace exists in the current implementation purely for a) multiplayer groups and b) new players to learn the basics, it doesn't actually work well in game, work is being done to make supply when at peace work better but until diplomacy proper is implemented it's not a good investment, invade and capture removes the problem ;-)

Seriously, everyone has to play with their own style and my over the top aggressive approach isn't for everyone, but you outmatch every other player at the point of that save, if you eliminate Green that flank is secure, and if you don't do it soon Yellow will start to outmatch you and become a real problem.

===
Having tested through, I think we need to improve the UI of how supply is displayed on the galactic map in some way, perhaps a widget on a contested system that shows the relative supply strengths at that point? I have zero clue how to do this but, like Stealth, it's going to be confusing players for quite some time I suspect.
Mat Bowles

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

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Blockade calculations [0.4.6+ build 2017-02-14.c2e2bb0]

#12 Post by Geoff the Medio »

MatGB wrote:Having tested through, I think we need to improve the UI of how supply is displayed on the galactic map in some way, perhaps a widget on a contested system that shows the relative supply strengths at that point? I have zero clue how to do this but, like Stealth, it's going to be confusing players for quite some time I suspect.
Wouldn't be difficult to add a tooltip to systems indicating how much supply range, total supply, and distance to nearest supply source, and the name of the empire that can supply there. Alternatively, a "lenses mode" to overlay coloured circles (by empire colour), with size indicating propagated supply range at the system, could be implemented.

Post Reply