NTai XE10.1b - Page 32

NTai XE10.1b

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

Moderators: hoijui, Moderators

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

AI/Global/NTAI/Helpers/../Core/../Helpers/Information.h:3: warning: extra qualif ication 'CInfo::' on member 'CInfo'
(from errors hollowsoul posted)

This is fixed by removing CInfo:: in this example:

Code: Select all

class CInfo {
  CInfo::CInfo();
};
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Is ti also giving errors for unviersal build keywords liek B_POWER and B_MEX?

Metatags arent the best wya todo thigns they where added to support certain thgins should other keywords not allow it, so use universal build keywords where you can.

Try compilign RC20 if you can, that has a change that might affect you, the source is int eh linux .deb package thread in Deva dn tis hosted at FU so it'll be at the top fo the latest files page..

What changes did tvo make?

I renamed the CGlobalAI class to CNTai and changed interface.cpp about the typecasting, where there more changes? Or have I got a mailing list post in ym inbox I ahvent read yet?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

AF wrote:What changes did tvo make?
That were the 2 or 3 errors with fixes I posted a while ago in this thread, and I attached them to the FU download too.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

attatched to the FU download huh?

32 pages of thread, they where probably added already, if not pleae point them out.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Hm, I've reentered antitank in the file and now it doesn't give errors anymore (was probably a problem with the text file) but it ignores the build order, all it delivers are three cdroblds, over and over again. Also the cdroblds are building units they shouldn't build, they're starting with a really expensive one when that's only at the end of their build order (since it can't afford that really expensive unit at the beginning of the game). I figure that's the interpolation but is there a way to tell NTAI to not build a specific unit unless the buildorder specifies it?

The relevant tags are:
drone=cdrolas, cdromsl, cdrosnpr;
antitank=cdromsl, cacv;
antidrone=cdrolas, cdrosnpr, ctrireme;
The build order is:
cdrobld, cdrobld, cdrobld, drone, drone, drone, drone, antidrone, antitank, antitank, repeat

I'm using the metatags to force NTAI to mix its attack groups (since it considers most of the units ineffective) but I prefer doing that in groups (so it has the choice to e.g. build laser or sniper drones). The build order is from the drone factory, it can't build the cacv and ctrireme.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

dont, use a mixture of B_ASSAULT and B_RAND_ASSAULT or define put in raw unitnames.
Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

AF: Is there a good way to replicate the seemingly-standard-ish mex, power, power, lab, mex, power, power, LLT in NTAI? Everything I've tried leads to it skipping the lab and going nuts with resource buildings.

I think I'm going to try a very pared-down buildtree system first, closer to that used for EE than that used for XTA. I think simpler logic will be easier to write and debug.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

first make sure it doesnt stall at any point

Secondly, use unviersal keywords if all else fails

Thirdly, reduce the spacing values in mod.tdf, especially for factories

And make sure you test a wide variety fo maps.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

nice tobi only noticed i hit that bug when i ran with debug turned on :P. so nearly forgot about it. also i think i traced my lockin up spring to havin slightly different versions of glibc opps :P

@AF
tobi's changes = http://www.fileuniverse.com/?p=showitem&ID=3552
Last edited by hollowsoul on 01 Jul 2006, 23:39, edited 2 times in total.
Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

AF wrote:first make sure it doesnt stall at any point

Secondly, use unviersal keywords if all else fails

Thirdly, reduce the spacing values in mod.tdf, especially for factories

And make sure you test a wide variety fo maps.
I'm just trying to get basic functionality working first. I know it doesn't stall, but it does do some strange things. The build order I see most often no matter how I tweak things is solar mex metal maker... Which makes no sense.

How does the tasklist stuff work? It uses <name>.txt if there's no tasklist for that unit and a random entry from the tasklist if there is one?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

yah thats how it works.

That may be part of a problem with building placement
try reducing the factoryspacing tags to 1 in mod.tdf
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

oh the _hypot thing seems outdated. You're suign RC19 code as I changed _hypot to hypot inr adarhandler.

Any instance fo _hypot pelase change it.

Also dont #include TDFParser.h in tdfparser.cpp as it's included in helper.h
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

UPDATE ---> stubbornish pays off :shock:

Narrowed down error

Code: Select all

scons: *** ParentOfRoot instance has no attribute 'must_be_a_Dir'
Down to NTAI/Helpers/Media/Bitmap.cpp #includes
Now to find the linux headers or can i safely remove NTAI/Helpers/Media directory ???
Last edited by hollowsoul on 02 Jul 2006, 01:46, edited 3 times in total.
Egarwaen
Posts: 1207
Joined: 27 Feb 2006, 21:19

Post by Egarwaen »

AF wrote:That may be part of a problem with building placement
try reducing the factoryspacing tags to 1 in mod.tdf
That affects things even if no factories have yet been built?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

remove that folder entirely.

No it affects palcement, if it cant be palced it gets skipped
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

edit :- nm got what u were saying now
compiling atm hopefully bot works now :)
also will try find out those linux verions of headers for media/foo later
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Remove CBitmap and classes int he media folder, they arent used..
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Okay, I've replaced all metatags with built-in tags or unit names, seems to work now.

A test match against the KAI had NTAI win within 4 minutes and 20 seconds. The KAI had no chance despite its cheating. A second match (with slightly modified build orders) had NTAI build one of those super expensive things at the start (from a B_ASSAULT order), crippling its economy for ~5 minutes giving KAI a chance to get a bit of an economy going (the match took 20 minutes). Interestingly NTAI built lots of radar/artillery vehicles which countered KAI's cheating (which was so powerful that it made all other units NTAI fielded completely useless). NTAI always had at least 75% map dominance.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

no luck on linux still same problem.
  • bot able to build lvl1 (airplane in my tests) factorys & lvl2
    its able to build defenses & constrution lvl1/2 (planes in my test)
    and its able to build metal extractors
    But nothing else....
emailed logs to u (have extra logging turned like u mentioned in email)

cant compile spring with debugin atm still i figure out how to edit information.h like tobi mention earlier :/ so no backtraces atm :/
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

In that case I may need todo an RC20a, where I've taken the unit data and put it into the Global class so it isnt shared across all NTais, that might just fix it for you.

KDR, what mod is this in? I dont recognize those unitnames, glad to see someone picking up the build data system.
Post Reply

Return to “AI”