Page 1 of 2

Threat Matrix Algorithm

Posted: 30 Jun 2005, 13:16
by AF
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++"

Posted: 30 Jun 2005, 13:38
by [K.B.] Napalm Cobra
Add to the list unit production. Thats always my main target.

Posted: 30 Jun 2005, 13:47
by AF
done, I dont thinkI cana dd any more options tho

Posted: 30 Jun 2005, 13:57
by [K.B.] Napalm Cobra
Noted and voted.

Posted: 30 Jun 2005, 15:12
by Min3mat
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 :)

Re: Threat Matrix Algorithm

Posted: 30 Jun 2005, 16:37
by PauloMorfeo
Alantai Firestar wrote:...
EDIT:: I see 2 people have voted yett here are 21 views so a lot fo people simply arent voting.
...
Are you asking how the AI should consider the threat level of a unit?

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.

Posted: 30 Jun 2005, 16:58
by Min3mat
well my option isn't up there so i can't vote :p

..

Posted: 30 Jun 2005, 17:51
by hrmph
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.

Posted: 30 Jun 2005, 18:21
by Min3mat
This is a OTA AI, well at least thats what AF said so i doubt gollies/krogs are going to be a problem, getting the AI to survive the first 30mins or so will be though!

Posted: 01 Jul 2005, 11:21
by AF
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....

Posted: 04 Jul 2005, 11:42
by dannybee
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.

Posted: 04 Jul 2005, 11:43
by AF
lmfao, you havent a clue

Posted: 04 Jul 2005, 11:44
by dannybee
Alantai Firestar wrote:lmfao, you havent a clue
The lib assistant wants us gone Tom

Posted: 04 Jul 2005, 12:16
by Triaxx2
Ignore him AF. If he hasn't seen the work, he won't believe anything until it's released. And DarkStars is down again in case you didn't know.

On an entirely unrelated note, I check Darkstars daily.

Posted: 04 Jul 2005, 13:48
by AF
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.

Posted: 04 Jul 2005, 19:21
by Triaxx2
When did you ask me to do it? I don't remember that memo. Where does it go? I'll move it as soon as I can.

Posted: 05 Jul 2005, 09:46
by AF
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.

Posted: 05 Jul 2005, 10:20
by [K.B.] Napalm Cobra
What am I doing?

Posted: 05 Jul 2005, 10:33
by AF
You where meant to have done what triaxx is now doing, but for now console yourself with managing sourceforge and writting a scouting Agent. Dealing with scouting, exploration, and radar/sonar construction.

I shall get back to what I'm doing when I get home.

Posted: 05 Jul 2005, 11:23
by [K.B.] Napalm Cobra
I'm sure I made some sort of scout ai, but where did I put it?

Oh the tortures of a cavernous hard drive.