• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

An Experiment

S

StarBlade

Deleted Due to Inactivity
Former MSFC Member
So I wanted to find out what exactly the "attackPower" (AP) and "intrinsicValue" (IV) indicators did. Here's my results. It took me an hour or so. But it was really a fascinating little way to kill a boring afternoon.

In order to find out how things would work, I took a variety of absolutely identical versions of my version of the Romulan Norexan class warbird, which replaces the Venator in my game, and ODF-modded them to vary their AP and IV indicators. I chopped the sensor ranges down to 300.0f so they couldn't see to attack but left their weapons intact. Part of the reason I chose the Norexan is because this is a fairly big model ingame, so it'd be easy to see on anyone else's sensor range. And that's what I looked at next.

I wanted to see which one the game would decide was more worthy of its attention. As my hunter, I chose (appropriately enough) a small Federation attack ship made by R5D5 called the Hunter class, with an extended sensor range of 1000.0f, and its typical complement of weapons. I chose this one because it has no special weapons. All I wanted to see was which target the Hunter went after first.

I determined where in the map editor was precisely 0.0x 0.0y 0.0z was located, and measured out from there. On either side of the Hunter, at ranges of 400.0f (measured precisely in the map editor), I placed Norexan class warbirds with varying AP and IV numbers indicated. It was absolutely critical that I place them on either side of the Hunter at precisely ninety degrees from forward heading, so that the game had to evaluate and determine which one it would strike. I took a few stabs at placing them directly behind the Hunter, stacked on top of each other in the z-axis instead, but I got bored after doing this for an hour and a half, so I just ran a couple obvious tests.

Here's how I configured the test:

Test Object 1 - AP 0.0 IV 0.0
Test Object 2 - AP 1.0 IV 1.0
Test Object 3 - AP 0.5 IV 0.5
Test Object 4 - AP 0.0 IV 1.0
Test Object 5 - AP 1.0 IV 0.0
Test Object 6 - AP 1.0 IV 0.5
Test Object 7 - AP 0.5 IV 1.0
Test Object 8 - AP 2.0 IV 0.0
Test Object 9 - AP 0.0 IV 2.0

I ran it, in the finest tradition of playoff hockey, as a best-of-seven. I varied which one I placed first(home-field advantage, if you will) and there really wasn't a difference. A couple times the double weapon set (torps and phasers) went in different directions, one to the left, the other to the right. I waited for the Hunter to commit to one Norexan or another before declaring a winner.

Here's the results. Where I've indicated "Hunter to the left", that means it was essentially a tie-- the game always attacks what's in the top-left corner of the map first unless it can find some other reason, like AP or IV, for instance, to find another target.

1 v 1 - left-side 1
1 v 2 - winner was 2
2 v 3 - winner was 2

So far, so good, right?

4 v 2 - winner was 2
5 v 2 - winner was 2
3 v 5 - winner was 5
6 v 5 - Hunter to the left
7 v 6 - winner was 6
8 v 5 - winner was 8

Now, I know-- it's only technically supposed to go to 1. But the game followed the numerical value beyond the decimal point.

9 v 8 - winner was 8
7 v 4 - winner was 7
2 v 9 - winner was 2

And so on.

My conclusion is based on the results. I think it's pretty clearly obvious that "intrinsicValue" as a field is useless when it comes to starship vs. starship action. The game only cares about the "attackPower" value once the weapons are locking on. I ran tests using random "let's see what happen" results as well, using the nine listed values. The results were always the same, even in one-offs. Given no other variables based upon which to make its choice, the game will always, ALWAYS go after the ship with the highest AP value listed, REGARDLESS of IV.

This may not be the case, however, strategically, over the long game. It's entirely possible that the AI evaluates, on a strategic rather than on a tactical basis, WHERE it's going to attack based on IV. This test doesn't really prove anything in the long game, after all. My Hunter class starship was Pavlov's Dog for the day, essentially. But it's possible that the calculations based on IV are far more deeply rooted in the long game than the AP. It reacts to the AP, but maybe it plans based on the IV. At present I have no idea how to test it, and no real inclination to do so, either.

If IV does, in fact, work like this, then giving mining installations and other stations (and even starships) greater IV indicators, or maybe both AP and IV, might be a way to prevent the game from conducting the "base rush" that seems to be its only real move. The AI player always keeps its strength immediately around its home base, then strikes out specifically (and usually only) at other players' home bases. This creates all sorts of stupid situations in which you spank the AI players simply by waiting until they've launched their attack against your base to destroy their starbase after they've broken themselves against your defenses, which you placed (of course) right along the path you KNEW they would take to get to you, the same path they take every single stupid time. Perhaps a modification of game values might prevent this stupid rush from taking place. Then again, probably not.

One last thing. I found it fascinating that, without sensor range active, a ship that can't be seen will simply be able to attack an AI vessel with impunity. I left the Hunter alone with a Norexan (which has something like 1500 hitpoints to the Hunter's 250). All of the Hunter's weapons were beyond the range of the Norexan's sensors. Its phasers were 450 and its torpedoes 500. So it sat comfortable in the fog and pounded the Norexan until it was a wreck. The Norexan made no evasive or defensive move at all. It just sat there, rolled over and died. This is a seriously questionable way to run a ship, of course, let alone one of the Praetor's finest warbirds. Just while we're on the subject of the stock AI being dumber than a Pakled remedial student.

Needless to say, I have little intention of trying such a test again anytime soon, whether with "intrinsicValue" or any other indicator. I would be curious to know if the game will make a different choice and attack the better-armed ship, for instance, or the tougher ship, or how classLabel values enter into the equation.
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,560
Age
47
Good work man. Freyr should find the info useful for sure. Not yet sure what the resto of us shoulf fo with it though:confused:
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,132
Age
34
Thanks for sharing the results, man! I can certainly put these to good use in Wastelands! :thumbsup:
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
This is a great find, especially if you're right about intrinsic value determining target area. Making the AI focus on mining stations and have high retreat rates could finally make for a good hit-and-run style AI.
 
S

StarBlade

Deleted Due to Inactivity
Former MSFC Member
Making the AI focus on mining stations and have high retreat rates could finally make for a good hit-and-run style AI.

This is the next logical step, I just have no idea how to implement it successfully. Using stock values, intrinsicValue for a starbase is 2.0 while for a mining base it's 1.5f, same as for orbitals. So it's not THAT much higher. The effect may be cumulative, however-- the AI may group targets in a specified area in a total IV and thus always targets your main base because it's got yards and starbases and research stations. Offsetting that by giving mines and orbitals a ludicrously large value (like 20.0f or more) might do the trick. Worth another experiment, perhaps. But I don't know if it'd be as precise.
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
You could try building yards and research stations by the mining bases, but leave the starbase(s) at the starting point, see if the AI goes for them more then based on their combined IVs, or if its just about where most of the enemy is. It may even be related to the starting points, since thats where the main base is 'supposed' to be, maybe the AI just assumed thats where it is and goes there by default or something :confused:

Like you said the problem is gonna be working out what factor is contributing to the AIs behaviour, but this is really interesting stuff so I'd be fascinated to see what happens.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
I know this thread is positively ancient by now, but I was tinkering with intrinsicValue and attackPower for the next FO patch and I believe we've identified the functionality :). Starblade's methodology outlines it pretty well, so these explanations just provide more specific explanations if anyone is interested :cool:

attackPower
intrinsicValue
 

CptBenSisko

The Emissary
Joined
2 Feb 2010
Messages
610
Dom, does that mean that the game will add maxShields and maxHealth together and then divide? sooo for example if i take my Sovereign which has a maxHealth = 11875 and maxShields = 16281 and then divide that by two = 14078.. but then i take the exact same ship and increase its value to 4.0 which makes its value 4039? it will attack the lesser target correct?
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Yup, it's just the absolute number of hitpoints (shield+hull). So your Sovie has 28156 hitpoints total: an attackPower of 2.0 gives you 14078, and an attackPower of 4.0 gives you 7039 . The vessel with an attackPower of 4.0 will be much more preferred to the attackPower = 2.0 vessel. :thumbsup:

EDIT: Doca just informs me that in Stock Armada II it might be that only shield hitpoints are taken into consideration (not hull hitpoints at all), so would be important if you are not using FO :)
 
Last edited:

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,560
Age
47
In stock all the shield and hull values are the same. You have to dilberatly code a different shield value for them to not match up
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Aye, I'm just talking about the coding backend - aka, in FO attackPower uses shield+hull hitpoints while in stock A2 (if the remembrance is correct), it's just hull hitpoints. Shieldless vessels should basically be ignored for that reason in stock A2 :)
 
Top