• 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.

A2 AI Modding

dvatreknerd314

Lieutenant, Junior Grade
Clone Force 99
Joined
31 Jul 2012
Messages
1,363
Age
32
Hi all. This may have been asked before so forgive me however, there is refernece to Easy_AI, Medium_AI and Hard_AI with "AI_Easy_Script.dsl" referenced for each in the RTS_CFG file in A2. Does anyone know where these .dsl files may be if they exist? Are they buried in the code somewhere?
Those may not exist anymore. DSL files seem to be related to missions, but I'm not finding those exact files. It's possible the dev team were originally going to use such files, then changed their minds further on. I think the DSL files were below the point in the RTS code that was claimed to have been cleaned of unused parameters
 

Rifraf

I know just enough to be a danger to myself
Joined
25 Aug 2013
Messages
1,235
Age
51
I figured they might be leftover code, but wasn't sure. Thanks for getting back.
 

Rifraf

I know just enough to be a danger to myself
Joined
25 Aug 2013
Messages
1,235
Age
51
So, I thought I'd resurrect this thread as I've been play testing the AI again. On a hunch I wondered what Chat GPT would do if I fed it info about the game including a lot of info from the Dark Reign Artificial Intelligence Design Guide (some of the code from DR is in Armada) and info from Armada including the scheduler program and the newdefault.aip from the AI folder in A2. Then I started asking what specific coding means in the AI and got some good and interesting answers. I can post some of the results if anyone is interested.

But my main reason here is to pick the minds of fellow modders. I am focusing on this bit which is all set a 0 from the very_aggressive.aip in stock A2:
double threatModifier = 0;
int human_target_raw_bonus = 0;
int max_misc_bid_bonus = 0;
int persistence_modifier = 0;
int threat_proximity_modifier = 0;
int max_danger_raw_bonus = 0;
int max_threat_raw_bonus = 0;

In aggressive.aip they are set as the following:
int max_danger_raw_bonus = 10;
int max_threat_raw_bonus = 10;
int threat_proximity_modifier = 10;
int human_target_raw_bonus = 200;
int max_misc_bid_bonus = 600;
int persistence_modifier = 100;

For the most part I feel the AI plays way better with them all set at 0 even though you would think having values there would make the AI smarter. Anyone have ideas as to why they don't seem to work as intended? Chat GPT explains these as the following:

These bid modifiers influence the bidding process within the AI scheduler and can affect how the AI prioritizes and evaluates different goals and actions.

threatModifier:
This modifier adjusts the bid based on the perceived threat level. A higher value increases the bid for goals or actions that mitigate threats, such as defending against enemy attacks or attacking enemy bases.
human_target_raw_bonus:
This modifier provides a bonus to the bid for goals or actions targeting human-controlled entities. It encourages the AI to prioritize objectives related to engaging or countering human players.
max_misc_bid_bonus:
This parameter sets the maximum bonus that can be added to a bid for miscellaneous goals or actions. It limits the influence of miscellaneous factors on bid values.
persistence_modifier:
This modifier affects the bid based on the persistence of a goal or action. It encourages the AI to prioritize goals that have been pursued persistently over time, promoting consistency in strategy.
threat_proximity_modifier:
This modifier adjusts the bid based on the proximity of threats. Goals or actions related to threats in closer proximity to AI-controlled entities receive a higher bid, reflecting the urgency of addressing nearby dangers.
max_danger_raw_bonus:
This parameter sets the maximum bonus that can be added to a bid for goals or actions related to high-danger situations. It caps the influence of danger-related factors on bid values.
max_threat_raw_bonus:
This parameter sets the maximum bonus that can be added to a bid for goals or actions related to high-threat situations. It limits the influence of threat-related factors on bid values.

Overall, these bid modifiers allow the AI to adapt its decision-making process based on the perceived threat level, the presence of human players, persistence of goals, and the urgency of addressing nearby threats or dangers. Adjusting these modifiers can fine-tune the AI's behavior to align with desired gameplay dynamics and challenges.
 

Admiral*Alex

Petty Officer 2nd Class
Joined
4 Apr 2018
Messages
212
Age
26
So, I thought I'd resurrect this thread as I've been play testing the AI again. On a hunch I wondered what Chat GPT would do if I fed it info about the game including a lot of info from the Dark Reign Artificial Intelligence Design Guide (some of the code from DR is in Armada) and info from Armada including the scheduler program and the newdefault.aip from the AI folder in A2. Then I started asking what specific coding means in the AI and got some good and interesting answers. I can post some of the results if anyone is interested.

But my main reason here is to pick the minds of fellow modders. I am focusing on this bit which is all set a 0 from the very_aggressive.aip in stock A2:
double threatModifier = 0;
int human_target_raw_bonus = 0;
int max_misc_bid_bonus = 0;
int persistence_modifier = 0;
int threat_proximity_modifier = 0;
int max_danger_raw_bonus = 0;
int max_threat_raw_bonus = 0;

In aggressive.aip they are set as the following:
int max_danger_raw_bonus = 10;
int max_threat_raw_bonus = 10;
int threat_proximity_modifier = 10;
int human_target_raw_bonus = 200;
int max_misc_bid_bonus = 600;
int persistence_modifier = 100;

For the most part I feel the AI plays way better with them all set at 0 even though you would think having values there would make the AI smarter. Anyone have ideas as to why they don't seem to work as intended? Chat GPT explains these as the following:

These bid modifiers influence the bidding process within the AI scheduler and can affect how the AI prioritizes and evaluates different goals and actions.

threatModifier:
This modifier adjusts the bid based on the perceived threat level. A higher value increases the bid for goals or actions that mitigate threats, such as defending against enemy attacks or attacking enemy bases.
human_target_raw_bonus:
This modifier provides a bonus to the bid for goals or actions targeting human-controlled entities. It encourages the AI to prioritize objectives related to engaging or countering human players.
max_misc_bid_bonus:
This parameter sets the maximum bonus that can be added to a bid for miscellaneous goals or actions. It limits the influence of miscellaneous factors on bid values.
persistence_modifier:
This modifier affects the bid based on the persistence of a goal or action. It encourages the AI to prioritize goals that have been pursued persistently over time, promoting consistency in strategy.
threat_proximity_modifier:
This modifier adjusts the bid based on the proximity of threats. Goals or actions related to threats in closer proximity to AI-controlled entities receive a higher bid, reflecting the urgency of addressing nearby dangers.
max_danger_raw_bonus:
This parameter sets the maximum bonus that can be added to a bid for goals or actions related to high-danger situations. It caps the influence of danger-related factors on bid values.
max_threat_raw_bonus:
This parameter sets the maximum bonus that can be added to a bid for goals or actions related to high-threat situations. It limits the influence of threat-related factors on bid values.

Overall, these bid modifiers allow the AI to adapt its decision-making process based on the perceived threat level, the presence of human players, persistence of goals, and the urgency of addressing nearby threats or dangers. Adjusting these modifiers can fine-tune the AI's behavior to align with desired gameplay dynamics and challenges.
It could be the opposite. The lower the value, the higher priority the AI will do things. If it's a higher value, the lower priority the AI will target things.
 

Rifraf

I know just enough to be a danger to myself
Joined
25 Aug 2013
Messages
1,235
Age
51
It could be the opposite. The lower the value, the higher priority the AI will do things. If it's a higher value, the lower priority the AI will target things.
It could be opposite. Chat GPT could certainly be incorrect. Using values of 0 certainly seem to remove constraints and make the AI play better. One frustrating thing is no two games play the same on the same map with no changes to the AI. It just seems where which AI starts and who attacks who first makes each game different and hard to judge what each setting in each .aip does. It's fun testing though.

I'll post my latest AIP's if anyone is interested in trying them out.
 

Admiral*Alex

Petty Officer 2nd Class
Joined
4 Apr 2018
Messages
212
Age
26
It could be opposite. Chat GPT could certainly be incorrect. Using values of 0 certainly seem to remove constraints and make the AI play better. One frustrating thing is no two games play the same on the same map with no changes to the AI. It just seems where which AI starts and who attacks who first makes each game different and hard to judge what each setting in each .aip does. It's fun testing though.

I'll post my latest AIP's if anyone is interested in trying them out.
I'd definitely like to try them out.

For testing, I tend to use 1v1 maps with the same tactic. Massive Defence batteries, so I can mess around against the AI. It's crude, but it might help narrow down AI responses to different situations.

A better solution is making a testing map with everything built with the human player separated so you can observe two AI players Duke it out without interfering. Aka an observer mode.
 

Rifraf

I know just enough to be a danger to myself
Joined
25 Aug 2013
Messages
1,235
Age
51
Hope to get them posted tonight. Let me know your thoughts if you wouldn't mind.
 

Admiral*Alex

Petty Officer 2nd Class
Joined
4 Apr 2018
Messages
212
Age
26
Hope to get them posted tonight. Let me know your thoughts if you wouldn't mind.
Of course! Not sure when I will be mentally able to mess around with the AI, but will definitely let you know my thoughts
 

Rifraf

I know just enough to be a danger to myself
Joined
25 Aug 2013
Messages
1,235
Age
51
Here is the latest AI I've had good play success with. Inside the zip is a folder with 5 aip files. Unzip the 5 aip files to your root game directory in the AI>AIPs file. These are for playing on the hardest difficulty. I'm always testing and fine tuning but I'd be curious if anyone thinks they play well or has ideas to improve them.
 

Attachments

  • STA2 AI.rar
    4.8 KB · Views: 0
Top