Loading...
  OR  Zero-K Name:    Password:   

Shield link behavior chatlog

54 posts, 1362 views
Post comment
Filter:    Player:  
Page of 3 (54 records)
sort
Context: I was making a ton of thugs to hide inside a Funnelweb and give it tons of extra regen, when all the sudden ArchShaman says...
quote:

[7:15 PM] Springiee [ArchShaman]incorrect autowar
[7:15 PM] Springiee [ArchShaman]shield link only shares charges
[7:16 PM] Springiee [AutoWar]nope
[7:16 PM] Springiee [ArchShaman]and large area shields are low priority
[7:16 PM] Springiee [AutoWar]you dont know what yourtalking about
[7:16 PM] Springiee [AutoWar]or i dont know so hard that i think i know
[7:16 PM] Springiee [ArchShaman]right... and im a top 50 player who routinely works with gadgets...
[7:16 PM] Springiee [AutoWar]oh right
[7:16 PM] Springiee [AutoWar]still it SEEMS to work
[7:17 PM] Springiee [AutoWar]so until i fidd out otherwise...
[7:17 PM] Springiee [ArchShaman]look at this then
[7:17 PM] Springiee [AutoWar]a link?
[7:17 PM] Springiee [AutoWar]post in the lobby chat
[7:18 PM] ArchShaman https://code.google.com/p/zero-k/source/browse/trunk/mods/zk/LuaRules/Gadgets/unit_shield_link.lua?r=13663
[7:19 PM] ArchShaman chargee_regen = shieldUnit3.shieldRegen
[7:19 PM] ArchShaman --charge flow is: based on the absolute difference in charge content,
[7:19 PM] ArchShaman --charge flow must:
[7:19 PM] ArchShaman --1)not be more than receiver's capacity,
[7:19 PM] ArchShaman --2)not be more than donator's available charge,
[7:19 PM] ArchShaman --3)leave spaces for receiver to regen,
[7:19 PM] ArchShaman --charge flow is capable: to reverse flow (IS DISABLED!) when receiver have regen and is full,
[7:21 PM] Springiee [ArchShaman]what looks like its adding regen its only when the unit has less charge than the surrounding units
[7:22 PM] Springiee [ArchShaman]and is limited to 5 connections
[7:23 PM] Springiee [AutoWar]oddd to limit it like that
[7:23 PM] Springiee [ArchShaman]why do you think its limited...
[7:24 PM] Springiee [ArchShaman]its to prevent nubballs/shieldspam from becoming wtfable


Context: sometime later Archshaman says this...
quote:

[8:02 PM] ArchShaman huh they just changed that behaviour today, now the link limit is gone
[8:05 PM] ArchShaman and the COC got updated yay


Is there a link limit?
Is there a regen limit?
is regen really shared?
+0 / -0
The "link limit" of ZK v1.2.7.7 is different than "no link limit" of ZK v1.2.7.9. The "link limit" of ZK v1.2.7.7 is to prevent overpowering Felon , while "no link limit" of v1.2.7.9 is meant that the link isn't permanent. (the author of the code is not same people, thus ot explain this semantic issue)

In ZK v1.2.7.7 the link is always connected to a same nearby shield and Felon was set to have link-limit of 5. Other unit is set to maximum 1 link. You can see the visualization of link as always present and non-changing.

In ZK v1.2.7.9 the link only activate when unit want to share charge, and each unit connect 1 link to a random partner. Some unit might have additional link greater than 1 depended on whether nearby partner wanted to link to it or to other unit. This appear as flash of purple line.

The negative of ZK v1.2.7.7 is: the link is fixed & might connect to bad shield unit (bottleneck). The negative of ZK v1.2.7.9 is: Felon is not set to have 5 link, and link can randomly connect to bad shield unit.
+1 / -0


11 years ago
I think MYrankxponen is a bit confused about how shield link works now because he seems opposed to it. The old shield link had unclear link limit behaviours such as Felons having a maximum of 5 links which could lead to stupid behaviour. I just noticed that the behaviour was weird so rewrote it and it is in the current stable.

So here is how shield link works.

Shielded units do a thing called a charge transfer. This is done 15 times a second.

To do a charge transfer a unit first randomly selects a partner from its neighbouring shielded unit. Two units are neighbours if their shields touch and units are neighbours of themselves. So if unit A is doing a charge transfer and its shield touches those of units B and C it has a 1/3 chance to select each of A, B or C as its partner.

The next step is charge normalization. Both the unit its partner modify their charge to bring it 1% closer to the value of the other unit. Note that this conserves charge. For example take a unit with 500 charge which picks a partner with 200 charge. The difference in charges is 300 so the final charges are 497 and 203.

The purple lines between shielded units appear when a charge transfer occurs between two units and the magnitude of the transfer was at least 0.1.

There is no regen sharing and link will not create more charge than was already present. The only bonus or penalty it can apply here is due to the fact that full shields do not recharge. The question of a link limit does not make sense with this system. Some good things to realize are that only large shields can be used to help charge each other past 1250 and that large shields can transfer their charge to Felons very rapidly.
+0 / -0
What's the point of including the unit itself? To make charging slower (halved speed for grid of only 2 shields, speed penalty quickly diminishing the more nearby shields there are)?

So, if you wanted to use regen optimally, you'd want whatever is consuming your shield charge to be only connected to your group of thugs, and those thugs then (on the other side) connected to large shields.

The dynamic that any shield with charge > thug (max) charge does not benefit from thug regen is interesting, but not new iirc.
For example, large shields with thug/convict support will first recharge very quickly after taking a big hit (tac nuke/sniper shot), but then will recharge way slower when surpassing the thug shield charges.

On another note, the system as you explained means that if you have x thugs in one ball and an empty shield touching exactly one of the thugs, then charge rate to the empty shield goes down the higher x gets. I find that unintuitive at best and (mechanically) unreasonable at worst... Is that part of the design idea?
+0 / -0
quote:
To make charging slower (halved speed for grid of only 2 shields, speed penalty quickly diminishing the more nearby shields there are)?

Yes.
+0 / -0

11 years ago
Edited my post with a few more questions.
+0 / -0
quote:
On another note, the system as you explained means that if you have x thugs in one ball and an empty shield touching exactly one of the thugs, then charge rate to the empty shield goes down the higher x gets. I find that unintuitive at best and (mechanically) unreasonable at worst... Is that part of the design idea?

ZK v1.2.7.9 charge-sharing strategy cannot adopt smarter distribution even if we wanted to, because its charge-sharing code is expensive.ie: ZK v1.2.7.7's charge-sharing code can run at 30frame per second while ZK v1.2.7.9 charge-sharing code only run at 15frame per second. But both had similar cost at current state with ZK v1.2.7.9 use abit less CPU (but adding smarter distribution to ZK v1.2.7.9 will increase cost exponentially unfortunately)

Also AUrankAdminGoogleFrog doesn't want the shield-link to be any more effective at sharing charge. (Probably because it will make Felon OP, like in ZK v1.2.7.7 )

Also ZK v1.2.7.7's linking-strategy cannot adopt smarter distribution either because its link is fixed/permanent. It will have to re-link to be smart but unlike ZK v1.2.7.9 it re-link only every 1 second, however the re-linking will be CPU costly still.
+1 / -0
We have some decent to excellent mathematicians/computer scientists around. If you clearly formulate design goals and intended rules/outcomes, people might be keen on devising algorithms for achieving just that, including run speed constraints.

I mean, you seem to be happy with the current shield link code, so maybe not in this case, but just think along the lines of the elo balance thread or OD fix.

USrankFealthas: Yes to all. I mean, aside from the fact that the "no sharing to higher than own max shields" was present before.
+0 / -0

11 years ago
Isn't this a pretty huge Nerf to the aspis and felon play? Especially for people who use aspis without felon, and against snipers.

Also do I understand correctly - a shielded unit cannot transfer shield power to a unit with a higher shield max past its own max shield value?
+0 / -0
11 years ago
quote:
a shielded unit cannot transfer shield power to a unit with a higher shield max past its own max shield value

This is because Thug's charging is free. If thug can push excess charge to Aspis, then you can basically charge Aspis for free! So it is disallowed.
+1 / -0



11 years ago
Is this supposed to make Felon balling a less desirable tactic?
+0 / -0

11 years ago
If diminishing returns with higher shield count means that it is less desirable, then yes.
+0 / -0
It seems the change has made sballing even more popular than it was. I'm getting tired of hearing "Vrooshhh Bushhhh" x100 from racketeer. I've noticed a markable increase in sballs lately.
+0 / -0


11 years ago
This goes back to MYrankxponen's local shield link change from about 9 months ago. First I will explain the behaviour from earlier. I will call the first system global shield link.

A network of shields is a connected bunch of shields (or more precisely; a maximal connected component of the graph). Global shield link acted on networks of shields without taking into account their shape. The charge distribution of this system was very simple. Every frame (30 times a second):
  • Take the average charge of the shields in the network (charge sum)/(shields in network).
  • Move every shield in the network 1% closer to the average.
  • Track overflow (charge being given to low max capacity shields) and redistribute this to shields with spare capacity.

So to use my previous example you have a shield with 500 charge and a shield with 200 charge. The average charge is 350, 350-500

-150 and 200-350

150. Then the charges on the next frame are 498.5 and 201.5.

It was long thought that global shield link was a bit simple. In large porc games people could just make a single massive shield network. A lot of interesting potential problems in the shape of the network were being overlooked (such as bottlenecks and attacking points with poor shape). It would have been nice to make shield link local somehow but I had not written that gadget and did not spend much time considering the problem. I am not sure if I even got the point of realizing that the problem is poorly defined.

About 9 months ago MYrankxponen spent some time making shield link local and I accepted that he had done so without looking at it in depth. Then more recently there was an update to the way the links were drawn. I had a closer look at this change and ran a few tests to make sure the whole gadget worked. At this point I noticed strange behaviour.

I do not know the extent of what was wrong with the v1.2.7.7 shield link. My main test was 10 Thugs attached to a Felon all in a clump. In this test 5 of the Thugs were very efficient at moving their charge to the Felon (much more efficient than I recall) and the other 5 sat at about 40% shield. This behaviour lacks symmetry and is arbitrarily based on which unit happened to link up so it makes no sense. I don't want some sort of complicated arbitrary system which has limited links and priorities set for each type of shield. A more practical result is that the new shield link seemed to have faster charge transfer which acted as a stealth buff for Felon.

I began rewriting a lot of the shield link gadget. I suppose I had two design goals:
  • When all the shields are in a clump the behaviour should collapse to the global case. This is what the xponen version fails to do.
  • It should do "local stuff" (bottlenecking, network flow).
Another thing to keep in mind is that shield link is not some helpful unit AI. The mechanics should not need to be fought against but they will also not always implement smart or useful behaviour. It should be mechanically simple and leave it to players to figure out how to use it to their advantage.

I think my random neighbour transfer is close to achieving these goals. I have shown examples of the two shield case under both the global and random transfer systems.

The many Thugs + 1 Felon case is also theoretically equivalent with both systems. If you have a lot of Thugs then the average charge of the network will approximately 1250. So a Felon at 0 charge in a global link system would gain 12.5 charge per frame. With the random neighbour system each Thug has a 1/N chance of picking the Felon (N units in total) so approximately 1 Thug will link with the Felon and give the Felon 12.5 charge. The Felon will almost always link with a Thug and take 12.5 charge. This transfer happens every 2 frames so the systems have effectively equivalent behaviour.

One overlooked issue is that adding Thugs to a group of large shields that do not drop below Thug charge will hinder the transfer of charge between the large shields. This could be dealt with by not considering full units with less charge while looking for a partner to transfer with.

quote:
The dynamic that any shield with charge > thug (max) charge does not benefit from thug regen is interesting, but not new iirc.

This has always been the case.

quote:
On another note, the system as you explained means that if you have x thugs in one ball and an empty shield touching exactly one of the thugs, then charge rate to the empty shield goes down the higher x gets. I find that unintuitive at best and (mechanically) unreasonable at worst... Is that part of the design idea?
This behaviour sounds ok in terms of "local stuff". Local means that clumps of units will reinforce each other more strongly than tenuously connected ones. Large clumps could focus the reinforcement. Note however that the penalty for adding extra units will only go as low as 50% because the lone empty shield will still transfer charge with its neighbour. Also the charge transfer is likely to be more sustained as the neighbour has its charge refreshed to 100% by the large clump of shields.

quote:
It seems the change has made sballing even more popular than it was. I'm getting tired of hearing "Vrooshhh Bushhhh" x100 from racketeer. I've noticed a markable increase in sballs lately.

Perhaps a constant is off somewhere and charge transfer is now much more rapid. Alternately the xponen behaviour could have broken shieldballs in an unexpected way.
+0 / -0
Right, I overlooked that charge isn't only donated but also "grabbed". That makes devising counterexamples a lot hard i guess. I'll still see if I can come up with weird behaviour...

Just as information for me, how do you find neighbouring units? Not mathematically speaking, but do you keep track of shield units that move in/out of range of each other and just sustain a table that gets updated, or do you do a complete unit search every frame for every shield unit?

Edit: Had a look at the gadget, you keep track of all units with shields and then update neighbour lists of units that moved or were disabled. I see.
So, that does mean neighbour lookups for shields are really inexpensive, right?

My practical tests so far conclusively proved that I was not using GF's version of the gadget. Oops.
+0 / -0

11 years ago
The problem is that the proper solution - a full pressure-network simulation - is prohibitively expensive to compute. These things involve recursive calculations over O(n^2) relationships.
+0 / -0
The more I think about it, the better (and more elegant) GF's solution appears.

Basically, it does nothing else than, for every shield, average all adjacent shield charges and transfer a percentage of the difference to its own charge to or away from itself. Only that it does it spread out over many frames, but over longer time scales (which a second already is) it does exactly the above. I mean, it doesn't give strictly the same result, but since shield transfer is so (comparibly) slow it makes absolutely no observable (or mechanical) difference.

So it's basically the same solution but just barring the innermost loop of summing all the adjacent shields. Since shield transfer needs to happen every few frames to look smooth, doing the "complete" solution every time would be a waste indeed.

Impressive, good work! :)

CArankPxtl: I'm not exactly sure what you mean... The above "every shield (partially) equalizes with all neighbouring shields" solution sounds like the "proper" solution to me already, with runtime of O(n²). What are you trying to do that you need recursion for?
I'd figure preventing the case of 101 empty shields trying to take 101% charge from a full shield in one frame (or, as it would happen now, the first one taking 1% from the full one, the second taking 1% of the remaining 99% or 0.99% etc.) is what you're looking to smoothly accomplish, but given the 1% transfer rate (and the impractical amount of shields that any constructed situation involving an even remotely observeable error would involve), the deviations are never going to be relevant.

If the outer loop over all shields would traverse them in random order instead of the same order every (second) frame, you'd basically limit the "lifetime" of those discrepancies to just that frame, making it even more impossible to create an ingame situation where they would become relevant. But it's not needed for "normal" ingame situations.
+0 / -0
11 years ago
AUrankAdminGoogleFrog
This is great info!
Can you please repost in a (quote)quote(/quote) the parts of your posts that describe only what the new version does?
I can't tell when you are are discussing the old version or the new version!

Are larger shields are still higher priority for charge transfer?

Is a line of shields that touch at the tip still bottlenecked by each shield's individual rate of charge transfer?

Are shield averages now seperated by the averages of a given shield size?
+0 / -0
quote:
quote ArchShaman:
It seems the change has made sballing even more popular than it was...

GoogleFrog: Perhaps a constant is off somewhere and charge transfer is now much more rapid...

Nah, people use more shield because new stable feature shield link as improved items, so people try it. Its good advertisement.

quote:
Are larger shields are still higher priority for charge transfer?

Not anymore. Large shield & Felon is nerfed, as admited by AUrankAdminGoogleFrog himself:
quote:
One overlooked issue is that adding Thugs ... will hinder the transfer of charge between the large shields. ...

For comparison:
ZK v1.2.7.7's shield-link create permanent link between Aspis & Aegis first, so this allow "large shield" network, then it connect to Thug and Constructors second as "small shield" network.

ZK v1.2.7.9 have no preference and randomly connect Aspis to Thug and to another Aspis in real-time. Due to its reliance on randomness, there's low chance for an Aspis to connect to another Aspis if there's many thug around. This hinder charge sharing between Aspis & no "large shield" network is present. This might be fixable.
+1 / -0
Yeah, it would be easily fixable as GF already noted.

USrankAutoWar: The system is really simple now. Every shield finds a random neighboring shield and "normalizes" charge (transfers 1% of the difference). This happens a few times per frame.

Btw GF, your code only has a 1/N² chance (in a normal case with no disabled/dead shields) to make a shield exchange charge with itself.
The random part with "The +1 is here intentional [...] (otherID will be nil)" only results in an attempt+1, not an attempt=false. Since you have two attempts, you need to roll the right random number twice to not transfer.
I mean, unless every unit is included in its own neighbor list, in which case you have two different ways of making shield transfer fail (which I'm not sure if you actually intended), but I won't try to wrap my head around the AddDataThingToIterable, AddThingToIterable and double table business that's going on here...
+0 / -0
Page of 3 (54 records)