iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

Effective Energy #186

Open vita10gy opened 11 years ago

vita10gy commented 11 years ago

With links now providing a defensive purpose, and there being a few places where we have ease of take over. Energy/AP in portal list, portal weakness, etc, I'm wondering if it wouldn't be wise to make up a term, something like Effective Energy, and add one common function to calculate to show where apt.

Function could factor in current XM levels, shields, and links. So something with 8 links and 20,000 energy would effectively have 30,000 energy (according to graphs floating around)

We'd have to make some guesses as to shields, but we can probably get close (and tweaking it would translate to all areas)

jonatkins commented 11 years ago

The AP-List plugin already uses an "Effective Level" - although this does not yet take account of links. A tooltip breaks it down into real level, energy and shield factors.

vita10gy commented 11 years ago

I guess I was more wondering if we should try and make something kind of an official iitc stat. To the point where people might even get used to it enough to be a meaningful number to them. As opposed to each plugin winging something similar.

jonatkins commented 11 years ago

Sure. I don't use stats like that myself, but something reasonably generic would be fine in the core IITC. Effective level is the closest such thing at this time,

A generic API should make it a) easy to query the calculated value b) easy to get a formatted description, for tooltips c) possible to query the individual factors for alternative (e.g table) display and possibly d) possible for a plugin to replace the built-in calculations

[edited - first post was incomplete]

rediguana commented 11 years ago

I'd definitely support an IITC-wide measure, such as Effective Energy. Sounds good :)

vita10gy commented 11 years ago

Anyone that remembers their math classes more than me able to deduce a formula from this? http://decodeingress.me/2013/04/20/links-contribute-to-portal-defense-up-to-50/

rediguana commented 11 years ago

Someone has added a comment on that thread that may provide an approximate formula. I haven't checked it out though.

Fragger commented 11 years ago

I don't think that formula provided in the comments is the best as it eventually does keep going up, although I wonder what everyone else thinks? I was going to look into something better.

Fragger commented 11 years ago

I have come up with this so far: f(x)=arctan(x*tan(pi/10))/pi still doesn't quite match the image but it never goes above 0.5 f(1)=0.1, f(8)=0.383

Fragger commented 11 years ago

Can also play with powers on the inner part f(x)=arctan((x*tan(pi/10)^(1/1.4))^1.4)/pi gives f(1)=0.1, f(8)=0.447

iscekic commented 11 years ago

I think we shouldn't try to figure out the exact formula of the function since we don't actually need it. Instead, we could simply figure out f(1), f(2)... f(8). These are my (rough) estimates: f(1) = 0.1 f(2) = 0.225 f(3) = 0.3 f(4) = 0.35 f(5) = 0.4 f(6) = 0.45 f(7) = 0.475 f(8) = 0.5 I think we can round like this since the picture is hand-drawn and is likely a bit off.

If anyone has a better estimate, correct me.

jpmarcotte commented 11 years ago

Do we know if the links that contribute to defense include both incoming and outgoing or just one of the two?

Fragger commented 11 years ago

It sounds like it is any links but I guess without some thorough testing we couldn't be sure.

lablua commented 11 years ago

I don't think total effective energy is the right stat. My suggestion would be minimum bursters to destroy portal. You can test in IPAS and see that even though they it has more energy, a level 1 portal with 8 level 1 resonators (8000 energy) takes 1.2 X8s (or 6 X4s) to destroy, whereas a level 1 portal with 1 level 8 resonator (6000 energy) takes 3.4 X8s (or 10 X4s) to destroy. The disadvantage of this stat is that it does not quite scale well between levels of bursters though, as the shorter range of bursters below 5 means it takes more of them on a spread out portal. I'm not sure the advantages of precision for lower level players would outweigh the advantages of showing all players the same number though.

It could be iteratively calculated using the scripts from IPAS (http://ipas.graphracer.com/ and http://github.com/xosofox/IPAS) and always firing from best location as calculated by the heat map, but the performance would suck. I'm thinking we need to come up with a formula that approximates those results.

What I actually came here to say is that getEffectiveLevel() in the current release version AP plugin is applying shields backwards (so stronger shields make the effective level go down), as did previous revisions of the getEffectivePortalEnergy() function on the effective branch, but it looks like it is being replaced. Whatever the final version is, please test to make sure to test that stronger shields make the effective energy go up, not down. I'll file a separate issue on getEffectiveLevel() since it hasn't been replaced yet. (Issue #449)

vita10gy commented 11 years ago

Yeah. I didn't put it in terms of effective level because I'm not sure that scales the same. If mitigation works backwards I'll check that out. I changed it in the meantime anyway.

I've also added a stat of how much damage you can expect from a burster. I might finish that and reopen the pull request this weekend.

vita10gy commented 11 years ago

Also the way I did it was just always from on the portal. It's all relative anyway. Looked at this way it doesn't matter if we have mitigation, attack damage, etc perfect because the crummy deployed low level low mitigation portals will still float to the top while the high level high mitigation well deployed portals sink to the bottom.