Threat Matrix Algorithm

Threat Matrix Algorithm

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

What should influence the threat value more?

MaxWeaponRange
0
No votes
MaxHealth to current health ratio
2
10%
Type of unit (airborne, underwater, surface, amphibious)
0
No votes
Weapon Power
11
55%
Type of weapon (ballistic/directfire/emp/etc..)
1
5%
Speed/acceleration/turnrate
0
No votes
TEDCLass type (factory, strike unit, resource etc)
0
No votes
Resource Production
2
10%
Resource Usage
1
5%
Current Activity of unit
2
10%
Construction item (what is that unit trying to build?)
1
5%
 
Total votes: 20

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Threat Matrix Algorithm

Post 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++"
Last edited by AF on 30 Jun 2005, 14:06, edited 3 times in total.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Add to the list unit production. Thats always my main target.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

done, I dont thinkI cana dd any more options tho
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Noted and voted.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post 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 :)
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: Threat Matrix Algorithm

Post 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.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

well my option isn't up there so i can't vote :p
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

..

Post 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.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post 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!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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....
dannybee
Posts: 2
Joined: 04 Jul 2005, 11:38

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

lmfao, you havent a clue
dannybee
Posts: 2
Joined: 04 Jul 2005, 11:38

Post by dannybee »

Alantai Firestar wrote:lmfao, you havent a clue
The lib assistant wants us gone Tom
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

What am I doing?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post 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.
Post Reply

Return to “AI”