Threat Matrix Algorithm
Moderators: hoijui, Moderators
Threat Matrix Algorithm
I'd post this at darkstars or sourceforge but nobody checks either of those.
EDIT:: I see 2 people have voted yett here are 21 views so a lot fo people simply arent voting. vote! I want the poll done soon not a month from now, and the more enthusiastic people are the better.
I need a basic function to be given a unitID number and churn out an integer representing how threatening that unit should be. Something in the range of a peewee being 50, and a krogoth being somewhere nearer to a thousand or more.
It must take advantage of the type of unit (direct fire, ballistic), Airborn underwater or surface (hovers, ships, kbots, tanks) or mixed (gimps, tritons etc), the TEDClass (defence, plant, cnstr etc).
Health and experience of the unit, speed, armour(hhmmm), acceleration, turn rate, max weaponrange.
Altitude shall be taken care of seperatly though it would be useful if it where put in anyways,
vote in the poll as to what you see as most important and should affect the value most. The function should also be extensible for thins such as 'crushstrength'. I'd do this myself as it would usually be easy but this has a big effect on the gameplay of the AI so I want suggestions and thoughts on how it should be done.
note:: I'm nto necessarily asking for code so dotn post thins like "but I dont know c++"
EDIT:: I see 2 people have voted yett here are 21 views so a lot fo people simply arent voting. vote! I want the poll done soon not a month from now, and the more enthusiastic people are the better.
I need a basic function to be given a unitID number and churn out an integer representing how threatening that unit should be. Something in the range of a peewee being 50, and a krogoth being somewhere nearer to a thousand or more.
It must take advantage of the type of unit (direct fire, ballistic), Airborn underwater or surface (hovers, ships, kbots, tanks) or mixed (gimps, tritons etc), the TEDClass (defence, plant, cnstr etc).
Health and experience of the unit, speed, armour(hhmmm), acceleration, turn rate, max weaponrange.
Altitude shall be taken care of seperatly though it would be useful if it where put in anyways,
vote in the poll as to what you see as most important and should affect the value most. The function should also be extensible for thins such as 'crushstrength'. I'd do this myself as it would usually be easy but this has a big effect on the gameplay of the AI so I want suggestions and thoughts on how it should be done.
note:: I'm nto necessarily asking for code so dotn post thins like "but I dont know c++"
Last edited by AF on 30 Jun 2005, 14:06, edited 3 times in total.
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
MUST change over time i think i've already posted this somewhere on darkstars *searches darkstars inactive forum*
hmmm i'm not so sure. can you implement a timing system,
i.e for the first 10 minutes the AI's Ground Units attempts to destroy economy, then construction units, then plants, then units, then the comm. For the next 5 minutes target energy before everything else (prioritizing on geothermal plants then wind gens (easy to kill) then solars) then mexs then construction units then plants then units then comm next 5 mins target metal first then energy then construction units then plants then units then comm. Then the rest of the game target AA, WOMD, Defenses, plants, units, comm
The AIs air targets defenses then WOMD then plants then units then comm
The AIs WOMD target comm then energy (prioritizing fusions) then WOMD then defenses then plants then units then economy
Could you make the AIs berthas simply target the most concentrated screen of enemys?
thats what i think :)
hmmm i'm not so sure. can you implement a timing system,
i.e for the first 10 minutes the AI's Ground Units attempts to destroy economy, then construction units, then plants, then units, then the comm. For the next 5 minutes target energy before everything else (prioritizing on geothermal plants then wind gens (easy to kill) then solars) then mexs then construction units then plants then units then comm next 5 mins target metal first then energy then construction units then plants then units then comm. Then the rest of the game target AA, WOMD, Defenses, plants, units, comm
The AIs air targets defenses then WOMD then plants then units then comm
The AIs WOMD target comm then energy (prioritizing fusions) then WOMD then defenses then plants then units then economy
Could you make the AIs berthas simply target the most concentrated screen of enemys?
thats what i think :)
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Re: Threat Matrix Algorithm
Are you asking how the AI should consider the threat level of a unit?Alantai Firestar wrote:...
EDIT:: I see 2 people have voted yett here are 21 views so a lot fo people simply arent voting.
...
If so, there is a general easy way to do that. Use the unit's cost. It is a method so perfect as it is the unit's set balance. Better units, almost always cost more. If not, then the unit set is unbalanced and as such, any error of interpretation is the unit's set fault and not the AI's fault.
Of course, you have units that cost less than it's power because they're use cost resources (think Goliath at 800 E per shot and the Targeting facility...). But i think that this is a good start.
..
My option isn't exactly up there either so I'll make an attempt to explain. I think it should be based on not only weapon power, but range and proximity to the base/valuable buildings. For instance, if someone is building a big bertha within range of valuable buildings, this would be a large threat. It would be an even bigger threat if the range of that bertha is within 80% of the computers buildings on the map. While something on the opposite end of the map like a light laser tower would have very little threat. Edit: And some units should be programmed to have a high threat no matter where their position, like a kroggie or a goliath.
This AI is designed at the moment with no specific mdo in mind, however the only mdo dependance there is in any first releases is the build roder files, which as min3mat said are at the moment going to be OTA specific, though they should eb easily adaptable to XTA and AA.
Min3mat, what you suggest isnt exactly an option of what I'm talking about, the threat matrix is coninuosly updated, otherwise the onyl threats the AI would consider where the initial terrain and the commander.
hrmph, that is a good suggestion and will have to be implemented. However as it stands it would require that generic threat values be already calculated othewise I fear an infinite loop or further imperfect information.
I am talking about this:
lets say the engine knows that unit 5 is a peewee. In my groupAI I shall call
Threatcalc(5);
and it will return a number signifying how threatenign that unit is.
Once those threat values are calculated I shall run a second threat function which shall change the threat matrix, such as inflating the threat value of a sector if it is high ground, I am guessing this is where hrmphs suggestion would come in. Things such as berthas that can fire at valuable units of your own should be marked....
Min3mat, what you suggest isnt exactly an option of what I'm talking about, the threat matrix is coninuosly updated, otherwise the onyl threats the AI would consider where the initial terrain and the commander.
hrmph, that is a good suggestion and will have to be implemented. However as it stands it would require that generic threat values be already calculated othewise I fear an infinite loop or further imperfect information.
I am talking about this:
lets say the engine knows that unit 5 is a peewee. In my groupAI I shall call
Threatcalc(5);
and it will return a number signifying how threatenign that unit is.
Once those threat values are calculated I shall run a second threat function which shall change the threat matrix, such as inflating the threat value of a sector if it is high ground, I am guessing this is where hrmphs suggestion would come in. Things such as berthas that can fire at valuable units of your own should be marked....
Alantai Firestar wrote:This AI is designed at the moment with no specific mdo in mind, however the only mdo dependance there is in any first releases is the build roder files, which as min3mat said are at the moment going to be OTA specific, though they should eb easily adaptable to XTA and AA.
Min3mat, what you suggest isnt exactly an option of what I'm talking about, the threat matrix is coninuosly updated, otherwise the onyl threats the AI would consider where the initial terrain and the commander.
hrmph, that is a good suggestion and will have to be implemented. However as it stands it would require that generic threat values be already calculated othewise I fear an infinite loop or further imperfect information.
I am talking about this:
lets say the engine knows that unit 5 is a peewee. In my groupAI I shall call
Threatcalc(5);
and it will return a number signifying how threatenign that unit is.
Once those threat values are calculated I shall run a second threat function which shall change the threat matrix, such as inflating the threat value of a sector if it is high ground, I am guessing this is where hrmphs suggestion would come in. Things such as berthas that can fire at valuable units of your own should be marked....
Full of it lad.
Well for one I've been asking if you ro napalm would move it, I gave napalm allt he logins he needs, and it seems I'll ahve todo it myself, untill then it'll keep going on and off like a yoyo, hoping to be mvoed tot he new host.
And Dannybee, saying that is pointless if you're sitting next to me. Though granted I cant stay on a library computer through break.
And Dannybee, saying that is pointless if you're sitting next to me. Though granted I cant stay on a library computer through break.
Darkstars, the admin forum, napalm has the necessary logins.
edit:: I nearly did it myself but my mum unplugged my router and said no internet int he ebdrooms then started an "I'm cancelling the internet" rant, then she left the other modem*that doesnt work* connected sayign AOL told ehr to leave it in all night, but I'm guessing she lied so i couldnt plug in my router. and to think 2 weeks ago they where praising the idea of sharing internet between every computer so anyone can go on when they want.
edit:: I nearly did it myself but my mum unplugged my router and said no internet int he ebdrooms then started an "I'm cancelling the internet" rant, then she left the other modem*that doesnt work* connected sayign AOL told ehr to leave it in all night, but I'm guessing she lied so i couldnt plug in my router. and to think 2 weeks ago they where praising the idea of sharing internet between every computer so anyone can go on when they want.
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15