Request

Request

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

Moderators: hoijui, Moderators, hoijui, Moderators

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Request

Post by AF »

I'm an inexperienced player, adn I ahve masses of data thats needed for NTAI.

NTAI's current status is pitiful comapred to what a good set of data could give it. I dont have the time or the experience to make it work as well as it should, so I'm asking for help, is there someone willing to maintainthe NTAI build data for XTA & AA at least and improve NTAI's gameplay by a longshot. I have nearly no experience with AA and that shows in NTAI's gameplay in XTA currently.
0 x

Hansolo88
Posts: 18
Joined: 15 Feb 2006, 21:31

Post by Hansolo88 »

As I said in the other thread, I'm willing to mess around with it and see what I can do. However, I'm sure there are others who could do a far better job so it would be great to have others put in some time on this.
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Actually, I decided last night that I would attempt to make a build tree and stuff for xta (because I want to make an AI and I still can't make heads or tails of C++ :evil: :-) )

So maybe you'll see it in a week or so.

edit:
Does anybody know where I can get a list of all the unitnames? Or do I just have to sift through the mod file?
0 x

User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

If you use my FBI Editor, you can load all the FBI files into a Excel sheet, so you can see the units unitname and propper name together. Plus you can check out the stats if you want to compare some units.
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Cool!

Ok, I'll start using that instead of the aa unit database.
0 x

Hansolo88
Posts: 18
Joined: 15 Feb 2006, 21:31

Post by Hansolo88 »

Ok AF,

I worked on this for about an hour last night before I had to give up in utter frustration; I simply can't get NTAI to follow even a simple buildtree.

The explanation you put up at Darkstars was great, it explained all those tags etc. quite nicely. So I decided to try to program a simple buildtree and experiment from there. I set the following tags:

abstract=0
use_mod_default=1

I then brought in Commander.txt, Builder.txt, and Factory.txt from the Default folder into the AA144S folder. So, with use_mod_default set to 1, it should load the Commander.txt buildtree from the mod folder, right? I then tinkered with this buildtree so I could observe that my changes were meaning something. I made sure to save my changes and completely shut down Spring between modifications. However, for the life of me, nothing I could do seemed to make the slightest difference in the world, NTAI comm does the exact same thing every single time; build nothing but solars and mexes and a few random llts, no factories, nothin.

I then tried to use the tags:

abstract=0
use_mod_default=0
use_mod_default_if_absent=1

I brought in all the cor***.txt specific buildtrees from the AA142 folder, but it won't load those either. Nothing I could do could convince NTAI to change anything.

I did mess with the cheap_multiplier tag to try to observe effects there, but again, nothing doing. I tried values as low as 1.5 or so and as high as 50 and still no factories for player 1. If player 2 was also NTAI, it would typically build one factory at the start, then nothing but the typical stuff.

I also manually added numerous units as attackers, including most of the L1 combat kbots, and set a few units as scouts. I also set:

dynamic_selection=0

When Player 2 NTAI did build a lab, it would scout but attackers never moved, just piled up around the factory.

Overall, very frustrating. I tried to avoid some kind of simple error, like double-checking my spelling and making sure I had semi-colons at the end of every line in mod.tdf

Typicall I used Painted Desert, I started using Comet Catchers Remake but it was building the mexes one space away from the metal patches and I got tired of that. I observed both NTAI vs NTAI and NTAI vs AAI, all CORE.

So... any advice? At this point I just want to see the commander build my buildtree, and I can't even do that.
0 x

Gurkha
Posts: 81
Joined: 31 Aug 2004, 01:53

Post by Gurkha »

are you looking into getting the AI to create buildtrees automatically? that would seem, to me, to be the next logical step (although it would be quite hard to do properly)
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

I have a solution that is better than making the AI make its own buildtrees, doing which would probably be too cumbersome and complicated only to eb made obsolete very quickly.

HanSolo, is your copy of NTAI logging or did the installer not make a logfolder? There are messages relating to errors that ocur reading files and following tasks in the logfiles that could help you, such as misspelt unitnames, errors aprsing files, files not loading etc

Because of these problems I have NTAI XE7c, which has one or two changes to hwo ti laods the data, and it has a few other debug messages added, such as whenever the threshold value is updated it prints the value to logfile, that way if the value is something like 12000 then I have an idea as to what is going wrong....

That and several changes where made to the unviersal build routines after I tried lil_guys_own_JOO v6 mod so that NTAI built appartments rather than spamming factories and quickly stalling.

Also atatck units will always stand outside their factory utnill given a target, which will never happen if NTAI never scouts or never sees the enemy.

For unitnames tyr openign the learning file, it should have the untinames their efficiency then their ingame human names

e.g.

Code: Select all

    ARMCOM=2000; // Arm Commander
    ARMMEX=567; // Metal Extractor
XE7c is not a bugfix however and it should perform the same as XE7b unless your playing that mod I said before, or you're making buildtrees and want more information.

http://www.fileuniverse.com/?p=showitem&ID=2588
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Well, I had some problems. First, I had to comment out the entire mod.tdf file except for abstract=0, or else I got an unhandled exception please contact the ai author.

Then, I had hansolo's problem, and the log was this:

Code: Select all

 :: Redhaven.smf
 :: xta_se_v066.sdz
 :: map size 16 x 16
[00:00] error loading file :: NTAI\xta_se_v066.sdz\Redhaven.smf\corcom.txt
[00:00] error :: a value :: corellt :: was parsed in :: NTAI\xta_se_v066.sdz\corcom.txt :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair
[00:00] error :: a value :: B_DEFENSE :: was parsed in :: NTAI\xta_se_v066.sdz\corcom.txt :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair
[00:00] error :: a value :: B_DEFENSE :: was parsed in :: NTAI\xta_se_v066.sdz\corcom.txt :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair
[00:00] error :: a value :: B_DEFENSE :: was parsed in :: NTAI\xta_se_v066.sdz\corcom.txt :: this does not have a valid UnitDef according to the engine, and is not a Task keyword such as repair
do the unitnames have to be uppercase? and do the general commands (B_DEFENSE) have to be lowercase?
0 x

User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

Lindir The Green wrote:[00:00] error :: a value :: corellt :: was parsed in ::
It should be "corllt" not "corellt".
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

ok both misspellings

B_DEFENCE vs B_DEFENSE

as for atatcking, argh ahs given me some informationa dn I've gotten tiem to ivnestigate ti and found some mistakes I amde, I'll be releasing a fixed version some time soon, exactly when I dunno, but if you are using scouter+atatcker tags rather than dynamic_selection=1; then add the atatck untis to both scout and atatck tags for seek and destroy for now while testing.

Also it's best to define every single tag even if you're not using it but just as nothing to make sure you get what you want.
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

darn British, spelling defense wrong :P

Anyhow, I am still having a lot of problems.

1) First of all, spring crashes with an unhandled exception please contact the ai developer if I define kamikaze. No explanation in the log.

2) NTAI barely ever builds factories, even in spots where in the log it says "[00:16] CBuild() :: armlab" and stuff. Setting the cheap multiplier higher has no effect. But it is odd because this problem sometimes goes away. I just finished a NTAI arm vs. NTAI core game where arm was building 50% of the factories it should have, and core built 1 factory at the 25 minute mark after its comm had walked all over the map building mexes and solars. Setting the factory spacing higher seems to sometimes help.

3) NTAI blatantly ignores my Scouters and Attackers. When it builds a scout, the scout just sits there doing nothing. But the scouts scout just fine when I have dynamic_selection=1, however...

4) NTAI never attacks. Ever. Last game arm had like 20 sampsons, and 5 scouts running around in core's base, but the sampsons still just sat there in a ring around the factory.

here is my mod.tdf file if it matters:

Code: Select all

[AI]
{
	abstract=0;
	use_mod_default=0;
	use_mod_default_if_absent=0;
	Scouters=armamph, armawac, armfast, armfav, armflash, armflea, armlatnk, armpeep, armpt, armpw, armseer, armsehak, armsfig, armsh, armspy, armwar, corak, corawac, corfast, corfav, corfink, corgator, corhunt, corpt, corsfig, corsh, corspy, corvoyer, corvrad;
	Attackers=armaas, armacsub, armah, armamph, armanac, armaser, armbats, armbrawl, armbull, armcroc, armcrus, armfido, armfig, armflak, armflash, armflea, armham, armhawk, armjam, armjeth, armlance, armlatnk, armmanni, armmark, armmart, armmav, armmerl, armmh, armmship, armpnix, armpt, armpw, armraven, armrock, armroy, armsam, armscram, armseap, armsfig, armsh, armsjam, armsnipe, armspid, armstump, armsub, armsubk, armthund, armvader, armwar,  armyork, armzeus, corah, corak, coramph, corape, corarch, corbats, corcan, corcrash, corcrus, coreter, corgator, corgol, corhrk, corhurc, corkrog, corlevlr, cormart, cormh, cormist, cormort, cormship, corpt, corpyro, corraid, correap, corroach, corroy, corseal, corseap, corsent, corsfig, corsh, corshad, corshark, corsjam, corsnap, corspec, corssub, corstorm, corsub, corsumo, corthud, cortitan, corvamp, corveng, corvrock;
	\\ both=armamph, armflash, armflea, armlatnk, armpt, armpw, armsfig, armsh, armwar, corak, corgator, corpt, corsfig, corsh;
	cheap_multiplier=1.6;
	defence_spacing=15;
	power_spacing=8;
	factory_spacing=15;
	default_spacing=9;
	dynamic_selection=0;
	fire_state_commanders=2;
	move_state_commanders=1;
	\\ kamikaze=armvader, corroach;
}
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

First off i'd find ti more useful fiy ou apckaged the folder itself and all tis contents and uploaded to fu/email me it, isntead of posting ti on the foruma dn makignt eh thread longwidned.

I foudn the bug that plagued atatcking, and I got ti working.

the versions at fileuniverse XE7c/ and higher have a build palcement extension to make nanoblobz work better however it doesnt take itno acocunt wether the new rotated position is offmap, which would lea dto an error from closestbuildsite and no factory being built. I've since fixed this too.

There is also no 'both' tag. though i think you put that their because of what i said about search and destroy, what I meant by that was doignt he following

scout=ARMPW;
attackers=ARMPW;

would give a search and destroy type behaviour.

I'll ahve to ivnestigate the kamikaze tag causing crashes.....

Also look at the logfile for me, specifically type .verbose at startup to make sure it's logged, I'd liek to know if there are any error messages or if your mod.tdf is simply bigger than the buffer.......

email em fi yuo want a copy of it, I'm not doing any public releases whatsoever till I have a half decent XTA/AA buildtree.

Also be aware that the higher the spacing values the less likely you'll find a valid building pos int he search radius. I guess I'll icnrease the radius fromt he existign 2000 in closestbuildsite but it's already high. Try pushing the factory spacing down to 12 for the next release.

Also there's a new tag 'message'. When NTAI starts up it will print the value of message in the console....
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

AF wrote:There is also no 'both' tag. though i think you put that their because of what i said about search and destroy.
That was for my own reference, hence its commented out-ness :wink:
Also look at the logfile for me, specifically type .verbose at startup to make sure it's logged, I'd liek to know if there are any error messages or if your mod.tdf is simply bigger than the buffer.......
Well, it's already logging, will verbose make it log more? I'll try it.
email em fi yuo want a copy of it, I'm not doing any public releases whatsoever till I have a half decent XTA/AA buildtree.
I'll take any bugfixes you have, watch for my e-mail :P
Also be aware that the higher the spacing values the less likely you'll find a valid building pos int he search radius. I guess I'll icnrease the radius fromt he existign 2000 in closestbuildsite but it's already high. Try pushing the factory spacing down to 12 for the next release.
I tested it down but it didn't seem to help... I'll try it again.

edit: fixed the quotes
Last edited by Lindir The Green on 12 Mar 2006, 21:41, edited 1 time in total.
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

.verbose will force all log messages to be copied to the console, so if the log file isn't written to disk by the time it crashes you'll have a copy in infolog.txt
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

http://www.fileuniverse.com/?p=showitem&ID=2613
Not for public consumption

Also don't bother putting things like crawling bombs on the kamikaze list, they dont need it. I meant that tag for things that didn't self destruct automatically (crawling bombs mines etc) but rather for things that have huge death explosions on self destruct and wont selfd unless you hit ctrl+d otherwise they have puny explosions. An example being the wolf in nanoblobz 0.2
0 x

User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

seems to work well, except for it still doesn't pay any attention to my scouters and attackers. When I have dynamic_selection=1, the first armfast is build and it says in the log "found scout unit" or something like that, and then the armfast runs all over the map scouting. But when dynamic_selection=0, the armfast is built and it doesn't say anything or do anything. The same thing also happens with attackers.

I did some testing and it is definitely NOT the mod.tdf file being too big. I deleted almost everything in it so that it looked like this:

Code: Select all

[AI]
{
     dynamic_selection=0;
     Scouters=armfast, corfast;
     Attackers=;
}
and the same thing happened.

:?
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

armfast in your post example != armfast unitname in your unti fbi

I wouldnt be surprised if NTAI found a situation where it evaluated

does armfast equal ARMFAST?

For best usage, have exactly the same capitalisation as it says in the units fbi when inside files. If you're dealing with a filename hwoever such as a buildtree for the armfast, then it will always be lowercase, but only the filename armfast.txt. Anything inside that file however is case sensitive, for example repair is a keyword, Repair is not.

I'm also worried by your lack of tags there, especially cheap_multiplier, default_spacing, abstract=0;, kamikaze=;, spacemod=0; and so on. Try to define tags even fi your not going to use them just to make sure you get exactly what you want.
0 x

User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Try having NTAI convert all strings to lowercase or else using the SunParser. That should clear up these kinds of misunderstandings with capitalization.

Also, if you have enough problems with U.K. vs U.S. spellings you could have NTAI accomodate both, with something like:

Code: Select all

std::string tag;
If(tag == std::string("armour") || tag == std::string("armor")
  DoArmourThing;
else if(tag == std::string("centre") || tag == std::string("center")
  DoCentreThing
else if(tag == std::string("defence") || tag == std::string("defense")
  DoDefenceThing

Etc..
I don't know exactly how your code is laid out, but copy-and-paste could solve the problem.
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post by AF »

I added a provision for american spelling of B_DEFENCE, and I'm not sure makign the contents of the files all lower case would be such a good idea, as I'm not sure what case the engine stores it all in and sometimes there is use in capitalisation
0 x

Post Reply

Return to “AI”