Can It Learn
Post ideas and suggestions on new features or improvements here.
posted on March 28th, 2010, 4:16 am
I'm curious as to whether the Fleet Ops AI has, or can have the ability to learn, adapt, or gain experience at all? The most familiar example that comes to mind at the moment is the Podbot from counterstrike.
Is it implementable at all to give this AI the ability to learn? Ex: if you attack it in the same place on a map all the time, it'll start hiding there or fortifying it?
100/100 I prefer to fire up a multiplayer game on Tunngle (preferred dodgy VPN for the moment, til they screw it up somehow) But when my stolen internet takes a dive, it does so into an empty pool (hard, brain damage, wheelchair, etc...)
Anyway, as far as any AI coders go, F/O, A2, or otherwise, has anyone looked into this, or is it simply impossible for this type of configuration?
Is it implementable at all to give this AI the ability to learn? Ex: if you attack it in the same place on a map all the time, it'll start hiding there or fortifying it?
100/100 I prefer to fire up a multiplayer game on Tunngle (preferred dodgy VPN for the moment, til they screw it up somehow) But when my stolen internet takes a dive, it does so into an empty pool (hard, brain damage, wheelchair, etc...)
Anyway, as far as any AI coders go, F/O, A2, or otherwise, has anyone looked into this, or is it simply impossible for this type of configuration?
posted on March 28th, 2010, 4:23 am
ha no it cant learn (in a since no ai can learn but there are some that are programed to be more dynamic) maybe at some point in the future it will be able too. After all FO taught the AI to use cloak.
posted on March 28th, 2010, 5:18 am
Last edited by cabal on March 28th, 2010, 5:20 am, edited 1 time in total.
FO didn't teach the AI to use cloak, they just adjusted the value in the AIP about how far the ship has to move to use the cloak. Also, the AI can technically learn to a limited extent. There is a value in the AIP that defines how many ships it can lose in an area before it starts avoiding it. The higher value is actually good because if it loses too many ships at your base it simply stops attacking entirely, which was a serious problem in stock Armada 1. In case anybody is wondering, I am a modder and I have looked into this before.
posted on March 28th, 2010, 5:23 am
hey i was going for the easy explanation here lol
posted on March 28th, 2010, 1:08 pm
Last edited by Optec on March 28th, 2010, 1:11 pm, edited 1 time in total.
AIs can learn (after all thats what they are all about), and to a certain degree the Fleet Operations AI already does that. It remembers places where it encounters hostile and the like and acts accordingly. Our current possibilities are just very limited. there will be more improvements in the future
and nope, the Fleet Ops AI uses cloak to save their ships in repair orders, for example. the config file entries are quite irrelevant. We also improved the usage of special abilities, but thats stuff that is not very obvious. yep, there will also be more improvements in the future
and nope, the Fleet Ops AI uses cloak to save their ships in repair orders, for example. the config file entries are quite irrelevant. We also improved the usage of special abilities, but thats stuff that is not very obvious. yep, there will also be more improvements in the future
posted on March 28th, 2010, 1:25 pm
So, if the AI works on where it encounter hostiles, could you trick it? Like send say 3 separate fleets to one area, and have your main force go in a different way and flank them?...
posted on March 29th, 2010, 12:14 pm
I'd like an AI that can make mistakes too. Just more and more human. 

posted on March 29th, 2010, 4:42 pm
It wouldn't really be intelligent then would it, if it intentionally made mistakes?!! :-p
posted on March 30th, 2010, 1:28 am
Well, the term is Artificial Intelligence, not necessarily "Lot's-of-Artificial Intelligence" And there's nothing wrong with intentionally programming something to do stupid things. In fact:
//Professor J Mental Command Console - Welcome!
//2133hrs - status good
>>Insert command: BEER
//WARNING. You are about to change system settings? Proceed? Y/N
>>Y
//2327hrs - bad command or file name
//Cellular terminal active. Dialing Phone Book Entry #14: "Ex"
>>Insert Dialog: Heeeey!
//Connection Lost
//WARNING. You are about to trip over the coffee table. Proceed? Y/N
>>Y
//WARNING. You are in need of medical attention. Open Cellular Terminal? Y/N
>>Y
Cellular terminal active. Dialing Phone Book Entry #14: "Ex"
>>Insert Dialog: Hasit-uuuuuhhhwhassup?
//Connection Lost
//Entering Sleep Mode
//Professor J Mental Command Console - Welcome!
//2133hrs - status good
>>Insert command: BEER
//WARNING. You are about to change system settings? Proceed? Y/N
>>Y
//2327hrs - bad command or file name
//Cellular terminal active. Dialing Phone Book Entry #14: "Ex"
>>Insert Dialog: Heeeey!
//Connection Lost
//WARNING. You are about to trip over the coffee table. Proceed? Y/N
>>Y
//WARNING. You are in need of medical attention. Open Cellular Terminal? Y/N
>>Y
Cellular terminal active. Dialing Phone Book Entry #14: "Ex"
>>Insert Dialog: Hasit-uuuuuhhhwhassup?
//Connection Lost
//Entering Sleep Mode
posted on March 31st, 2010, 5:26 am
Last edited by glenflet on March 31st, 2010, 6:03 am, edited 1 time in total.
You could add a new state to the AI system agitation, it would basically be how angry the AI is.
i.e. the value becomes more positive the more you destroy its ships, i.e more angry, there for less rational
and it becomes more negative when is destroys your ships, i.e. less angry, there for more rational
the level of base rationalty would be differet for differet races.
i.e. kilogns not very 0.5, federation 1.0, borg 2.0 or so
the more rational the AI is at any give time the more impoortants it place on the problity of sceuss of an action.
could use a simple equation to calculate
such as rational=base-sqrt(anger)
and if problity=1.0 always do, if problity=0.0 only do if rational is less than -100, if rational is more than 100 only do it problity better that .9 etc
important the problity is not nesscary the chance of winning the engegment, it could be of destroying the oppents ships yard, starbase or mining facitlys, etc.
that would achive the ablity for an AI to do stupid thing, but in a simlar way to how humans do stupid things.
you could also look a other emotional state.
just need to work out what will increasse them, and what will decress them and how they affect the AIs decssions, for example high fear factor the AI should build lots of turrets at tis bases, and keep a large fleet for defense.
Basic code Need Futher Development:
i.e. the value becomes more positive the more you destroy its ships, i.e more angry, there for less rational
and it becomes more negative when is destroys your ships, i.e. less angry, there for more rational
the level of base rationalty would be differet for differet races.
i.e. kilogns not very 0.5, federation 1.0, borg 2.0 or so
the more rational the AI is at any give time the more impoortants it place on the problity of sceuss of an action.
could use a simple equation to calculate
such as rational=base-sqrt(anger)
and if problity=1.0 always do, if problity=0.0 only do if rational is less than -100, if rational is more than 100 only do it problity better that .9 etc
important the problity is not nesscary the chance of winning the engegment, it could be of destroying the oppents ships yard, starbase or mining facitlys, etc.
that would achive the ablity for an AI to do stupid thing, but in a simlar way to how humans do stupid things.
you could also look a other emotional state.
just need to work out what will increasse them, and what will decress them and how they affect the AIs decssions, for example high fear factor the AI should build lots of turrets at tis bases, and keep a large fleet for defense.
Basic code Need Futher Development:
- Code: Select all
class AIEmotion {
private:
double anger=0.0;
double fear=0.0;
double angerrate;
double fearrate;
double rational
double rationlity;
public:
AIEmotion(double angerrate = 0.1, double fearrate = 0.03, double rational = 2.0);
void updateRationlity();
void hurt(double factor = 1.0);
void heal(double factor = 1.0);
void destroy(double factor = 1.0);
void dodestroy(double factor = 1.0);
double shoulddo(double chance = 0.5);
double shoulddef();
double shouldattack();
};
AIEmotion::AIEmotion(double angerrate, double fearrate, double rational) {
this->angerrate = angerrate;
this->fearrate = fearrate;
this->rational = rational;
this->updateRationlity(); }
void AIEmotion::updateRationlity() { // Recalculate Rationlity
this->rationlity = this->rational + this->anger*0.8 + this->fear*0.2;
if (this->fear > 2) { // Extreame Fear
this->rationlity += this->fear*this->fear*0.15/this->anger; } }
void AIEmotion::hurt(double factor) {
this->anger += factor*this->angerrate*0.4;
this->fear +=factor*this->fearrate*0.5;
}
void AIEmotion::heal(double factor) {
this->anger -= factor*this->angerrate*0.25;
this->fear -=factor*this->fearrate*1.2;
}
void AIEmotion::destroy(double factor) {
this->anger += factor*this->angerrate*1.2;
this->fear += factor*this->fearrate*1.2;
}
void AIEmotion::dodestroy(double factor) {
this->anger -= factor*this->angerrate*1.1;
this->fear -= factor*this->fearrate*0.01;
}
double AIEmotion::shoulddo(double chance = 0.5) {
this->updateRationlity();
double r = this->rationlity;
if (r < -100) { r = -100; }
if (r > 100) { r = 100; }
r += 100;
r /= 200;
double c = chance;
c * = 1-r*r;
if (r<0.05) { c += 0.2; }
if (r>0.95) { c -= 0.1; }
if (c>1.0) { c = 1.0; }
if (c<0.0) { c= 0.0;}
return c; }
double shoulddef() {
if (this->fear < 0.0) { return 0.1; }
double ff = -this->fear/this->anger;
double sd = 1.0;
if (ff >= 1.0) { return sd; }
if (ff <= 0.0) { return 0.1; }
return ff*sd; }
double shouldattack() {
if (this->anger < 0.0) { return 0.2; }
double a = this->anger/6;
if (a >= 1) { return 1.0; }
if (a <= 0.2) { return 0.2; }
return a; }
posted on April 2nd, 2010, 6:38 pm
your code would work ok but it would mean finding some way to remove the AI for A2 and telling it to use something else
posted on April 8th, 2010, 10:25 pm
would it be possible to edit the AI so that it would use my code to modify the probability of different events, I'm assuming A2 use a probability based AI, based on the AI information I've seen in the odf files.
rather then write a New one, since my code in it self is not an AI its just a limited emotion simulator based on how events should affect the mood of the AI, which should then modify the probability of different actions.
You could possibly get it to modify the following in real-time for each AI instance, the variable should all ready exist in the AI
int MAX_EXEC_ATTACK_BASE
int MAX_EXEC_ATTACK
int MAX_EXEC_DEFEND
int MAX_EXEC_ESCORT
int MAX_EXEC_EXPLORE
int MAX_EXEC_RESOURCE
int MAX_EVAL_ATTACK_BASE
int MAX_EVAL_ATTACK
int MAX_EVAL_DEFEND
int MAX_EVAL_ESCORT
int MAX_EVAL_EXPLORE
int MAX_EVAL_RESOURCE
int attack_troops_priority
int attack_region_priority
int defend_priority
int attack_enemy_base_priority
int exploration_priority
int escort_priority
int resource_priority
int perimeter_priority
int min_attack_force
int min_defense_force
int min_escort_force
int min_perimeter_force
int min_exploration_force
int max_attack_force
int max_defense_force
int max_escort_force
int max_perimeter_force
int max_exploration_force
int distance_from_home_priority_modifier
int distance_from_enemy_priority_modifier
double max_matching_force_ratio
double fleetAIRatio
int avoid_danger_priority_modifier
You could load the base values in to the new code and have it update the ones used by the AI every N milliseconds.
That could probably be easier then changing the AI engine, not sure weather it could be done or not though.
rather then write a New one, since my code in it self is not an AI its just a limited emotion simulator based on how events should affect the mood of the AI, which should then modify the probability of different actions.
You could possibly get it to modify the following in real-time for each AI instance, the variable should all ready exist in the AI
int MAX_EXEC_ATTACK_BASE
int MAX_EXEC_ATTACK
int MAX_EXEC_DEFEND
int MAX_EXEC_ESCORT
int MAX_EXEC_EXPLORE
int MAX_EXEC_RESOURCE
int MAX_EVAL_ATTACK_BASE
int MAX_EVAL_ATTACK
int MAX_EVAL_DEFEND
int MAX_EVAL_ESCORT
int MAX_EVAL_EXPLORE
int MAX_EVAL_RESOURCE
int attack_troops_priority
int attack_region_priority
int defend_priority
int attack_enemy_base_priority
int exploration_priority
int escort_priority
int resource_priority
int perimeter_priority
int min_attack_force
int min_defense_force
int min_escort_force
int min_perimeter_force
int min_exploration_force
int max_attack_force
int max_defense_force
int max_escort_force
int max_perimeter_force
int max_exploration_force
int distance_from_home_priority_modifier
int distance_from_enemy_priority_modifier
double max_matching_force_ratio
double fleetAIRatio
int avoid_danger_priority_modifier
You could load the base values in to the new code and have it update the ones used by the AI every N milliseconds.
That could probably be easier then changing the AI engine, not sure weather it could be done or not though.
posted on April 8th, 2010, 11:01 pm
nope sorry, we haven't touched the AI much yet
Who is online
Users browsing this forum: Bing [Bot] and 39 guests