Testing AAI - Page 3

Testing AAI

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

Moderators: hoijui, Moderators

submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

it depends on the mod changes:

if the ids of the units are not changed you can simply rename the learning files

if there are any new units aai must create a new learning file to match the new unit ids
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

you could create a new table using the matching unit names/ids i guess, so that all the table wouldnt be lost.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

dont create unit tables on your own; the slightest mistake may crash the game...

you can set the learnig rate higher (by lowering the number) in the mod cfg file
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

lol submarine that was an idea for your ai, to get what you can of your old table so that the learning process doesnt start from zero.
Im sure that at some point some information can be used from the old table for the new one.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm. I just tried deleting all previous AAI cache, cfg and learn files, and wrote a custom config for my hack.

And... it works. No crashes through three entire games. That's better than any other AI has managed yet- congrats.

Now, it didn't play well, mind ye- I put on cheat, handicapped it 100, and set three of them against one of me, and it lost with me playing a very simplistic porc game against it on Core Prime Industrial Area. No real effort involved- it rushed the same defenses again and again. Only the handicap gave it enough edge to remotely compete. And I saw no sign that it was "learning" anything remotely useful. Maybe if I smash enough level one stuff with Mechs, it'll start getting the idea that that won't work ;)

And yes, it built my mecha, which was a very pleasant surprise. Did it have any clue what to do with 'em? Naw- it just ran them into the teeth of my mini-forts and died. I am sure it was very "confused" by the results- when I use them, they own... when it uses them, it's a waste of resources ;) Did it build any proper artillery? Nope. Which, more than any other factor, really made it simple to defeat, even without building any of my own, let alone aircraft, nukes, or my favorite- the Fido Rush of Doooom.

Dunno why it never "figures out" what artillery is for, when the script even calls for it, but it doesn't ever use it. Maybe I'll just raise that range figure to something ridiculous so that it might build it- it makes other defenses. I'll let you know if that works or not.

Other maps make it crash on the initial load- I haven't quite figured out what's the primary cause yet. I'll put together a compilation if that'd be useful. But overall, now that I have figured out how to make it sort've work with my custom mod... it's functional, and didn't mind Commanders dying, which was very nice.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Well, I finally found a map where the AI can give me a decent fight... erm... 3 on 1, maximum handicap, but still!

The Cold Place gives a great game- the three AIs, with their crushing early advantages, and the small size and relative lack of movement problems... really forced me to very quickly back my Commander into a corner of the map, from which I was only able to emerge through luck and a few good choices... and a few key weaknesses of AAI, which I should note:

1. AAI never builds radar or ... much more importantly... ECM. If it built ECM, even just a little bit, it'd be much, much more effective, even if not cheating.

2. The whole artillery thing is a major handicap. OTA's AI would've killed me, even without nukes- one Bertha would've been the game. My version of Siege would've eaten me for breakfast, by nuking me before I could get out've that corner. AAI calmly let me shell it to death- I only engaged with ground units out of a sense of fair play, and to see the pretty pictures :P

3. AAI doesn't build defenses worth a darn. It really should build them in rings or clusters of same-type defenses, or rings with a cluster of a mix, instead of big bags of random. Random is not effective, patterns, even dumb patterns that humans can sometimes spoof, are usually more effective. There is a very practical reason behind grouping weapons in ways that maximize their firepower along any angle and minimize artillery damage... and it needs to build lines of Dragon's Teeth, etc... just short lines, so it won't trip itself up too badly, but it does need to "recognize" a category of "non-obvious defensive structures". An AI that build DTs in lines, especially near areas of high Threat, would most likely last quite a bit longer against humans... erm... at least humans not using Air. Air in Spring is a whole 'nother topic though, and I'll take that to the developers later...

4. While it did rush me with groups, it did so very poorly. If you're really serious about it being able to generically determine what a unit is "for", then it needs better rules- right now, it's pretty clear that it only really understands Scouts, Builders, and ... none of the above. This isn't very useful. Attackers should probably get grouped by speed, and AAI needs to keep groups together until it's within a semi random distance of where it "thinks" the player is, so that attacks make some sense- disposable but fast units first, medium/heavy assault stuff next, sloooow artillery last. But what about units like Cans and Sumos? They're neither fish nor fowl- not truly "assault" units, because they're too slow, but not artillery, either. Perhaps units with those stats (slow, powerful, well-armored) should get weighted towards "defense"... I just have a lot of trouble seeing how a non-buildtree, non-scripted AI is going to do anything "smarter" with the units.

In short... AAI could've beaten me (ok, with a massive handicap... but as you well know, I believe AIs should cheat anyhow to make up for their other flaws) if it was a bit smarter about certain things. No, it would not have even come close if it wasn't handicapped 100%- I tried a "fair fight", used nothing but Level One stuff, and chopped AAI to bits. But with things heavily balanced against me, it finally felt challenging. Correct the above issues... make it cheat and use nukes... and it'll be potentially as good as Siege was. Which, to be real, was not very good- it was still very stupid. But it could win.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

aai simply is not meant to beat human players right. hardly any work has been spent on attacking its behaviour yet, aai doesnt build air/naval or artillery units

i`ll definitely improve these things in the future, but right now im just happy that i got nearly crash-free (except this factory at the edges bug) version that doesnt depend on certain mods or buildscripts
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ok... I did some more tests... here are a few other little issues:

1. AAI needs to scout all metal spots... forever. When it builds Air, that'd be a good use for Air. As it is, it lets metal spots sit around.

2. AAI needs to not only build rings/lines of DTs... it needs to eat DTs that aren't "owned" by it.

I figured out these minor issues while playing on The Cold Place (which, along with EuroGreen, are the best maps against AAI, as it just doesn't handle more complicated terrain well). What I did, as an experiment, was take a Commander and a Necro and build a huge arc of DTs that literally put my base outside the sight radii of scout vehicles. The scouts basically hit the DTs, pathed around it, and moved on. I could build as big of a site as I wanted to.

Does AAI use radar at all? It seems to respond with attack waves if I build radar towers that intersect it, which is probably just an interesting coincidence. At any rate... if it built even some minor radar, it'd scout much more effectively, even without Air scouts.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

EDIT:

DRAT. If I get rid of the very last item with a TEDCLASS of METAL, then AAI crashes :P
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Here's a new pic showing AAI's improved building placement...

AAI now also builds radar (although it doesnt use it yet (except for radar targeting))

im currently trying to improve ressource management and implement some decent air support

Image
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

why does it build solars only ? did u hardcode it that way ?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

...I see a mex there. :o

Nice building placement btw, much more... organized and much tighter. Very cool :)

At any rate... if it just will not crash when I remove mex/geo/solar/fusion, that'd be wonderful... for this thing to be anything like "universal", it's going to have to handle a lot more weirdness without dying. Can't wait to test the next version ... to pieces, if needbe :twisted:
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Chocapic wrote:why does it build solars only ? did u hardcode it that way ?
aai just chooses a cheap power plant, for aa its a solar plant
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

hover in AA on a land map? ouch
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

whats the problem with solars?

i excluded wind generators because aai is heavily disturbed by the permanently changing energy income. which building would you suggest?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

At any rate... if it just will not crash when I remove mex/geo/solar/fusion, that'd be wonderful... for this thing to be anything like "universal", it's going to have to handle a lot more weirdness without dying.
That would be because AAI has buildtables that tlel it that unit A exists prebundled when you downlaod AAI. But if unit A doesnt exist in the mod because you remove ti then AAI is going to crash.

Try doing your tests again after deleting the learning files or changing the mod name. AAI will be a lot dumber and you'll have to get it back up but it'll be a more accurate test.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

AF wrote: That would be because AAI has buildtables that tell it that unit A exists prebundled when you downlaod AAI. But if unit A doesnt exist in the mod because you remove it then AAI is going to crash.
thx, thats absolutely right. whenever you add or remove units from a mod, you have to delete the learning files and let aai create fresh ones
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Why AAI doesnt perform a simple check on this is beyond me though, afterrall isnt it important that our AI's be modder friendly?
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

its is necessary to build the whole table again if one unit is dropped, its not only about the missing unit, it may influence other stuff as well
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

submarine wrote:whats the problem with solars?

i excluded wind generators because aai is heavily disturbed by the permanently changing energy income. which building would you suggest?
hmm let me give u verified data:

AA :
Solar -> Metal - 145 ; Energy - 760; output +20
Wind -> Metal - 35 ; Energy - 65 ; output dependable

so, where is the cheap part ????
it might be a bit bad to have ur E output allways changing but dont good players have that ? have you never stalled on E playing games yourself because of the darn wind ? :P
Make your choice, but ive made mine, my ai goes for the cheapest output to cost ratio and allways chooses wind (AA)
Post Reply

Return to “AI”