5 Matrix AI proposal [Comments and Criticism encouraged]
Moderator: Moderators
5 Matrix AI proposal [Comments and Criticism encouraged]
In response to other AI proposals, I am bringing this one to the table. In order to provide a suitable challenge for an opponent, an AI must be able to both attack and defend itself. In keeping with TA's online community, I propose this AI be able to defend itself with mobile units. Choosing what and where to defend will be a product of the Threat, Value, and Defensive matrices. Where and when to attack, and what to attack, will encompass the Value, and Offensive matrices. Building will occur using the Value, Threat, and Defensive matrices, as well as the Build Matrix.
Threat Matrix: This is the unit/building value command center. This keeps track of all units in the game, with individual tags denoting which AI's can see them, and which cannot. From here, values are determined including health, type, position, and experience. Health and type determine defensive value, type and experience determines offensive value. See Note 1. These two values are determined for each side, and each sector. So that:
[Sector X,Y]
Combat 1= OffValA XX DefVal ZZ
Combat 2= OffValA XX DefVal ZZ
etc...
As well, this keeps track of who has what units in a sector, and provides a control percentage, those with allied controls of 50% or less, are considered hot combat zones.
Value Matrix: This is the matrix that keeps track of the metal and energy that can be harvested from the square, if it were entirely covered with Metal Extractors, or Solar Collectors, or Tidal Generators. This generates values for the defensive matrix, including defensive value of the square, as in how much resources are there, and how valuable it is, and offensive value of the units inside it. The latter is modded by how much the AI can see in the square. See also Note 1. The values are determined for each sector, but only offensive values are determined for each side, so:
[Sector X,Y] Value: AA
Combat 1=OffvalB XX
Combat 2=OffvalB XX
and so on...
Offensive Matrix: This is the combat control matrix, which processes relevant information, and uses it to direct forces offensively against any and all opponents. Offensive values, both A, and B, are taken into account, as well as the Defensive values. Values for attacking forces are calculated for each unit to be brought to bear into battle. If the defensive values of the opposing forces, are overwhelmed by the offensive values of the attacking forces then the attack goes ahead. If the values are within fifty points of each other, then the combined known offensive values of the opposition is compared to the defensive values of the allied attacking units. If the defensive number is within fifty of the offensive number, the attack goes ahead. If it's greater than fifty, then it goes ahead. If less than fifty, then additional forces are called from nearby factories, or locations. If the defensive value of the opposing force is fifty or more greater than the offensive value of the attacking force, then additional forces are called up. See also Note 1. So:
[Sector X,Y] DefVal XX
If AttOffVal > +50 [Sector X,Y] DefVal
Then attack.
If AttOffVal > +50/-50 [Sector X,Y] DefVal
Then check Sector OffVal >< AttDefVal.
If AttOffVal -50 < [Sector X,Y] DefVal
Then Call Forces
Defensive Matrix: This is the base defense control matrix. This locates high value areas, with low offensive values, and looks for areas with low value, high offense, and mobile units to be moved into the higher value areas. If none are found within range, then the build matrix receives the go ahead to build standing defenses, in the form of Missile Towers, and guardians, or what have you... Defensive units are also called up from this matrix, taking advantage of close by plants, that might be inactive, or in the process of being down graded. Plants exist in three call stages. Active Combat, Active Build, Inactive Salvage. Active Combat plants are those within two screens of a hot zone, and producing combat units. Active Build plants, are considered to be outside the hot zone, but under control of the Build Matrix, and creating defensive, or construction units. Inactive Salvage plants are free for whoever takes them, be it the Build Matrix, Defensive Matrix, or the Offensive Matrix, or even the construction units reclaiming it. The Defensive Matrix also controls combat patrol, and combat guard order assignment.
Build Matrix: This is the command and control center of the AI. It's the overlord of everything. Modifying this changes the entire strategy of the AI system. All other Matrix grids are one full screen in size, but the Build Matrix deals with grids the same size as the foot print of a Dragon's Tooth. Each square includes certain information about itself in a packet that is updated when the information changes, and is used to determine if an area is suitable to be built on. These include the following parameters:
Terrain Type
Elevation
Slope
Metal
Features
Obstructions
Terrain Type is obvious, since you can't build Tidals on land, or Solars on the sea.
Elevation is determined on all four sides, in relation to adjoining squares.
Slope is the difference in each side, and is also effected by cross joined squares, such as those on an angle.
Metal is a yes or no question.
Features are things such as Geothermal vents as well as Mexx radii. The latter has two variables. Mex, and Moho. If Mex is tripped, the Moho will still be built by the AI. If Moho is tripped, Mex is tripped by default.
Obstruction is simple, and complex at the same time. An obstructed square can be one of two things. Obstructed Reclaimable (OR), or Obstructed Unreclaimable (OU). OR objects are trees, rocks, unit wrecks, enemy buildings. OU objects are friendly buildings, anything without an assigned metal or energy value, and certain units, like the commander.
The Build Matrix also controls patrol and guard orders for construction vehicles, and is the final authority on build requests, with direct command over dispensation of resources. The Matrix also directs the other Matrices in where to go next during neutral phases, and controls scouting, and radar/sonar coverage. Units detected on Radar and Sonar are determined to have a single value for offense, and defense, until they are in sight. Radar values, are different from units only on Sonar. This Matrix also controls the final strategy of the entire AI. If the Build Matrix is balanced to build naval units, then the entire AI is naval. If it is balanced towards air, then the AI is an air power.
This AI has two known flaws, that I cannot see a way around, though I am not a programmer. It also has one major flaw.
The first of the lesser flaws, is radar and sonar. Because it cannot see everything it has to rely on radar, and sonar, and the blanket values are not very accurate, where as a human has the ability to guess what's there.
The second of the lesser flaws, is working around Springs collision, and strike detection system. With TA's bounding boxes, this wouldn't have been a problem, but the radial damage detection is problematic.
The Major Flaw, is combat control. I don't have any way to make the units fight other units, without slamming head first into that bloody friendly fire problem.
Help with any, and all of these flaws, as well as pointing out any I missed, would be very much appreciated.
Threat Matrix: This is the unit/building value command center. This keeps track of all units in the game, with individual tags denoting which AI's can see them, and which cannot. From here, values are determined including health, type, position, and experience. Health and type determine defensive value, type and experience determines offensive value. See Note 1. These two values are determined for each side, and each sector. So that:
[Sector X,Y]
Combat 1= OffValA XX DefVal ZZ
Combat 2= OffValA XX DefVal ZZ
etc...
As well, this keeps track of who has what units in a sector, and provides a control percentage, those with allied controls of 50% or less, are considered hot combat zones.
Value Matrix: This is the matrix that keeps track of the metal and energy that can be harvested from the square, if it were entirely covered with Metal Extractors, or Solar Collectors, or Tidal Generators. This generates values for the defensive matrix, including defensive value of the square, as in how much resources are there, and how valuable it is, and offensive value of the units inside it. The latter is modded by how much the AI can see in the square. See also Note 1. The values are determined for each sector, but only offensive values are determined for each side, so:
[Sector X,Y] Value: AA
Combat 1=OffvalB XX
Combat 2=OffvalB XX
and so on...
Offensive Matrix: This is the combat control matrix, which processes relevant information, and uses it to direct forces offensively against any and all opponents. Offensive values, both A, and B, are taken into account, as well as the Defensive values. Values for attacking forces are calculated for each unit to be brought to bear into battle. If the defensive values of the opposing forces, are overwhelmed by the offensive values of the attacking forces then the attack goes ahead. If the values are within fifty points of each other, then the combined known offensive values of the opposition is compared to the defensive values of the allied attacking units. If the defensive number is within fifty of the offensive number, the attack goes ahead. If it's greater than fifty, then it goes ahead. If less than fifty, then additional forces are called from nearby factories, or locations. If the defensive value of the opposing force is fifty or more greater than the offensive value of the attacking force, then additional forces are called up. See also Note 1. So:
[Sector X,Y] DefVal XX
If AttOffVal > +50 [Sector X,Y] DefVal
Then attack.
If AttOffVal > +50/-50 [Sector X,Y] DefVal
Then check Sector OffVal >< AttDefVal.
If AttOffVal -50 < [Sector X,Y] DefVal
Then Call Forces
Defensive Matrix: This is the base defense control matrix. This locates high value areas, with low offensive values, and looks for areas with low value, high offense, and mobile units to be moved into the higher value areas. If none are found within range, then the build matrix receives the go ahead to build standing defenses, in the form of Missile Towers, and guardians, or what have you... Defensive units are also called up from this matrix, taking advantage of close by plants, that might be inactive, or in the process of being down graded. Plants exist in three call stages. Active Combat, Active Build, Inactive Salvage. Active Combat plants are those within two screens of a hot zone, and producing combat units. Active Build plants, are considered to be outside the hot zone, but under control of the Build Matrix, and creating defensive, or construction units. Inactive Salvage plants are free for whoever takes them, be it the Build Matrix, Defensive Matrix, or the Offensive Matrix, or even the construction units reclaiming it. The Defensive Matrix also controls combat patrol, and combat guard order assignment.
Build Matrix: This is the command and control center of the AI. It's the overlord of everything. Modifying this changes the entire strategy of the AI system. All other Matrix grids are one full screen in size, but the Build Matrix deals with grids the same size as the foot print of a Dragon's Tooth. Each square includes certain information about itself in a packet that is updated when the information changes, and is used to determine if an area is suitable to be built on. These include the following parameters:
Terrain Type
Elevation
Slope
Metal
Features
Obstructions
Terrain Type is obvious, since you can't build Tidals on land, or Solars on the sea.
Elevation is determined on all four sides, in relation to adjoining squares.
Slope is the difference in each side, and is also effected by cross joined squares, such as those on an angle.
Metal is a yes or no question.
Features are things such as Geothermal vents as well as Mexx radii. The latter has two variables. Mex, and Moho. If Mex is tripped, the Moho will still be built by the AI. If Moho is tripped, Mex is tripped by default.
Obstruction is simple, and complex at the same time. An obstructed square can be one of two things. Obstructed Reclaimable (OR), or Obstructed Unreclaimable (OU). OR objects are trees, rocks, unit wrecks, enemy buildings. OU objects are friendly buildings, anything without an assigned metal or energy value, and certain units, like the commander.
The Build Matrix also controls patrol and guard orders for construction vehicles, and is the final authority on build requests, with direct command over dispensation of resources. The Matrix also directs the other Matrices in where to go next during neutral phases, and controls scouting, and radar/sonar coverage. Units detected on Radar and Sonar are determined to have a single value for offense, and defense, until they are in sight. Radar values, are different from units only on Sonar. This Matrix also controls the final strategy of the entire AI. If the Build Matrix is balanced to build naval units, then the entire AI is naval. If it is balanced towards air, then the AI is an air power.
This AI has two known flaws, that I cannot see a way around, though I am not a programmer. It also has one major flaw.
The first of the lesser flaws, is radar and sonar. Because it cannot see everything it has to rely on radar, and sonar, and the blanket values are not very accurate, where as a human has the ability to guess what's there.
The second of the lesser flaws, is working around Springs collision, and strike detection system. With TA's bounding boxes, this wouldn't have been a problem, but the radial damage detection is problematic.
The Major Flaw, is combat control. I don't have any way to make the units fight other units, without slamming head first into that bloody friendly fire problem.
Help with any, and all of these flaws, as well as pointing out any I missed, would be very much appreciated.
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
Well, the friendly fire problem could be countered with another problem, which is that the units in Spring are highly reluctant to shoot their own when they are in range and on targeting vector. (Unless explicitly told to attack a friendly unit, and even then success isn't 100% probable) So unless you change that, there will be no major problem with friendly fire.
Having to rely on radar and sonar isn't a bad thing, since most new TA players can't guess the unit on the radar as well. And on higher difficulty, (presuming there will be such) the AI could be given an extra edge, allowing him to use radar as normal LOS.
Having to rely on radar and sonar isn't a bad thing, since most new TA players can't guess the unit on the radar as well. And on higher difficulty, (presuming there will be such) the AI could be given an extra edge, allowing him to use radar as normal LOS.
As AF pointed out in another topic, I've layed down the basic structure for the AI, without any thing else to go with it. So I'll play that out now.
A human is in some ways less sophisticated than a computer, and in someways, infinitely more so. A human and computer are remarkably similar as well, as both can keep track of everthing that goes on in a game at the same time, without getting lost. So instead of splitting up the AI's command structure, this AI uses a single structure that handles everything. For an interface between command and control levels of the AI, I'm going to use ten general agents similar to AF's.
The Threat Matrix recieves an information Agent, whose sole job is to keep the Information from the Threat Matrix current, shunting information to the proper location as it changes, or is updated.
The Values Matrix recieves an information Agent as well, whose job is almost the same as that of the TM's agent. It also contains information on how much resources are coming, and from where, which changes the defensive values of a sector.
The Offensive Matrix receives two Agents.
One is an Agent to take care of the size, and distribution of attack groups, and call up new, or other units as needed.
The second is the squad level control unit, who uses the individual groups, in the same way a general manuevers units on a table top. Individual encounters occur within the domains of specific Agents.
The Defensive Matrix receives three Agents.
The first is a combat control Agent which keeps track of all units in the square, and has final say in the placement of defenses, to cover gaps, measured in the coverage of current units, and standing defensive weapon ranges.
Second is the resource control Agent, which uses the information from the build Matrix terrain sectors to make sure that no Metal extractor radii overlap needlessly. It also looks for new places to lay down energy generators.
Third, is the strike and defend control Agent. This handles how far a unit is allowed to pursue a target from it's initial position. For heavy units, this would not be very far, while medium, and AA units would go to maximum manuever range. Lighter units, could be allowed to run up to a full sector in pursuit, before breaking off. This agent also assesses the vulnerability of units such as construction units, or radar/jammer units, and assigns guard orders. Anti-nukes, AA units, and other units would be assigned to patrol, rather than sit stationary, and this would denote to the build Agent whether that would be a problem or not.
The last three agents belong to the Build Matrix.
The first of these, is G.O.D.. This is the general operating directive Agent. This is the AI that controls the commander, and the construction units. If an AI is naval this will divert all choices to equivalent naval units. If air, the first plant the commander will build, will be an air plant, an all choices will defer to the air equivalent. It also controls the direction the AI attempts to expand, by requesting information about sectors in that direction.
The second, is the targeting and control Agent. This directs scouts, and any idle con to build radar towers, and sonar bouys, in locations that don't have coverage. Scouts are sent as soon as they are built, and are brought from inactive plants when needed. Air scouts are preferred, but if not available, terrain dictates what comes next. Skeeters are considered Naval scouts. This is the one Agent that does not defer to combat agents if an enemy is encountered. It's fight or flight responce is always flight.
The third of these, is the Con unit command Agent. This dictates where construction units are to build defenses and such, per requests by the individual Agents. These are checked against the current total income, and current total usage of the specfic resources, to see if it will over tax the income. Special projects, such as BB's, Vulcan's, and the like, are handed over to special Agents.
Special agents:
These are the ones that command is handed over to, when something is outside the purview of a general agent, or is too specific, and they are called only when needed. These are:
Skirmish Agents: These nasty little agents control the close in combat, dictating targets and firing angles to units, designed to avoid friendly fire, while doing maximum damage to the opposing forces. They also handle firing solutions for ballistic units, and always try to take the high ground. Units with shorter weapon ranges, are played closer to the opposition, but are not as bounded into formation as heavier units with longer ranges.
Espionage Agents: These handle a few spies that might be built, and use them as extrememely long range scouts, only after long range weapons, such as Nukes, or BB's have been built.
Special Build Agents: These handle the placement and construction of special buildings. Nuke silos, Anti-Nuke emplacements, Big Bertha's, Vulcan Cannons, EMP silos, and Krogoth Gantries. The silos are placed in areas with lots of standing defenses, and without large concentrations of Fusion reactors, which are deterimental if an opponent returns fire with an artillery piece. The Artillery pieces are placed in range of the largest known concentration of enemy forces. Anti-Nuke emplacements are placed to defend the largest number of high value areas possible. Gantries are probably rarest, and only occur with direct request from the G.O.D.
Demolition Agent: These are the nasty SOB's, that are responsible for selecting targets for Artillery pieces, and Nuke Silos.
EMP Agent: Working together with Squad Level Control, Combat Control, and Strike and Defend Agents to disrupt defenses or offensive attacks.
Did I miss anything with this one?
A human is in some ways less sophisticated than a computer, and in someways, infinitely more so. A human and computer are remarkably similar as well, as both can keep track of everthing that goes on in a game at the same time, without getting lost. So instead of splitting up the AI's command structure, this AI uses a single structure that handles everything. For an interface between command and control levels of the AI, I'm going to use ten general agents similar to AF's.
The Threat Matrix recieves an information Agent, whose sole job is to keep the Information from the Threat Matrix current, shunting information to the proper location as it changes, or is updated.
The Values Matrix recieves an information Agent as well, whose job is almost the same as that of the TM's agent. It also contains information on how much resources are coming, and from where, which changes the defensive values of a sector.
The Offensive Matrix receives two Agents.
One is an Agent to take care of the size, and distribution of attack groups, and call up new, or other units as needed.
The second is the squad level control unit, who uses the individual groups, in the same way a general manuevers units on a table top. Individual encounters occur within the domains of specific Agents.
The Defensive Matrix receives three Agents.
The first is a combat control Agent which keeps track of all units in the square, and has final say in the placement of defenses, to cover gaps, measured in the coverage of current units, and standing defensive weapon ranges.
Second is the resource control Agent, which uses the information from the build Matrix terrain sectors to make sure that no Metal extractor radii overlap needlessly. It also looks for new places to lay down energy generators.
Third, is the strike and defend control Agent. This handles how far a unit is allowed to pursue a target from it's initial position. For heavy units, this would not be very far, while medium, and AA units would go to maximum manuever range. Lighter units, could be allowed to run up to a full sector in pursuit, before breaking off. This agent also assesses the vulnerability of units such as construction units, or radar/jammer units, and assigns guard orders. Anti-nukes, AA units, and other units would be assigned to patrol, rather than sit stationary, and this would denote to the build Agent whether that would be a problem or not.
The last three agents belong to the Build Matrix.
The first of these, is G.O.D.. This is the general operating directive Agent. This is the AI that controls the commander, and the construction units. If an AI is naval this will divert all choices to equivalent naval units. If air, the first plant the commander will build, will be an air plant, an all choices will defer to the air equivalent. It also controls the direction the AI attempts to expand, by requesting information about sectors in that direction.
The second, is the targeting and control Agent. This directs scouts, and any idle con to build radar towers, and sonar bouys, in locations that don't have coverage. Scouts are sent as soon as they are built, and are brought from inactive plants when needed. Air scouts are preferred, but if not available, terrain dictates what comes next. Skeeters are considered Naval scouts. This is the one Agent that does not defer to combat agents if an enemy is encountered. It's fight or flight responce is always flight.
The third of these, is the Con unit command Agent. This dictates where construction units are to build defenses and such, per requests by the individual Agents. These are checked against the current total income, and current total usage of the specfic resources, to see if it will over tax the income. Special projects, such as BB's, Vulcan's, and the like, are handed over to special Agents.
Special agents:
These are the ones that command is handed over to, when something is outside the purview of a general agent, or is too specific, and they are called only when needed. These are:
Skirmish Agents: These nasty little agents control the close in combat, dictating targets and firing angles to units, designed to avoid friendly fire, while doing maximum damage to the opposing forces. They also handle firing solutions for ballistic units, and always try to take the high ground. Units with shorter weapon ranges, are played closer to the opposition, but are not as bounded into formation as heavier units with longer ranges.
Espionage Agents: These handle a few spies that might be built, and use them as extrememely long range scouts, only after long range weapons, such as Nukes, or BB's have been built.
Special Build Agents: These handle the placement and construction of special buildings. Nuke silos, Anti-Nuke emplacements, Big Bertha's, Vulcan Cannons, EMP silos, and Krogoth Gantries. The silos are placed in areas with lots of standing defenses, and without large concentrations of Fusion reactors, which are deterimental if an opponent returns fire with an artillery piece. The Artillery pieces are placed in range of the largest known concentration of enemy forces. Anti-Nuke emplacements are placed to defend the largest number of high value areas possible. Gantries are probably rarest, and only occur with direct request from the G.O.D.
Demolition Agent: These are the nasty SOB's, that are responsible for selecting targets for Artillery pieces, and Nuke Silos.
EMP Agent: Working together with Squad Level Control, Combat Control, and Strike and Defend Agents to disrupt defenses or offensive attacks.
Did I miss anything with this one?
Interesting, my Agents are task an purpose orientated, yours are overlay orientated/Threat type Offense, defence, construction and other.
I am thinking that I should name your AI soemthign less longwidned than what it currently is but I am not sure.
As for the dillemma of 2 seperate but intertwined AI's being proposed and suggested by both me and you some may think it is counter productive btu I thik otherwise, I've been given ideas by you and realised shortcomings in ym own schema of thought, and fromt he looks of you showing agents it seems you have the same.
As for you saying your coding and modelling skills being terrible, you seem to be the only other forum goer part from me and any of the SY's that is actively contributing to this and I respect you for that=)
I am thinking that I should name your AI soemthign less longwidned than what it currently is but I am not sure.
As for the dillemma of 2 seperate but intertwined AI's being proposed and suggested by both me and you some may think it is counter productive btu I thik otherwise, I've been given ideas by you and realised shortcomings in ym own schema of thought, and fromt he looks of you showing agents it seems you have the same.
As for you saying your coding and modelling skills being terrible, you seem to be the only other forum goer part from me and any of the SY's that is actively contributing to this and I respect you for that=)
Thank you.
It looks to me, as if our AI's are very similar in make up, if not in exact method of implementation. Which means, if either one gets working, it could be easily translated into the other.
As for the name, I could simply not come up with anything else for the topic name. Officially it's the Wormhole Spring AI, because technically that's the mod group I work with. We formed from the remenants of the shattered TAUDB.com.
I'm also playing for adaptability. I want the flexibility to be able to add third party units, and have them slip straight in without having to rebalance the AI to compensate for them.
It looks to me, as if our AI's are very similar in make up, if not in exact method of implementation. Which means, if either one gets working, it could be easily translated into the other.
As for the name, I could simply not come up with anything else for the topic name. Officially it's the Wormhole Spring AI, because technically that's the mod group I work with. We formed from the remenants of the shattered TAUDB.com.
I'm also playing for adaptability. I want the flexibility to be able to add third party units, and have them slip straight in without having to rebalance the AI to compensate for them.
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
I alwas wished that an AI would be given wrong information so they make mistakes. Why dont you set it up so that it can be fooled with cloked units, and traps. I think it sould fall for gambits, traps, ambushes and other things humains would. I tryed amubes in OTA, and they all failed misserably. So i whish that a AI would actualy be realistic. However this dosent mean it sould be stupid. They should also set up gambits, traps, ambushes and other things
It does have to scout. If it does not have a direct line of LOS, it will send scout units over head to find the base, as well as ground units to investigate the area around it. These are controlled by the Targetting and Control Agent. When my AI is scouting you, expect Bertha fire shortly afterwards. It will also see you on radar, so jammers are going to be a must. The big guns will, to be fair, be LOS targetted only within the seven closest sectors. Rapid fires won't target radar under two sectors. Nukes will radar target anything not allied. EMP attacks almost always preceed a strike force.
Both my and Triaxx2's proposals work on the same notion that the AI is not omniscient as the OTA AI was. For cloaked units to be seen there must be radar verification otherwise it will not affect the threat values and the AI will have no idea of its existence. And the same with LOS for stealth units. As for more realistic attacks I would refer to my tactical agents that micro attacks
My AI will ahve a multitude of Tactical Agents each with specialised forms of attack for a wide variety of unpredictable and effective AI attack behaviour, and if you dont like it you can get someone to re-write the agent with the displeasing tactic in question, or simply delete it and use the other tactical agents, thus allowing the AI to do more and allow customisability and variation.
Although I'm curious how do you intend on letting the AI know what strike units are exactly without crossing over the lines with respect to your aim to allow the AI to be mod independant?
Although I'm curious how do you intend on letting the AI know what strike units are exactly without crossing over the lines with respect to your aim to allow the AI to be mod independant?
Simple. Speed to attack ratio. High speed, medium to strong damage is a strike unit. High speed, low damage is scout. So a Flea is a scout, while a Zipper is Strike unit.
In WD, a LOSAT is a Strike unit, while the Humvee is a scout.
Unarmed units are treated as having zero attack and are considered scouts, if they aren't con units or spys.
In WD, a LOSAT is a Strike unit, while the Humvee is a scout.
Unarmed units are treated as having zero attack and are considered scouts, if they aren't con units or spys.