AAI 0.42 Airforce Bugfix release - Page 3

AAI 0.42 Airforce Bugfix release

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

Moderators: hoijui, Moderators

XigXag
Posts: 32
Joined: 28 Jan 2006, 19:40

Post by XigXag »

If I recall, there was a typo in the AAI .cfg file for FF... I believe it's one of those lines that say:
AMOBILE_ARTY_RANGE 1000.0
it should read instead:
MOBILE_ARTY_RANGE 1000.0
(or whatever number)

I think this same error was in one of the WD .cfg files also... but don't quote me on that.
jellyman
Posts: 265
Joined: 13 Nov 2005, 07:36

Post by jellyman »

I always get a crash on startup when trying to run AAI. I even get the same crash when trying to watch the replay. 'ai has caused an unhandled exception, please contact the author'.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

I had AAI crashes on startup when I had custom units in my Spring folder (especially if those units are for another mod and so cannot be built in the current one). If you have any of them, move them to some other folder while using AAI.
One more reason can be a metal map. AAI really doesn't like metal maps and crashes on most of them (so far except Azure Rampart).
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

The latest released versin (0.42) does neither support metal maps nor final frontier. support for both has been implemented in aai 0.5, however it still needs some tweaks and i'm in the middle of my exams right now.
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

submarine wrote:heres a replay on painted desert showing a battle between aai pre 0.5 and otai 1.07...

since it's a fresh buildtable aai is building a lot of pewes

http://www.fileuniverse.com/?p=showitem&ID=2322
I've just watched this replay and i think your ai played very very well. :-) It expands well, has good resource management and great attacking system. And it builds radar-jammers properly. :o Great job!

I have also noticed some things that can be improved in the ai to make it play better.
- It should use metal makers. It had energy +700/-300 so metal makers would be very useful.
- It should reclaim rocks/wreckages when have too few metal.
- I think it should build a bit more defences and place them better.
- When peewes attacking building like Energy Storage/Geo/Factory they should escape before the building explode (in the replay one Energy Storage explosion destroyed about 10 peewes!).
- It the replay the first 3 buildings which ai built (solar+mex+solar) were far from each other so commander lost a lot of time moving between buildsites.

Great job at all. I can't wait for the next release. :-)
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

Rafal99 wrote: - It should use metal makers. It had energy +700/-300 so metal makers would be very useful.
i tried to build metal makers but i couldnt find a good solution to manage energy demand yet.
Rafal99 wrote: - It should reclaim rocks/wreckages when have too few metal.
yet thats true, i just dont know how to make unist reclaim obstacles/wreckages yet - maybe i should ask other ai devs how to do that
Rafal99 wrote: - When peewes attacking building like Energy Storage/Geo/Factory they should escape before the building explode (in the replay one Energy Storage explosion destroyed about 10 peewes!).
i know, but atm i cant think of an easy solution. checking all attacking units and their targets all the tiem would cause far too much cpu load for almost no advantage at all
Rafal99 wrote: - It the replay the first 3 buildings which ai built (solar+mex+solar) were far from each other so commander lost a lot of time moving between buildsites.
this is one of the drawbacks of aais custom building-placement. perhaps i'm going to improve that in the future, but its imho not the most urgent issue
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

For feature reclaiming, try issuing a CMD_REClaim command giving the 3 co-ordinates followed by a 4th value specifying radius, to do an area reclaim command.

I suggest doing the same for ressurecting since the engine knows what can be resurected but the AI hasnt a way of doing so.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

this makes a cons. unit reclaim anything within the specified radius right?

hmm doesnt sound very comfortable though, how do you know if reclaiming is necessary?
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post by IMSabbel »

hm. remeber where units have been killed?
You already keep track of it because of the unit selection process, iirc, so you could just store the positions...

Or just put them in a rather coarse grid (100x100 sectors or something) and let units reclaim "safe" sectors (and then reset their value)
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

i havent tried out yet but u have a getfeatures where u specify a pos and a radius , so you could use it to specify the con location and the radius u want a get the features to reclaim, its a array of Features the func returns.
im just telling this cuz i remember passing by it , but i really didnt use it yet so dunno if it does what im saying it does :P
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

i've been trying to get Fleabowl to work with it

i made this cfg:

Code: Select all

SIDES 4	
START_UNITS ARMCOM CORCOM FBCOM AKCOM 
SIDE_NAMES Arm Core Fleabowl AKBowl
SCOUTS 2 ARMFLEA AKCK
MAX_UNITS 10000
MAX_SCOUTS 30
MAX_BUILDERS 20
MAX_GROUP_SIZE 32
MIN_EFFICIENCY 0.05
MAX_XROW 8
MAX_YROW 8
X_SPACE 10
Y_SPACE 10
SECTOR_SIZE 100.0
MAX_SECTOR_IMPORTANCE 6
MAX_BASE_SIZE 5
SCOUT_SPEED 95.0
ARTY_RANGE 800.0
MIN_ENERGY 18
LEARN_RATE 5
AIR_DEFENCE 8
MAX_BUILDERS_PER_TYPE 16
MAX_METAL_COST 10000
MIN_AIR_ATTACK_COST 100
MAX_AIR_TARGETS 20
but some how i get errors
XigXag
Posts: 32
Joined: 28 Jan 2006, 19:40

Post by XigXag »

Noize, it looks like you're using an outdated version of the AAI config file.

I haven't downloaded Fleabowl so I haven't tested this, but it theoretically should work. I plugged your values into the AAI 0.42 cfg template and got this:

Code: Select all

SIDES 4    
START_UNITS ARMCOM CORCOM FBCOM AKCOM 
SIDE_NAMES Arm Core Fleabowl AKBowl 
MAX_UNITS 10000 
MAX_SCOUTS 30 
MAX_BUILDERS 20 
MAX_BUILDERS_PER_TYPE 16
MAX_GROUP_SIZE 32 
MIN_EFFICIENCY 0.05 
MAX_XROW 8 
MAX_YROW 8 
X_SPACE 10 
Y_SPACE 10 
SECTOR_SIZE 100.0 
MAX_SECTOR_IMPORTANCE 6 
MAX_BASE_SIZE 5 
SCOUT_SPEED 95.0 
MOBILE_ARTY_RANGE 800.0
STATIONARY_ARTY_RANGE 800.0
MIN_ENERGY 18 
AIR_DEFENCE 8 
MAX_METAL_COST 10000 
SCOUTS 2 ARMFLEA AKCK
I don't know about these two lines from your example:

Code: Select all

MIN_AIR_ATTACK_COST 100 
MAX_AIR_TARGETS 20
I didn't see these tags in any current cfg files, they might be obsolete.

Also, for 0.42 Submarine has separated learn rate and a couple other variables into "general.cfg".
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If there are no features to be reclaimed then the command is simply ignored by the engine.

You can also do ti by specifying a single parameter, which would be the feature ID of the feature to eb reclaimed, the same with resurrecting, only if it isnt resurectable then the engine ignores the command and doesnt call UnitIdle() so you have to keep track of it.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

here's the latest replay, aai vs 2 otais on comet catcher remake
http://www.fileuniverse.com/?p=showitem&ID=2362
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

v nice! Great to see all the 3 main AIs coming along well, guess its time for me to catch up.
In fact, tomorrow ill release the new version of the mex class. You guys must have modded it to hell, but a simple swap in the core algo makes it 2x faster with the exact same functionality, so it shouldnt really be troublesome!
AF, did you manage to get the reclaim working by pushing the featureID? I had some trouble with it am am currrently using a small radius around the feature pos :/
Man, that replay got me loads of ideas cooking!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I looked at the engien code that handles these thigns and saw how it works, but so far I've onyl ever used the area command to do reclaimation and ressurection.
jellyman
Posts: 265
Joined: 13 Nov 2005, 07:36

Post by jellyman »

How do I know if I have any custom units in my spring folder that may cause this AI to crash? I have plenty of different mods, mostly different AA versions. And as far as I know that is all I have. Do I have to move all these to get this AI to work?
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post by IMSabbel »

no, you dont.

In fact, if you only ever put mods in the mod dir and downloaded maps, then its 99.9% that you dont have any unwanted extra units installed (which, btw, will lead to a desync in multiplayer, for example, also).
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

submarine wrote:here's the latest replay, aai vs 2 otais on comet catcher remake
http://www.fileuniverse.com/?p=showitem&ID=2362
Noticed all the mexes are placed wrong, by both OTAI and AAI. Also noticed how little CPU both AI's use! Awesome!
User avatar
mecha
Posts: 98
Joined: 30 Sep 2005, 09:53

Post by mecha »

In case anyone else is tryiing to get .42 to work with FF, change the AMOBILE_ARTY_RANGE 1000.0 to MOBILE_ARTY_RANGE 1000.0 as XigXag stated earlier and also delete the line with learn_rate out of the cfg as well as renaming it to the correct version number of the mod that you are using (with underscores where spaces are)

It plays ok early on but doesn't make many capships nor does it use the capships that it has made.
Post Reply

Return to “AI”