AAI 0.70 released - Win + Linux version included - Page 3

AAI 0.70 released - Win + Linux version included

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

Moderators: hoijui, Moderators

Athos
Posts: 4
Joined: 26 Jul 2006, 02:18

Post by Athos »

I've been trying AAI for the past few days in the AA 2.11 mod and I found that it's a great AI; it's quickly become my favorite :-) Through several games I had some success making it build strong units, but there is one thing I had trouble teaching it.

Today I noticed that when it plays the Arm side it always makes hovercraft platforms over better choices (IMO) like kbot lab lvl 2 or vehicle plant lvl 2, and the frequency in which it builds those higher level plants seems to have went down. I checked the log files and comparing yesterday's log file with today's showed a dramatic change in Arm builder ratings. The entry for Hovercraft increased from 0.037593 to 0.167220 while the values for advanced kbot/vehicle labs both went down (0.177261 to 0.135348 and 0.251464 to 0.176597, respectively). This isn't exactly what I wanted it to learn as I want it to tech and build better units, and despite many tries I couldn't get it to stop making hovercraft platforms.

It has since lost more games against itself (Core which techs faster, no hovercrafts and kbot/vehicle lvl 2 more). Is there any way to change the builder ratings or teach it so that AAI Arm builds the higher level labs more, make less hovercraft platforms, and therefore play a better game with stronger units?
CaptainMaim
Posts: 265
Joined: 04 Sep 2005, 01:25

Post by CaptainMaim »

If you want to teach it fast, play with an AAI as your ally, that way one part of the AI can see all the units you use. So the whole group adapts VERY QUICKLY.
Athos
Posts: 4
Joined: 26 Jul 2006, 02:18

Post by Athos »

Thanks for the suggestion CaptainMaim. So far I've only played against it or made it play against KAI to train, but I never thought about playing with it as my ally. Is that what you did to teach AAI to do what you want? I shall attempt it, and hope that it will make level 2 buildings over hovercraft platforms when it has the resources to do so.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

maybe i have to tweak category learning (selection between ground/hover, etc. forces) a bit -the factory ratings are based on that
Crampman
Posts: 117
Joined: 22 Dec 2005, 12:17

Post by Crampman »

I have a problem with this AI : the game always crash after 20 mins, whatever the map/mod. So the AI can't learn, and continue to build metal makers on a metal test map...

I don't have such problems with the others AIs, so I don't understand...
Athos
Posts: 4
Joined: 26 Jul 2006, 02:18

Post by Athos »

I have tried the method you suggested CaptainMaim and it seemed to have little results. The AAI Arm continued to prefer hovercraft over lvl 2 kbot/vehicle factories and it rates hovercraft factories over the others.

I believe training AAI only teaches it which units are the strongest at one factory (better unit choices), but the problem here lies in the fact that AAI doesn't always make the best factory choices (at least with the AAI I trained), which actually prevents it from making those better lvl 2 units in the first place. Choosing hovercraft factory over lvl 2 kbot/vehicle factories will cause it to make weaker hovercrafts on land maps (even if it was taught to make the best hovercraft unit choice) instead of inherently stronger lvl 2 kbot/vehicles.

From my experience, once AAI has decided to make a hovercraft platform, there is little chance that it would make a lvl 2 kbot/vehicle factory any time soon, since it seems to make a new factory only when it has developed to a certain point. If I can make a suggestion, Submarine, I think AAI should always prefer to make lvl 2 factories over lvl 1 ones when it has the capability/resources of supporting those higher tech structures, unless it is just starting out or it has low resources or all its factories have been destroyed (can't make lvl 2).

Another problem that I have discovered is that on some smaller maps, like Karst, AAI will constantly send newly created units to a certain place to "gather its forces" (on Karst this seems to be the middle left part of the map), but sometimes it continues to do that even if the enemy has already a stronger force in that same position. This results in AAI sending one unit at a time to the position already guarded by the enemy army and suiciding many units. For this reason I have observed that AAI loses faster to KAI on smaller maps, since it suicided its whole army and then get rushed. On bigger maps, AAI doesn't have this problem.

I think there are some things that AAI can learn from KAI and improve its early-mid game. For one, AAI seems to expand slower than KAI. While I am aware that KAI has vision of the whole map and therefore an advantage, I believe the way that AAI plays can be improved a bit. For instance, when KAI has already expanded to nearly the entire map, AAI has only expanded to around 1/4 of the map. When KAI expands it also builds new factories, often very close to the enemy's bases, and cranks out units from those factories. This is very effective and is one of the reasons why KAI rushes are so hard to stop. It would also be better if AAI prefers to crank out cheap units less and goes for strong units more (mostly lvl 1 Arm Kbots, I rarely see AAI make warriors). It would probably be better if AAI also techs faster to better buildings to give it more survivability, since it does not rush as aggressively as KAI does. Of course this is only my own opinions and there might be some way to adjust the AAI macro behavior that I am not aware of. If that is the case, forgive me and ignore what I just said. :P

Sorry this has become so long, originally it was only about AAI choosing hovercraft over lvl 2 factories. I'm trying to train AAI to improve its game so that it can perform better and maybe even win against KAI (for fun only). So far the record is 1 win 7 loss. AAI usually get rushed and dies before it reaches level 2. The only win AAI had over KAI was the one time when it sacrificed all tech as Arm and went 100% level 1 aircraft on WideOpenCombat and constantly bombed KAI Core's massed low hp wind generators (KAI's early reliance on those seems to be a weakness, but not a big one after it has advanced to higher tech energy sources).

For some reason, when playing on Mars in the top left starting position, AAI commander stops moving after making two solar collectors. Does this happen to anyone else? What is the cause of it?
Last edited by Athos on 26 Jul 2006, 22:16, edited 3 times in total.
CaptainMaim
Posts: 265
Joined: 04 Sep 2005, 01:25

Post by CaptainMaim »

When I played, I started using short range nuclear devices... I think it's called an EMP? Anyway, very soon after I started getting hit by the same devices and had to build anti-nuclear devices. I used a lot of artillary on it but didn't see any coming back, then again, my ally was dead by the time I started to do that in ernest. Maybe I'm wrong, but it seems like having an AAI ally helps the AI to learn "what killed its units."

I also used Big Bertha on it but, I think again, my ally was dead by the time I started making any hits from radar with it.
User avatar
Scikar
Posts: 154
Joined: 30 Jan 2006, 07:13

Post by Scikar »

Are the buildtable files generated by AAI? Can they be edited by hand? Because I've found a few odd things about them:

In E&E, the Dragon (URC level 2 fighter) is listed under air assault and classed as a bomber. I've seen AAI mass level 1 fighter aircraft in other games, this might be why. Fighters in E&E can't attack ground units, so they sit still and do nothing.

In AA, the Peewee is labeled as an anti-air unit for some reason. I haven't play AA with AAI for a while though so I don't know if that's caused any problems.

Can the learning tables also be edited by hand? I wonder if it would help to initialise the values by hand and then let AAI adjust them up/down as it uses the units.

Also, could AAI apply a negative multiplier for hovercraft on land maps perhaps?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Notice the commander on Mars getting stuck on top left & bottom left aswell:(

Normally after building 2 powerplants.
Atm i just using .cheat .teamX and get the commander to move & build something (think u just need to move it). And commander gets back on track in abit.

Assuming AAI doesnt recieve error that unit unable to move to a location, also happens with water units tryin to move to another patch of water that go no connecting points & AAI doesnt seem to register the warning in console about unit unable to reach destination.

Also noticed playin against bots on tagged release 72b1 for linux. That my units got stuck near a factory. Had to queue orders to walk around back of factory & around to get them to move the rally point i wanted. Maybe path findin code was abit messed up. Forgot to hang onto the demo though :/
Athos
Posts: 4
Joined: 26 Jul 2006, 02:18

Post by Athos »

I think it would be nice also if you can somehow manually adjust or otherwise "influence" AAI's builder ratings. This would give more control over the way AAI learns, and sort of similar to what Scikar suggested but for buildings instead of units. I just played another test game with AAI, and when it makes a hovercraft platform on land maps, it rarely actually uses it, so in the end building one just slows its teching to lvl 2 down.
Last edited by Athos on 26 Jul 2006, 22:11, edited 1 time in total.
Targon
Posts: 99
Joined: 16 Dec 2005, 05:15

Post by Targon »

Once again, has anyone managed to get AAI use the sea tech tree without crashing on AA or E&E?

I want to see if this is just my problem.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Athos wrote: If I can make a suggestion, Submarine, I think AAI should always prefer to make lvl 2 factories over lvl 1 ones ...
the main problem is that there is no "level" of factories/unist for the ai. human players tend to think of different unit levels, aai just klnows its a factory and it can build certain weaker or stronger units

Athos wrote: Another problem that I have discovered is that on some smaller maps, like Karst, AAI will constantly send newly created units to a certain place to "gather its forces" (on Karst this seems to be the middle left part of the map), but sometimes it continues to do that even if the enemy has already a stronger force in that same position.
good point, thopugh AAI checks rally point from time to time it may takle quite a while. this has to be fixed/improved
Athos wrote: For some reason, when playing on Mars in the top left starting position, AAI commander stops moving after making two solar collectors. Does this happen to anyone else? What is the cause of it?
seems to be a bug, krogothe reported something similar to me
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

submarine wrote:
Athos wrote: Another problem that I have discovered is that on some smaller maps, like Karst, AAI will constantly send newly created units to a certain place to "gather its forces" (on Karst this seems to be the middle left part of the map), but sometimes it continues to do that even if the enemy has already a stronger force in that same position.
good point, thopugh AAI checks rally point from time to time it may takle quite a while. this has to be fixed/improved
And sometimes AAI just piles up units at the rallypoint but doesn't use them.


Another thing I recently discovered was that sometimes if I have a game of four AAIs against each other, one or more of them stop doing anything at all after building two solars (seen this behaviour in XTA and FF1.18). Happens only sometimes, but then consequently.

Also, some maps seem to "crash" with AAI because it apparently fails to create the respective map learning file (SailAway on XTA), I guess the problem has to do with land/water or water maps in general. After adding the learning file manually it stopped crashing however.
User avatar
Cyberwal
Posts: 149
Joined: 31 Jan 2006, 14:42

Post by Cyberwal »

You said AAI can only learn when the unit killing its units is in range? So when I use, say, a tremor to kill most of its defenses, will it ignore that? Or is it enough if it spots it from time to time?
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

Cyberwal wrote:You said AAI can only learn when the unit killing its units is in range?
If that is the case, wouldn't it be a good idea to instead implement a maphack for the purpose of learning only? I know you want to make it a non-cheating AI, but it'd learn better if it got more information :-)
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

aai wil only learn if the enemy is in los when the unit is killed - otherwise the ai interface does not provide you with the killer/killed unit definition. it's an engine limitation (which prevents cheating on the other hand)
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

submarine wrote:It's an engine limitation (which prevents cheating on the other hand)
It could be helped somewhat if this were implemented: http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6149
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

segfaults in linux 0.72b
Targon
Posts: 99
Joined: 16 Dec 2005, 05:15

Post by Targon »

In reguards to my previous issues, it seems that AAI only crashes on the mod E&E on water maps if it is playing as GD, URC works fine with no crashes.

With AA 2.11 I still get an "unhandled exception occured in the global AI dll" error when AAI is either Arm or Core on water maps
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

Mine segfaults (in linux, mind you) on Mars (no water) and Castles on mod XTAPEv55 and XTASE66.

I could try some other mods but I would assume the outcome would be the same.
Post Reply

Return to “AI”