AAI 0.76 released - Page 3

AAI 0.76 released

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

Moderators: hoijui, Moderators

User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Code: Select all

START_UNITS armcom corcom
Are you using the the comms you defined in the SIDEDATA.TDF?
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

yep, the names are gonna change later but for now its armcom and corcom
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You know, you could remove that set of keywords entirely and automate the processby parsing Sidedata.tdf with either the CSunParser (KAI, OTAI NTai 0.27->XE5) class or the more reliable port of the TDFParser class(XE8+)(theres a crash bug in CSunParser encased in a try catch clauseamong other things that lead the core devs to rewrite CSunParser). That way you could have a new default.cfg, and have much better mod support.

And I'm sure with a little work you could set it up to counter in disabled units by parsing script.txt and loading up a list in a vector<string> container or something similair, then everytime a node is parsed on the build tables for the first time, it will check and set a flag saying if it can be built or not and if the node should be ignored by AAI.

Of course the second paragraph may be a little off course as I'm not too clued up on the specifics of how the buildtables in AAI specifically work.....

btw you should try nanoblobz. AAI may not support units building units but thats not the only way to build stuff in nanoblobz. You do have the autofac buildings that act as factories, and you've got the holder defensive building, thus you can just sue the sheep and lord as builders and repairers.

I think reconciling factories and builders into a general unit condtruction system would be a very good use of resources. The flexibility it gives can be enormous in terms of simplifying construction mechanisms and implementing and updating new stuff. It's how NTai KAI and OTAI do it, and I can say from experienceit's well worth it.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

MOBILE_ARTY_RANGE 1000.0 -> this statement doesnt exist anymore... view recent mod.cfg for the new ones (iirc ground/hover/sea_arty_range)

@af: oh ok, didnt know that its possible to get start units from spring, i will implement that when i have time. thx for the hint

concerning unit restrictions: aai would have to recreate its buildtable anyway, you need a different buildtable.dat for any setting


unite builders/factories might be worth a try, but i need some time to do that....
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You might also want to check the UnitDef::Buildptions std::map<int,std::string> container. As if you remove CORLAB from the mod via disabled units, then it dissapears from the UnitDef IIRC
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Just get the unit def list, it only shows enabled units, and since AAI already does(or used to) that its just a matter of actually using the information...
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

in this case, the whole buildtable must be rebuilt as well as all kind of precached statistics, ratings, efficiencies, etc.

so basically you have to build a completly new buildtable (and all learning results would be lost)

a possible solution is that ppl rename/backup their mod learning files when playing with different unit restrictions (and have a buildtable per set of unit restrictions)
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Cant you just ignore data for units that are in the unittable but not unitdef?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Exactly,, also whats stopping you just partially recalculating values?

I assume this is because the value a unit has in the unit table is based on some basic learning value plus the values of what it builds. If your learning setup is so hardfixed like that and inflexible I'd be very worried.

I do a similair thing with efficiency values in th next NTai, however mine are all calculated on the fly, and there's no lag at all, all lag I've experienced has been todo with attack routines I've been disabling....

I assume when a units learning value changes all the parent nodes in the build tree have to be updated? Wouldnt that mean it would be just as laggy to update the table as it would be to remove a node?
Thus why does the table need to be recreated at all? Just label its efficiency as 0 and tell AAI to ignore nodes with zero values, and then tell them to not save the zero ndoes and replace them with the original node loaded from game, or better yet only to save what changed in the table rather than the whole table.....

Maybe someone should write a patch....
The Master
Posts: 4
Joined: 03 Oct 2006, 04:12

Post by The Master »

Version 0.76 has not worked for me at all in the time I have tried it. I tried both the most recent version of Absolute Annihilation and XTA with no luck, so it must not be the mod causing issues. I am 100% certain they are compatable.

I do, however, have a good number of custom units that are meant for TA that I stuck in the Spring folder. They work fine and I have had absolutely no problems at all. The past two (maybe three) versions of AAI performed almost perfectly with the occasional crash here and there. I am wondering if these custom units may have something to do with crashing AAI 0.76, or if something is just plain wrong with it.

I should also note that two of my friends I play with frequently have the extra units, and they crash as well. During the AI loading into the map at the beginning is where it happens, then it crashes/minimizes the game to bring up an "exception in the global AI".
Targon
Posts: 99
Joined: 16 Dec 2005, 05:15

Post by Targon »

does this version of AAI come with learning files and build tables by default? if so maybe just delete those files for the mods you're trying and try running it again
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

ok, ive been messing about with new AAI.. it still refuses to expand and look for mex's, even with its max mex distance turned up to like 30, it ignores mex's any distance away. on EE, its also builds an anti air unit 1/2 the time even after its definatly learnt cannons are the way foward. Ive messed witht he config with no sucsess.. why does it focus on anti air so much?
drafzzz
Posts: 8
Joined: 12 May 2006, 10:18

Post by drafzzz »

Targon wrote:does this version of AAI come with learning files and build tables by default? if so maybe just delete those files for the mods you're trying and try running it again
learning table arestill here :)

and this AI rocks all .
McLoud
Posts: 36
Joined: 03 Sep 2006, 22:31

Post by McLoud »

I think you should really make the construction thing flexible, it will not understand the new construction hubs in EE at all. Being flexible will allow it to use the nuke/metheor facilites as well. One thing: some units need special sites, like the factories of the hubs and nuke/metheors sub-units must be close to the builder. Adding support for detecting metal and geothermal spots right would be great too (I think the first is made by another code not from AAI I guess?)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Hubs are a litle more problematic in that they're actually units that build buildings, and some checks in AIs interpret them as factories and some dont realize that they're fixed and try to assign them stuff outside their build range.....
McLoud
Posts: 36
Joined: 03 Sep 2006, 22:31

Post by McLoud »

It's possible to see what units a certain unit can build instead of trying to see if it is a factory or not? I fail to see a difference between a hub, a factory and a construction vehicle that can't move. Darn, I think I should download the code sometime :oops:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

a factory builds units

units build factories

thats how it was in classic TA.

AAI is built around this assumption, thus it cannot handle units building units.

Also, a conv vehicle is effectively a buildign when ti ahs speed=0; the same as a hub in ee. As a result thsi poses a enw problem since one of the ways of detecting a factory is ud->builder==true && ud->speed <1 which is true for units with speed=0, so they're told to build units but they cant so its borked. Also there's no checking build ranges. a convehicle with speed==0 detected as a builder could be told to travel to build a mex despite it having no speed so its stuck forever...

However in a flexible building system there would be no distinction between hubs factories and untis save speed and build distance checks for hubs.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

status report:


work on aai 0.78 is more or less finished. apart from various crash/bug/seg fault fixes i mainly extended/fixed/revised the new attack system. in my test games aai now sometimes retreats, aai's habit of sending in streams of units has been reduced a lot, usage of combat units to defend its base is smarter now, ...

the quality of aai's decisions depend heavily on the learning data and scouting, sometimes they are still pretty stupid (like withdrawing units to early etc.) i want to run some more tests to figure out if it's possible to improve aais combat behaviour without writing a lot of new code
User avatar
overkill
Posts: 500
Joined: 02 Sep 2006, 01:15

Post by overkill »

hey great job by far this is my favorite ai but it wont run with the current version of aa
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

*tired* rename the mod cfg file .....
-> read the *** manual
Post Reply

Return to “AI”