FO4 - Sortta
posted on April 2nd, 2022, 11:34 am
Ah, I see. I wasn't sure if it does anything. For some of the other parameters I do see much more clear results when I change them. I have fixed instant action and single player scenarios (I've made some missions using MMM) I use to test. I can often just run two instances side by side to see the difference. AI bases in my mod are pretty heavily guarded and I aim to make the AI crush bases with large fleets, but not so much that they will spend 99% of their time just building up.
It does seem like 1.0 results in more coordinated fleets than at 0.0. At 1.0 there seems to be less of the constant weaving towards and away base defenses and starbases and the AIs seem to steamroll an outnumbered enemy more quickly, but their fleets also seem more sluggish, taking longer to go after another enemy base after steamrolling one. I guess that's worth it because the AI tends to underestimate its numerical advantage so more steamrolling makes it behave more like a smart human would and concentrating forces as much as possible is a fundamental part of the art of war. It seems to work as follows: with a value of 0.9, 90% of the ships will be grouped into one fleet that goes after one goal.
While my AI was already aggressive, it's now downright scary how efficiently it will gang up on an opponent, especially multiple AIs working together and I'm sure I have to rebalance some of my missions before release to make them beatable again . But that's pretty much it between the AI system and me, I think there's nothing left to squeeze out of it now.
Some other things that made noticeable differences for me were the compute time (800 works much better than, say 200), the various map resolutions (goal map as small as possible, so 400, exploration large at 800, death map small at 100) and disabling defense, resource and escort goals (these will needlessly distract the AI), while only one exploration exec is necessary, especially with random scout set to 1.0. Also while min_matching ratio doesn't seem to do anything, max_matching ratio does, but in a very binary sort of way and only in single player missions where the AI starts out with a fleet: either it attacks or it doesn't do anything, that can literally be the difference between setting it to 1.0 and setting it to 1.1.
It does seem like 1.0 results in more coordinated fleets than at 0.0. At 1.0 there seems to be less of the constant weaving towards and away base defenses and starbases and the AIs seem to steamroll an outnumbered enemy more quickly, but their fleets also seem more sluggish, taking longer to go after another enemy base after steamrolling one. I guess that's worth it because the AI tends to underestimate its numerical advantage so more steamrolling makes it behave more like a smart human would and concentrating forces as much as possible is a fundamental part of the art of war. It seems to work as follows: with a value of 0.9, 90% of the ships will be grouped into one fleet that goes after one goal.
While my AI was already aggressive, it's now downright scary how efficiently it will gang up on an opponent, especially multiple AIs working together and I'm sure I have to rebalance some of my missions before release to make them beatable again . But that's pretty much it between the AI system and me, I think there's nothing left to squeeze out of it now.
Some other things that made noticeable differences for me were the compute time (800 works much better than, say 200), the various map resolutions (goal map as small as possible, so 400, exploration large at 800, death map small at 100) and disabling defense, resource and escort goals (these will needlessly distract the AI), while only one exploration exec is necessary, especially with random scout set to 1.0. Also while min_matching ratio doesn't seem to do anything, max_matching ratio does, but in a very binary sort of way and only in single player missions where the AI starts out with a fleet: either it attacks or it doesn't do anything, that can literally be the difference between setting it to 1.0 and setting it to 1.1.
posted on April 2nd, 2022, 7:26 pm
It's been interesting testing in SP and how you can watch the timing of everything. At precisely the same moment you can see all AI's send out their ships depending on which goal parameter file it's using at that moment. From what I read the finite state machine (FSM) with some behind the scenes settings determines when the AI switches goal parameter files.JanB wrote:Ah, I see. I wasn't sure if it does anything. For some of the other parameters I do see much more clear results when I change them. I have fixed instant action and single player scenarios (I've made some missions using MMM) I use to test. I can often just run two instances side by side to see the difference. AI bases in my mod are pretty heavily guarded and I aim to make the AI crush bases with large fleets, but not so much that they will spend 99% of their time just building up.
I wish the AI (and I've had limited success replicating it) would send 1 or 2 ships to perform a goal if it could win that goal, but just setting the min/max force values to say 1 min and 8 max doesn't always work. I wish the AI would sense danger, avoid it, go around or group more forces in a better more consistent way.JanB wrote:It does seem like 1.0 results in more coordinated fleets than at 0.0. At 1.0 there seems to be less of the constant weaving towards and away base defenses and starbases and the AIs seem to steamroll an outnumbered enemy more quickly, but their fleets also seem more sluggish, taking longer to go after another enemy base after steamrolling one. I guess that's worth it because the AI tends to underestimate its numerical advantage so more steamrolling makes it behave more like a smart human would and concentrating forces as much as possible is a fundamental part of the art of war. It seems to work as follows: with a value of 0.9, 90% of the ships will be grouped into one fleet that goes after one goal.
I agree with you that there's probably not much left to do with it. You had sent me your AI files before to have a look at them. Would you mind sending your latest so I can poke around with them? Just the hard_aggressive, defensive, exploration and very_aggressive ones with the strategic_AI_config? If not, no worries at all.JanB wrote:While my AI was already aggressive, it's now downright scary how efficiently it will gang up on an opponent, especially multiple AIs working together and I'm sure I have to rebalance some of my missions before release to make them beatable again . But that's pretty much it between the AI system and me, I think there's nothing left to squeeze out of it now.
I'd be interested in why you feel 800 works best? Is that for all situations (AIP) files or do you vary that value for each one? I wish the AI was dynamic enough to react in a more organic appearing manner. Appreciate our conversations as we continue too learn.JanB wrote:Some other things that made noticeable differences for me were the compute time (800 works much better than, say 200), the various map resolutions (goal map as small as possible, so 400, exploration large at 800, death map small at 100) and disabling defense, resource and escort goals (these will needlessly distract the AI), while only one exploration exec is necessary, especially with random scout set to 1.0. Also while min_matching ratio doesn't seem to do anything, max_matching ratio does, but in a very binary sort of way and only in single player missions where the AI starts out with a fleet: either it attacks or it doesn't do anything, that can literally be the difference between setting it to 1.0 and setting it to 1.1.
posted on April 2nd, 2022, 11:29 pm
Last edited by JanB on April 14th, 2022, 6:56 pm, edited 1 time in total.
I've attached my AIP files, I've written comments in them as well, most of it is stuff I've tested extensively, but some things are just working theories. Probably important to know: all combat ships have attackpower = 1.0 and intrinsicvalue 0.0, starbases, sensor arrays and turrets have attackpower = 1.0 and intrinsicvalue = 1.0, other stations have attackpower = 0.0 and intriniscvalue = 1.0. Scout units have scout = 1 so some of them will be activated by the scoutrandomlyratio = 1 line in an AIP. These settings generally work very well for me, though the AI doesn't defend its base well, even when they have ships sitting around on the other side of the base, but adding a defense goal makes them incredibly passive, I can't seem to find a middle ground. I'm definitely curious to hear what you have learned over the years. I can say that now having true single player missions (not just instant action games) to test makes it easier because I don't have to wait for the buildup phase, though what works well in a mission doesn't always work well in instant action, it still allows me to learn what an AI parameter does (if anything) more quickly and with a higher degree of certainty.
One thing I still want to try is to give non combat ships and stations a small attackpower value to see if that makes the AI mop up remants, though I'm not very hopeful since sometimes they neglect to hunt down remaining combat ships as well.
I used to get that behavior but now there's more variation in those timings (though still not a lot): probably because some of the AIs, depending on race and whether they outnumber the other team do more small scale raiding before the big fleets have been built up. I'm 99% sure this behavior used to happen mainly because one large AI fleet leaving its base triggers the others to do the same (an attack base goal can suddenly be made valid by many ships leaving that base), but also just because they roughly build ships at the same rate.
The AI sometimes does this, for example when hunting down a lone scout or mopping up a remnant station, but yeah, usually they send way too much or way too little, but I don't think we can really change that. I think the AI doesn't really have an upper limit for individual squads (except the overall max force limit) and definitely doesn't straightforward use the min and max force ratios. A lot also depends on the goal map resolution. I think it was generally also a really bad design choice to make attack base goals and attack (ships) goals conflict with each other.
I don't fully understand why 800 as recompute time works better, it just generally does in testing across multiple scenarios: 3 AIs will more quickly kill 2 others and an attacking force in a defense mission will hit harder. One theory I have is that the AI gets less distracted with a longer recompute time. They seem to stay more on target instead of running away as soon as they blow up one station and will follow more of a straight path towards an enemy base or fleet instead of stopping for every enemy scout they come across.
One thing I still want to try is to give non combat ships and stations a small attackpower value to see if that makes the AI mop up remants, though I'm not very hopeful since sometimes they neglect to hunt down remaining combat ships as well.
rifraf wrote:It's been interesting testing in SP and how you can watch the timing of everything. At precisely the same moment you can see all AI's send out their ships depending on which goal parameter file it's using at that moment. From what I read the finite state machine (FSM) with some behind the scenes settings determines when the AI switches goal parameter files.
I used to get that behavior but now there's more variation in those timings (though still not a lot): probably because some of the AIs, depending on race and whether they outnumber the other team do more small scale raiding before the big fleets have been built up. I'm 99% sure this behavior used to happen mainly because one large AI fleet leaving its base triggers the others to do the same (an attack base goal can suddenly be made valid by many ships leaving that base), but also just because they roughly build ships at the same rate.
rifraf wrote:I wish the AI (and I've had limited success replicating it) would send 1 or 2 ships to perform a goal if it could win that goal, but just setting the min/max force values to say 1 min and 8 max doesn't always work. I wish the AI would sense danger, avoid it, go around or group more forces in a better more consistent way.
The AI sometimes does this, for example when hunting down a lone scout or mopping up a remnant station, but yeah, usually they send way too much or way too little, but I don't think we can really change that. I think the AI doesn't really have an upper limit for individual squads (except the overall max force limit) and definitely doesn't straightforward use the min and max force ratios. A lot also depends on the goal map resolution. I think it was generally also a really bad design choice to make attack base goals and attack (ships) goals conflict with each other.
rifraf wrote:I'd be interested in why you feel 800 works best? Is that for all situations (AIP) files or do you vary that value for each one? I wish the AI was dynamic enough to react in a more organic appearing manner. Appreciate our conversations as we continue too learn.
I don't fully understand why 800 as recompute time works better, it just generally does in testing across multiple scenarios: 3 AIs will more quickly kill 2 others and an attacking force in a defense mission will hit harder. One theory I have is that the AI gets less distracted with a longer recompute time. They seem to stay more on target instead of running away as soon as they blow up one station and will follow more of a straight path towards an enemy base or fleet instead of stopping for every enemy scout they come across.
Attachments
- AIstuff.zip
- (5.69 KiB) Downloaded 161 times
posted on April 3rd, 2022, 4:02 am
Thanks Jan. A few interesting settings in your files as I go through them. I agree with your post in regards to the attackpower and intrinsicvalue settings however, as I don't use turrets in instant action for testing purposes and consider them not a strategic target I have then at 0 intrinsicvalue. I always figured if a turret was in front of a station and they both have an IV of 1.0 the AI would attack the turret first and risk getting killed as opposed to going around it to attack just the station if only the station had IV. Several times I got the AI to avoid turrets by going around them to get at jucier targets, but I couldn't always replicate it.
In my testing and the Upgrade Project Mod I removed all defensive weapons from non-combat ships (the Klingon freighter, repair ship, colony ship, and miner because there were times they'd stop what they were doing to attack ships which put the Klingons behind in gathering resources. I'd be interested knowing your results of giving them an attackpower value though.
I know FO uses the newdefault.aip file as the base then slightly modifies the hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP files and see you did too. Knowing this while I did all my testing I never modified that file at all so I wonder if the values in it were in some ways conflicting or competing with other AIP files I did edit? What's weird though is that when playing with the debugging mode active you can see the AI use and switch between hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP's never once showing name "newdefualt" so it's weird that the game still plays when you and FO uses it. You'd think that file name would appear in the debugger? Actually, it works because you're both using the #include command. Duh.
Going of the trail here but in the first Armada game there are AIP files that don't appear in Armada 2 like easy.aip, medium.aip, hard.aip, default, default_offensive, default_defensive, etc. Someday I may try dumping those in A2 and see if anything happens. Anyway, back on topic.
For the compute time the FO info from the original devs states "The AI adds new information to its strategic map every 400 cycles (so it takes 400 cycles before a Craft becomes a threat for instance, or 400 cycles before the Craft's movement to a new location is registered)." So every 6-7 seconds. Maybe that is just to fast and confuses the AI with what to do so maybe you're seeing that 800 gives it more room to breath so to speak?
In my testing and the Upgrade Project Mod I removed all defensive weapons from non-combat ships (the Klingon freighter, repair ship, colony ship, and miner because there were times they'd stop what they were doing to attack ships which put the Klingons behind in gathering resources. I'd be interested knowing your results of giving them an attackpower value though.
I know FO uses the newdefault.aip file as the base then slightly modifies the hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP files and see you did too. Knowing this while I did all my testing I never modified that file at all so I wonder if the values in it were in some ways conflicting or competing with other AIP files I did edit? What's weird though is that when playing with the debugging mode active you can see the AI use and switch between hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP's never once showing name "newdefualt" so it's weird that the game still plays when you and FO uses it. You'd think that file name would appear in the debugger? Actually, it works because you're both using the #include command. Duh.
Going of the trail here but in the first Armada game there are AIP files that don't appear in Armada 2 like easy.aip, medium.aip, hard.aip, default, default_offensive, default_defensive, etc. Someday I may try dumping those in A2 and see if anything happens. Anyway, back on topic.
For the compute time the FO info from the original devs states "The AI adds new information to its strategic map every 400 cycles (so it takes 400 cycles before a Craft becomes a threat for instance, or 400 cycles before the Craft's movement to a new location is registered)." So every 6-7 seconds. Maybe that is just to fast and confuses the AI with what to do so maybe you're seeing that 800 gives it more room to breath so to speak?
posted on April 3rd, 2022, 2:36 pm
rifraf wrote:Thanks Jan. A few interesting settings in your files as I go through them. I agree with your post in regards to the attackpower and intrinsicvalue settings however, as I don't use turrets in instant action for testing purposes and consider them not a strategic target I have then at 0 intrinsicvalue. I always figured if a turret was in front of a station and they both have an IV of 1.0 the AI would attack the turret first and risk getting killed as opposed to going around it to attack just the station if only the station had IV. Several times I got the AI to avoid turrets by going around them to get at jucier targets, but I couldn't always replicate it.
In my testing and the Upgrade Project Mod I removed all defensive weapons from non-combat ships (the Klingon freighter, repair ship, colony ship, and miner because there were times they'd stop what they were doing to attack ships which put the Klingons behind in gathering resources. I'd be interested knowing your results of giving them an attackpower value though.
I actually try to get them to attack the turrets and starbases, mainly because it's the only way they can win without overwhelming numbers, ie. without building up for 20 minutes and then rushing in with everything they've got, it's also better for single player missions. Non-combat ships don't have weapons in my mod, though I don't think it matters much, the AI only sees attackpower, intrinsicvalue and hitpoints, not weapons or weapons strength.
Giving non-combat ships an attackpower > 0 didn't work, or at least, it only works when you set the attack priority (for ships, not bases) so high that the AIs are forever attacking each other's fleets instead of each other's bases, which isn't worth it.
rifraf wrote:I know FO uses the newdefault.aip file as the base then slightly modifies the hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP files and see you did too. Knowing this while I did all my testing I never modified that file at all so I wonder if the values in it were in some ways conflicting or competing with other AIP files I did edit? What's weird though is that when playing with the debugging mode active you can see the AI use and switch between hard_aggressive, hard_defensive, hard_exploration and very_aggressive AIP's never once showing name "newdefualt" so it's weird that the game still plays when you and FO uses it. You'd think that file name would appear in the debugger? Actually, it works because you're both using the #include command. Duh.
Yes, exactly, it's the #include line that makes it work. And the newdefault AIP is definitely the default, I see that all the time in single player missions when I don't manually load an AIP: the debugger will show the parameters from the newdefault AIP and the AI will behave according to those parameters, it just won't show the name in the debugger, it will say something like "AIP: no AIP loaded yet".
rifraf wrote:For the compute time the FO info from the original devs states "The AI adds new information to its strategic map every 400 cycles (so it takes 400 cycles before a Craft becomes a threat for instance, or 400 cycles before the Craft's movement to a new location is registered)." So every 6-7 seconds. Maybe that is just to fast and confuses the AI with what to do so maybe you're seeing that 800 gives it more room to breath so to speak?
I think faster updates make it choose new goals more quickly because the threat map updates more quickly, so the AI becomes indecisive, though that can partially be remedied by setting the fleetairatio high (typically 1.0).
I did find out something new today: fleetairatio seems to override the max force ratio and min attack force parameters (like you already suspected) and the AI also doesn't defend its base with FAR above 0.9. I'm still checking if there is some intermediate value where I can get both defense and offense to work well. At 0.9 offense is not reliable: about 75% of the time they steamroll just like at 1.0, but 25% of the time they just stay very passive and the 3 AI team can even be defeated by the 2 AI team.
EDIT: hmmm, on further testing the FAR at 1.0 is not fully stable either. Commenting the FAR out makes the AI much more stable, will make it chase enemy remnants and will make it send nearby ships to defend its base, sometimes even recalling a fleet that just left or sending a fleet to defend an allied base that's being seriously attacked. The flipside is that it makes the AI more indecisive and it makes it take slightly longer to steamroll an enemy base, but maybe that's worth it.
I'm now getting okay, and most of all consistent and somewhat sensible, results across the board by commenting the fleetairatio out, raising the attack troops priority to 9999 (from 999), and I could even raise the max matching force ratio to 1.5 without it screwing things up in any of my testing scenatios (2.0 didn't work well anymore). Everything else has been left the way it was.
posted on April 4th, 2022, 12:30 am
I have a question about the following:
// JanB: this has to be small or the AI will build bases across the map
// and that splits up their concentration of force and the travel time for the
// construction ships slows down the build list, interestingly this seems to
// vaguely determine where the AI considers the numbered locations (second number
// of a build list line) to be, with negative values the AI won't build outside
// their base, with positive values they will, with zero it goes crazy and will
// cross the entire map to build a mining station
double resource_distance_multiplier = -99999.0;
If you have the AI build list set to build 3 mining stations as it progresses at locations 0, 1 then 2 for instance, does it still move out of it's base to build them around moons further away? It has to expand to reach more resources.
Also for your setting below:
// JanB: these values seem to be for the total fleet, not per MAX_EXEC squad
int min_attack_force = 12;
Do you see that the AI waits until it has 12 ships built before it attacks? Whatever value I set there in past that is the minimum number of ships the AI attacks with for the most part
// JanB: this has to be small or the AI will build bases across the map
// and that splits up their concentration of force and the travel time for the
// construction ships slows down the build list, interestingly this seems to
// vaguely determine where the AI considers the numbered locations (second number
// of a build list line) to be, with negative values the AI won't build outside
// their base, with positive values they will, with zero it goes crazy and will
// cross the entire map to build a mining station
double resource_distance_multiplier = -99999.0;
If you have the AI build list set to build 3 mining stations as it progresses at locations 0, 1 then 2 for instance, does it still move out of it's base to build them around moons further away? It has to expand to reach more resources.
Also for your setting below:
// JanB: these values seem to be for the total fleet, not per MAX_EXEC squad
int min_attack_force = 12;
Do you see that the AI waits until it has 12 ships built before it attacks? Whatever value I set there in past that is the minimum number of ships the AI attacks with for the most part
posted on April 4th, 2022, 7:18 am
rifraf wrote:If you have the AI build list set to build 3 mining stations as it progresses at locations 0, 1 then 2 for instance, does it still move out of it's base to build them around moons further away? It has to expand to reach more resources.
Yes, it will build everything in its starting base, even if you have multiple locations in your build list. I chose to set this because the AI spreading out just doesn't work well on many maps. They'll typically get massacred for spreading out their forces and often multiple construction ships will trek across the map to build one station, unnecessarily delaying the build list.
rifraf wrote:Also for your setting below:
// JanB: these values seem to be for the total fleet, not per MAX_EXEC squad
int min_attack_force = 12;
Do you see that the AI waits until it has 12 ships built before it attacks? Whatever value I set there in past that is the minimum number of ships the AI attacks with for the most part
Yes, just about, though their has to be a valid goal for them to go after with that troop strength and the fleetairatio can override this.
posted on April 4th, 2022, 4:45 pm
Oh, btw, do you think I should include an Armada2.exe in my release, or not?
posted on April 4th, 2022, 5:33 pm
I'm planning not to. Unless it's absolutely necessary for the mod to run properly. It would be great if there would be a file list that were modified in 4.0
posted on April 4th, 2022, 5:38 pm
FO 4.0 still runs with the same Armada2.exe, I just plucked it from the Armada 2 copy I bought on GOG, that works fine. It's not for technical reasons, I was just thinking it was easier to install (and free) for people with the .exe included, but then I'd be giving a copyrighted game .exe away for free... Is it because of that last part you plan not to include an .exe?
posted on April 5th, 2022, 4:56 pm
Exactly. Usually if you're modding you're allowed to change almost anything. But the exectuable is always a no-go zone, that cannot be touched by modders. There were several mods taken down form Armada2files back then because they included the executable.
The reasoning is that with the executable you basically give access o the game for free.
The reasoning is that with the executable you basically give access o the game for free.
posted on April 5th, 2022, 5:37 pm
Ah, well then I'll leave it out and include instructions on how to paste in an .exe file from the GOG and disc versions. My mod basically is a complete game (especially because it runs on FO 4.0 which very few people have installed), but yeah, since December Armada 2 is easily available for only 10 dollars/euros on GOG, so the old excuse that it's hard to find an .exe file and that no one is losing money when you pirate it isn't valid anymore.
posted on April 10th, 2022, 11:11 pm
Hey there. Started playing around with your AIP's finally and you may already know this, but none of the AI's would build metal collection in Instant Action (Borg and 8472 can always gather it with their freighters, but Feds, Klingons, Cardies and Romulans can't.) I changed double resource_distance_multiplier = -99999.0; to 8000.0 and put the following settings back to stock as shown:
double resource_dilithium_tendency = 1.0;
double resource_latinum_tendency = 0.0;
double resource_metal_tendency = 1.0;
double resource_biomatter_tendency = 1.0;
It then started gathering metal resources. After that your AI started attacking up pretty quick with my build lists and attacked hard. Looks good so far. Good job. I'll let you know if I notice anything else.
double resource_dilithium_tendency = 1.0;
double resource_latinum_tendency = 0.0;
double resource_metal_tendency = 1.0;
double resource_biomatter_tendency = 1.0;
It then started gathering metal resources. After that your AI started attacking up pretty quick with my build lists and attacked hard. Looks good so far. Good job. I'll let you know if I notice anything else.
posted on April 11th, 2022, 6:48 pm
Yeah, there's no metal mining in my mod (or FO). I'm glad the values work for you, that wasn't at all guaranteed since a lot probably depends on things like how fast ships can be built, their relative shield strength and firepower (also comparted to base defenses), their speed, etc...
posted on April 12th, 2022, 12:19 am
JanB wrote:Yeah, there's no metal mining in my mod (or FO). I'm glad the values work for you, that wasn't at all guaranteed since a lot probably depends on things like how fast ships can be built, their relative shield strength and firepower (also comparted to base defenses), their speed, etc...
Ah, I wasn't aware you removed metal as a resource. Makes sense then. Well, so far in stock A2 testing in Instant Action your AI performs well. Still messing around with it. I'm using all the other settings from the Upgrade Project mod that adjusts basic things like attackpower, intrinsicvalue, things AI related to make it play better without changing any other stock behavior. I have it building battleships less than 5 minutes or so in so it builds up quick. May I use your AI settings mixed with my own for future releases of the next Upgrade Project mod?
Who is online
Users browsing this forum: No registered users and 2 guests