NTai XE10.1b - Page 29

NTai XE10.1b

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

Moderators: hoijui, Moderators

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

Post by AF »

You give script.txt or any other gamescript as an arguement to spring.

It's how the lobby currently starts a game.

You may also need the data folder, which I'm uplaoding in a new source package for RC18
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Get The Source Code Here

Updated to include the data folder
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

http://www.fileuniverse.com/?p=showitem&ID=3567

Fixed all the bugs, including the one where AKs would stand around idle.

AF:

Actually now I'm pretty happy with the rules. Maybe E and M could switch priority though, because E stalling is MUCH MUCH worse than M stalling.

B_GLOBAL isn't as important now that there are the construction repair ranges. I still think it should be allowed though, because more flexibility is always good. Except there should be a different text file for each side.

And in the game when the commander ran off to the water to build a UW mex, there was a much closer land mex spot. That's where it should have built.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

:-edited post alot now :)

Got NTAI v9 bot to work under gentoo / linux :)
Should have ebuild ready tomorrow & with optional use-flag to be built against external NTAI ai (i.e from source tarball & not svn).

Gonna have quick game before its to late & see if i hit any bugs
Still complains about missing script.txt (See bottom of post)

Using latest Src & Data .rar file
btw add tvo fixes to src .rar file when u get chance plz :P

******************
This errors for UnitDef reader & some newline complaints are

http://pastebin.ca/71638
******************

Also about script.txt no seperate tool for linux to make them up as far as i know.

Atm, linux startscripts are made up in spring.
Basicly on linux u start spring & are given a simple menu to pick options that generates script (bots,mods,map)
i.e have a look in svn trunk/rts/Game/StartScripts

Would be very nice to get NTAI bot to be able to read script the linux uses
Maybe some dev might know how best way for your bot to read the script that spring generates from menu under linux.
Last edited by hollowsoul on 26 Jun 2006, 02:02, edited 11 times in total.
User avatar
Vassago
Posts: 77
Joined: 25 Jun 2006, 00:03

Post by Vassago »

AF wrote:
As for lag, I get lag, but I dont think thats NTai because when I view the debug mode stats it shows that the vats majority of lag is caused by the simulation tiself, and I get the lag regardles of wether NTai is there or not.
Well, I know for a fact that it is NTai. The version that comes WITH the latest install of TASpring runs absolutely smooth, but it crashes every so often. This latest version never crashes, but lags all to hell.

And no, cheats are not on.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Will give NTAI bot a proper test tomorrow.
After had a quick game but there were afew errors will pastebin a log tomorrow after proper test.

But one thing i did notice errors for buildtree for xtape.
Plz remember windows = case insensitive
i.e AI/XTAPE/r1.txt = AI/XTAPE/R1.txt

While linux / unix's = case sensitive
i.e AI/XTAPE/r1.txt != AI/XTAPE/R1.txt

( != not equal )
Plz try & fix the next buildtree plz
Ringold
Posts: 7
Joined: 19 Jun 2006, 16:32

Post by Ringold »

Vassago wrote:
AF wrote: Well, I know for a fact that it is NTai. The version that comes WITH the latest install of TASpring runs absolutely smooth, but it crashes every so often. This latest version never crashes, but lags all to hell.

And no, cheats are not on.
I've got to agree. I hit "b" and watch how the CPU time gets divied up, at the simulation cpu time runs nearly constant. Lag spikes come when suddenly AI cpu time goes from the single digits to 30 or 50%, which along with everything else ends up grinding things to an instant halt.

I'll post a proper log later. I usually get tired of hunting down that last stupid submarine hiding in the corner of a puddle and do something stupid to crash the game (.give 1000 team1 armcom, then self-destructing them, does an awesome job of it).. or Spring itself just decided to call it a day and locks up. in such cases, are the logs still useful, do they still get written to right up to the end?

Edit: Cheats on/off, happens either way.
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

hollowsoul wrote:But one thing i did notice errors for buildtree for xtape.
Plz remember windows = case insensitive
i.e AI/XTAPE/r1.txt = AI/XTAPE/R1.txt

While linux / unix's = case sensitive
i.e AI/XTAPE/r1.txt != AI/XTAPE/R1.txt
Oops, sorry about that. I'll fix it with the next buildtree.

But in the meantime you can just rename it.

edit: Don't forget to get the most recent buildtree from FU!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Dont bother building the Unitdef reader GroupAI. It has no gameplay use, it's for debug purposes in developing AI.

PS:: I thought all filenames where changed to lowercase by NTai before it tried to load them? I wonder if I accidentally deleted/commented it out? Unlikely but someone should check
Ringold
Posts: 7
Joined: 19 Jun 2006, 16:32

Post by Ringold »

Okay, did a game about 2hrs long on some "Risk"-like map.

Global AI time: 2521
Simulation time: 3134

At times, before I reduced the AI to nearly nothing, Global AI time total was actually higher than the simulation run time! w0wz0rs. I noticed the lag hits the roof when the enemy AI makes line-of-sight contact with my units.. any unit. anywhere. At one point, I sent 135 Rapier's to take out a straggler mex, and soon as they came within sight, lag. About 15min of it.

Only way I was able to end the game was build some of those rapid-fire bertha-like things, and nuke "Uistralia" a bunch of times. Finished it off with battle subs and Hawks.

I tried NTai Debug, but that didnt work, so ended up using NTaiLog or whatever. log size?

1.62gb.. for the AI that lasted the longest. 2.01gb in total. I can't even get the big one to open.. Notepad didn't work, AbiWord just ate CPU time for 20min before I gave up.. Word cant do anything larger than 512mb.

It's all about 8mb compressed, if somebody wants the goliaths. Not sure why Debug doesn't work, tried reinstalling, but says "Incorrect Global AI dll" "aidll\globalai\NTaiDEBUG.dll".

Somethings going wrong somewhere, thats all I know. No .aicheat.

Worth noting I'm just not letting a bunch of AI's go at it? I actually play myself, but dont know why that'd effect anything, versus just pure AIs.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Bot was tryin to load up XTAPE/r1.txt
But file is XTAPE/R1.txt

So guessin your code to load up lowercase filenames = ok :)

added:-
http://pastebin.ca/71883 = logs

Bot seems to build only const units & base. Not even a scout.
Using buildtree (change R?.txt to lowercase so bot will load the buildtree) off NTaiXE9RC18Src+Data.rar (cant get latest cause of FU whoes).

The following 2 errors are repeated abit in the link above

Code: Select all

[00:00] <0 Frames> loading buildtree from AI/XTAPE/Mars.smf/corcom3.txt
 :: error loading file :: AI/XTAPE/Mars.smf/corcom3.txt


[00:01] <59 Frames> Factor::CBuild(3) error: a problem occurred loading this units unit definition :
[00:01] <59 Frames> cbuild returns false on :: 
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I have a few ideas on reducing lag but I'll need to test them out.

untill then I dont think I'll be needing more logs till RC19
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Any idea about problem i posted about unable errors in log relating to units unit definition ??
Which i assume is why bot doesnt build any attacking units. As not much challenge to fight a bot with no teeth :( so close
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

huh I just realized that that messages should never get displayed.

Code: Select all

const UnitDef* uda = G->GetUnitDef(unit);
	if(uda == 0) return false;
	const UnitDef* ud = G->GetUnitDef(name);
	
	/////////////

	if(ud == 0){
		G->L.print("Factor::CBuild(3) error: a problem occurred loading this units unit definition : " + name);
		return false;
	} else if(uda == 0){
		G->L.print("Factor::CBuild(3) error: a problem occurred loading uda ");
		return false;
	}else {
As you can see if uda == 0/null then it returns false; which means it should never execute the second check. (I've now removed the first check in RC19)
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Could you include a debug version without logging? Or finally figure out what's different from the normal to the debug version :P
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Lots of little thigns change in a debug build, for example values are initialised to zero as soon as they're created, but in release mode they're not.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

That could be the reason why the other versions don't work. But I can live with that, if only the logfiles could be turned off ;)
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

AF: can you put all the NTai stuff on darkstars/sourceforge?

coz FU is down until July.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The logfiles shouldnt make any difference to whether you can play NTai or not.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

No but they waste hd space and seem to increase CPU usage. Prolly was a stupid idea :P
Post Reply

Return to “AI”