Linux and AI's - Page 2

Linux and AI's

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

Sorry AF, I wasn't implying any failure on your part.

The latest NTai you posted, AF, doesn't contain any build information along the lines of a makefile (or whatever file scons looks for, haven't much experience with scons...). What I'd really like to do is get the NTAIxe9 working on the tagged taspring_0.72b1 release from the svn branch. Seems like that should solve this problem with the trunk svn, and I'd much prefer to play with your AI on a stable build (playing game build on trunk svn currently encounters floating point exceptions, is this just me?).

I suppose if you pm me the dependency information I could write a makefile. Or would using gmake be taboo?

Or is this whole idea rediculous? I'm open to that possibility as well. I just really want some NTAI happiness.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

@keithjr last time i tried before NTAI v9 make it into svn.
Just replace the NTAI folders & run scons & it will build it for u
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I dont run linux, I've never used scons, and I've never used a makefile, all i knwo about them is that they're usually generated by dev tools and are used to compile stuff.

I'm told scons autocompiles any cpp files in the NTai folder into an NTai.dll and that as long as there're no bugs in compiling it'll build and I neednt worry about it.

Nobody ahs mentioned NTai xe9 nto working in 0.72, I thought ti was just the svn build, but if you're using AA then it's broke regardless.

Metatags in XE9 are broken and despite me warning egarwaen at the time that metatags are unreliable he went ahead and used them extensively in his AA buildtree, so AA wont work with my current NTai build as a result. Also I'm not sure when it broke and what was done to break it because he took so long to test and I'm not an AA player so I always test with ee or XTA.

Although for nwo the quick fix would actually be to take a metatag such as l1factory=armlab,corlab and do a find and replace replacing the metatag with its value.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

EDIT: I'm a dummy.
Last edited by keithjr on 08 Aug 2006, 03:01, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

This looks like a nasty result of your meddlings in the NTai folder.

Where you trying to revert to XE7.5?

Erase the entire folder and then copy over XE7.5. XE8 should work but there are one or two files you need to erase from it aka Factor.h/cpp
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

@keithkr
meant
nuke NTAI folder
replace it with NTAI v9 folder from latest svn
that should work ( well it did :P )
will test it out tomorrow & list any other changes needed to get it to compile
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

I was forgetting to nuke the intermediary files... STUPID ME!!! Sorry.

ok, deleted everything (I think) but I still get this error when it tries to build TdfParser.cpp...

Code: Select all

/usr/include/boost/spirit/iterator/position_iterator.hpp: In member function 'ForwardIteratorT boost::spirit::position_iterator2<ForwardIteratorT, PositionT>::get_endline() const':
/usr/include/boost/spirit/iterator/position_iterator.hpp:418: error: expected unqualified-id before string constant
/usr/include/boost/spirit/iterator/position_iterator.hpp:421: error: increment of read-only location
/usr/include/boost/spirit/iterator/position_iterator.hpp:421: error: invalid lvalue in assignment
scons: *** [build/AI/Global/NTAI/Helpers/TdfParser.os] Error 1
Annoying that the error comes up in the boost files... I have the latest boost package.

Keep in mind this problem might be just as stupid as my last one. Maybe I shouldn't do things like this after 5 hours of sleep and 12 hours of work...
:twisted:

I have a working AAI now, so I'll update the front page with the procedure.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

are you usign boost 1.33.1 or 1.33? or earlier?
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

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

Post by AF »

can you compile TDFParser in spring? They're 95% identical
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

AF wrote:can you compile TDFParser in spring? They're 95% identical
Yes, at least the one in tvo3 trunk compiles fine. Here is the output during scons.

Code: Select all

g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -g -O1 -pipe -fno-strict-aliasing -frename-registers -fno-default-inline -fno-inline -fno-inline-functions -fno-inline-functions-called-once -mfpmath=387 -pthread -fPIC -DDEBUG -D_DEBUG -D_REENTRANT -DDIRECT_CONTROL_ALLOWED -D_SZ_ONE_DIRECTORY -DSTREFLOP_X87 -DSYNCDEBUG -DNO_CLIPBOARD -DNO_AVI -DNO_LUA -Irts -Irts/System -Irts/lib/streflop -I/usr/include -I/usr/include/GL -I/usr/include/freetype2 -I/usr/include/SDL -I/usr/include/python2.4 -Irts/ExternalAI -c -o build/AI/Global/NTAI/Helpers/TdfParser.os AI/Global/NTAI/Helpers/TdfParser.cpp
In file included from /usr/include/boost/spirit/core/primitives/impl/numerics.ipp:13,
                 from /usr/include/boost/spirit/core/primitives/numerics.hpp:16,                 from /usr/include/boost/spirit/core.hpp:34,
                 from /usr/include/boost/spirit.hpp:28,
                 from AI/Global/NTAI/Helpers/TdfParser.cpp:7:
rts/System/cmath:16:2: warning: #warning cmath inclusion detected, include streflop.h instead!
In file included from AI/Global/NTAI/Helpers/../Core/include.h:305,
                 from AI/Global/NTAI/Helpers/../Core/helper.h:4,
                 from AI/Global/NTAI/Helpers/TdfParser.cpp:12:
AI/Global/NTAI/Helpers/../Core/../Helpers/Units/CUnitDefLoader.h:12:3: warning: no newline at end of file
Odd. I'll look around and see if files are missing. I got the downloaded archive you posted on the AI forum, with the source files in it. Can I not just build with those files alone?

Keep in mind I'm trying to compile this under 0.72b1
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

No you cant compile them aloen they ahve to eb palced in the right place in the spring source or the incldue paths will be wrong.....

You're better off with the svn version than that copy though....
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

yeah, I just heard that the floating point exceptions have been resolved... was doing this for my HOWTO though. This might just be another keith-problem so I won't dwell on it.
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

hello, I tried ntai 9 out yesterday. SVN trunk dll + data from mod distribution.

it starts up without complaining in-game,but builds only a few structures and is easily defeated. the bot enables cheating at startup according to console.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

it doesnt cheat untill you tell it to. Jelmer added that message so it is displayed as soon as the AI loads the cheat interface, but NTai and KAI load the cheat interface at the very beginning regardless of wether they actually use it.

Also dont use versions of XTA before XTA 6 (such as v5/5.5 0.66 SE/ or XTA Pimped Edition), and dont use any version of AA with the NTai build in the svn. I'm aware that some methods of getting spring on linux package XTA 5.5, and the necessary tags to make NTai use the XTA buildtree werent added till XTA v6 so you'll have to update to XTA 6/7.

metatags are broken in the svn build and the build I have which means the AA buildtree will just build solar collectors/windgens and mexes.

Also the AA buildtree will only work for the standard variant and for versions after AA 2.0
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

AF wrote:metatags are broken in the svn build and the build I have which means the AA buildtree will just build solar collectors/windgens and mexes.
resuming: NTAI should work if I update the xta moddata? to beyond the one in 72b1 datapack(v7)?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

XTA v7 +sv build+ svn AI data should work. If not then you're out of luck as I'm developing Ntai with 0.72b1 code.

Also the NTai that comes with the svn code at tagged release for 0.72b1 is nto XE9 but XE7.5 and probably wont work fullstop with most mods so if you compile NTai from the svn compile the latest version of NTai and not a tagged release...
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

I think I did, the AI builds a few structures in it's corner (with little radars on them. and 3-5 units. I sent in a radarplane and a nuke and the game's over. This is on small maps.


anything I should look for in the ntai logfile?

First frames from botlog:

Code: Select all

 :: NTAI XE9RC22 Log File 
 :: Programmed and maintained by AF 
 :: Copyright (C) 2006 AF 
 :: Released under the GPL 2.0 Liscence 
 :: Game started: 14.7.2006  13:46:53

 :: XTA v7
 :: XTA
 :: First instance of NTAI
[00:00] < Frame: 0 >file script.txt not found
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
 :: AI DLL's in game
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Section game missing in file script.txt

[00:00] < Frame: 0 >logging started
KAI Metal Class by Krogothe
Metal Spots couldnt be loaded from file AI/MexData/Caldera.Mv4
Time taken to generate spots: 50000ms.
Metal Spots created and saved!
Metal Spots Found 35
 :: Found 35 Metal Spots
[00:00] < Frame: 0 >Order Router constructed
[00:00] < Frame: 0 >DTHandler constructed
[00:00] < Frame: 0 >RadarHandler constructed
[00:00] < Frame: 0 >Planning constructed
[00:00] < Frame: 0 >Assigner constructed
[00:00] < Frame: 0 >Scouter constructed
[00:00] < Frame: 0 >Economy constructed
[00:00] < Frame: 0 >Manufacturer constructed
[00:00] < Frame: 0 >Chaser constructed
[00:00] < Frame: 0 >Initialisising
[00:00] < Frame: 0 >Mod TDF loaded
[00:00] < Frame: 0 >values filled
[00:00] < Frame: 0 >Arrays filled

[00:00] < Frame: 0 >Loading unit data
[00:00] < Frame: 0 >Unit data loaded
 :: Caldera.smf
 :: xtape.sd7
 :: map size 12 x 12
[00:00] < Frame: 0 >Assigner Init'd
[00:00] < Frame: 0 >Planner Init'd
[00:00] < Frame: 0 >Manufacturer Init'd
[00:00] < Frame: 0 >file script.txt not found
[00:00] < Frame: 0 >Section game missing in file script.txt
[00:00] < Frame: 0 >Scouter Init'd
[00:00] < Frame: 0 >Value ai\kamikaze missing in file buffer
[00:00] < Frame: 0 >Chaser Init'd
[00:00] < Frame: 0 >CManufacturer::UnitFinished
[00:00] < Frame: 0 >CManufacturer::UnitFinished role set
[00:00] < Frame: 0 >loading buildtree for CORCOM
[00:00] < Frame: 0 >loading buildtree from AI/XTAPE/Caldera.smf/corcom3.txt
 :: error loading file :: AI/XTAPE/Caldera.smf/corcom3.txt
[00:00] < Frame: 0 >loaded contents of  file :: AI/XTAPE/corcom3.txt :: filling buildtree
[00:00] < Frame: 0 >issuing scheduled idle from factor::loadbuildtree
[00:00] < Frame: 0 >CManufacturer::UnitFinished buildtree loaded
[00:00] < Frame: 0 >CManufacturer::UnitFinished builder pushed back
[00:00] < Frame: 3 >issuing command in update()
[00:00] < Frame: 3 >issuing command in update() succeeded
[00:00] < Frame: 3 >issuing command in update()
[00:00] < Frame: 3 >issuing command in update() succeeded
[00:01] < Frame: 30 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[00:01] < Frame: 30 >CManufacturer::TaskCycle executing task :: B_MEX
[00:01] < Frame: 30 >CBuild() :: 
[00:01] < Frame: 30 >Factor::CBuild(3) error: a problem occurred loading this units unit definition : 
[00:01] < Frame: 30 >cbuild returns false on :: 
[00:01] < Frame: 30 >CManufacturer::TaskCycle Task returned false
[00:01] < Frame: 30 >CManufacturer::TaskCycle Attempting to schedule an idle...
[00:01] < Frame: 44 >1 units scheduled for idle calls
[00:01] < Frame: 44 >issuing scheduled unitidle
[00:01] < Frame: 44 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[00:01] < Frame: 44 >CManufacturer::TaskCycle executing task :: B_POWER
[00:01] < Frame: 44 >CBuild() :: 
[00:01] < Frame: 44 >Factor::CBuild(3) error: a problem occurred loading this units unit definitio
n : 
[00:01] < Frame: 44 >cbuild returns false on :: 
[00:01] < Frame: 44 >CManufacturer::TaskCycle Task returned false
[00:01] < Frame: 44 >CManufacturer::TaskCycle Attempting to schedule an idle...
[00:01] < Frame: 44 >scheduled unitidle loop finished
[00:01] < Frame: 59 >1 units scheduled for idle calls
[00:01] < Frame: 59 >issuing scheduled unitidle
[00:01] < Frame: 59 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[00:01] < Frame: 59 >CManufacturer::TaskCycle executing task :: B_MEX
[00:01] < Frame: 59 >CBuild() :: 
[00:01] < Frame: 59 >Factor::CBuild(3) error: a problem occurred loading this units unit definitio
n : 
[00:01] < Frame: 59 >cbuild returns false on :: 
[00:01] < Frame: 59 >CManufacturer::TaskCycle Task returned false
[00:01] < Frame: 59 >CManufacturer::TaskCycle Attempting to schedule an idle...
[00:01] < Frame: 59 >scheduled unitidle loop finished
[00:02] < Frame: 74 >1 units scheduled for idle calls
[00:02] < Frame: 74 >issuing scheduled unitidle
[00:02] < Frame: 74 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[00:02] < Frame: 74 >CManufacturer::TaskCycle executing task :: B_NA
[00:02] < Frame: 74 >CBuild() :: corap
[00:02] < Frame: 74 >Given the go ahead :: CORAP
[00:02] < Frame: 74 >CManufacturer::TaskCycle Task executed
[00:02] < Frame: 74 >CManufacturer::TaskCycle Succesful, exiting loop
[00:02] < Frame: 74 >scheduled unitidle loop finished
[00:02] < Frame: 74 >issuing command in update()
[00:02] < Frame: 74 >issuing command in update() succeeded
[00:34] < Frame: 1040 >CManufacturer::UnitFinished
[00:34] < Frame: 1040 >CManufacturer::UnitFinished role set
[00:34] < Frame: 1040 >loading buildtree for CORAP
[00:34] < Frame: 1040 >Value tasklists\corap missing in file buffer
[00:34] < Frame: 1040 >loading buildtree from AI/XTAPE/Caldera.smf/corap.txt
 :: error loading file :: AI/XTAPE/Caldera.smf/corap.txt
[00:34] < Frame: 1040 >loaded contents of  file :: AI/XTAPE/corap.txt :: filling buildtree
[00:34] < Frame: 1040 >issuing scheduled idle from factor::loadbuildtree
[00:34] < Frame: 1040 >CManufacturer::UnitFinished buildtree loaded
[00:34] < Frame: 1040 >CManufacturer::UnitFinished builder pushed back
[00:34] < Frame: 1041 >CManufacturer::TaskCycle has found the unitID, issuing TaskCycle
[00:34] < Frame: 1041 >CManufacturer::TaskCycle executing task :: B_NA
[00:34] < Frame: 1041 >CBuild() :: coraap
[00:34] < Frame: 1041 >Given the go ahead :: CORAAP
[00:34] < Frame: 1041 >CManufacturer::TaskCycle Task executed
[00:34] < Frame: 1041 >CManufacturer::TaskCycle Succesful, exiting loop
[00:34] < Frame: 1043 >issuing command in update()
[00:34] < Frame: 1043 >issuing command in update() succeeded
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

just noticed the month is 1 month off.
the filename's month is set correct though.
AI/Logs/08-14-2006\ 1346\ \[1\]XE9RC22.log
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Just (finally) committed AAI datafiles to SVN, AAI bot should work "out of the box" now, at least for XTA & latest SVN.

E: only requirement is that the data directory with AI data (ie. trunk/game) is the writable data directory - no AI has notion of multiple datadirs yet.
Post Reply

Return to “Linux”