NTai XE10.1b - Page 75

NTai XE10.1b

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

Moderators: hoijui, Moderators

Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Post by Smiff »

yah what's weird is it's not the PC showing the sync-on-frame errors that's running the bots. i run all bots on the fast dual-core PC for exactly that reason.

it seems NTai bots shouldn't be used if *any* PC joining the game is slow(er than what?)

the specs of the PC showing the sync errors is:
KT400 based motherboard, 1GB DDR400 RAM
100Mb network (hangs at gigabit due to ASrock's mb design)
AthlonXP 1.666Ghz 256kb L2
XP SP2

I may be about to upgrade that CPU actually that could be interesting. (but SocketA prices on faster AthlonXP on ebay = ridiculous!)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ah I run with core 2 duo, I'm not sure sure about athlons atm.

Your running 0.75b2 right? Compiled by yourself? In VS2005?

An SVN version of NTai could possibly provide better performance but the level of performance increase gained from the behaviour refactoring if any at all is questionable.


I'll see if I can pull a build out of my hat this afternoon.
Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Post by Smiff »

i am running 0.75b2, but downloaded from the main page.

my server is an Athlon dual core and it runs great on there.

thanks for your attention :)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Post by Smiff »

that build crashes for me:
...
AI/Bot-libs/NTai.dll has C++ interface
AI has enabled cheating.
GlobalAI2: Junk in buffer :;
Spring 0.75b2 has crashed.
Exception: Access violation (0xc0000005)
Exception Address: 0x6af684e9
DLL information:
0x00400000 spring
0x7c900000 ntdll
0x7c800000 kernel32
0x77dd0000 ADVAPI32
0x77e70000 RPCRT4
0x73f10000 dsound
0x77c10000 msvcrt
0x7e410000 USER32
0x77f10000 GDI32
0x774e0000 ole32
0x76b40000 WINMM
0x77c00000 VERSION
0x68b20000 GLU32
0x5ed00000 OPENGL32
0x73760000 DDRAW
0x73bc0000 DCIMAN32
0x76c90000 IMAGEHLP
0x71ad0000 WSOCK32
0x71ab0000 WS2_32
0x71aa0000 WS2HELP
0x10000000 SDL
0x7c340000 MSVCR71
0x00d00000 DevIL
0x66fc0000 freetype6
0x61b80000 zlib1
0x003d0000 glew32
0x00e90000 ILU
0x016d0000 RocketDock
0x76bf0000 PSAPI
0x69500000 nvoglnt
0x71a50000 mswsock
0x662b0000 hnetcfg
0x71a90000 wshtcpip
0x76c30000 WINTRUST
0x77a80000 CRYPT32
0x77b20000 MSASN1
0x72d20000 wdmaud
0x72d10000 msacm32
0x77be0000 MSACM32
0x77bd0000 midimap
0x73ee0000 KsUser
0x6aec0000 NTai
0x59a60000 DBGHELP
Stacktrace:
(0) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF684E9]
(1) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF68364]
(2) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF67852]
(3) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF65FB8]
(4) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF4574C]
(5) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AF4971D]
(6) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AEEB38C]
(7) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AEFFA02]
(8) E:\Games\Spring\AI\Bot-libs\NTai.dll [0x6AEE9932]
(9) E:\Games\Spring\spring.exe [0x0058A325]
(10) E:\Games\Spring\spring.exe [0x006E9FE6]
(11) E:\Games\Spring\spring.exe [0x006F2200]
(12) E:\Games\Spring\spring.exe [0x00618D99]
(13) E:\Games\Spring\spring.exe [0x005BB71D]
(14) E:\Games\Spring\spring.exe [0x005DB50C]
(15) E:\Games\Spring\spring.exe [0x005DE5EE]
(16) E:\Games\Spring\spring.exe [0x00819AA9]
(17) E:\Games\Spring\spring.exe [0x00821C68]
(18) E:\Games\Spring\spring.exe [0x00822038]
(19) E:\Games\Spring\spring.exe [0x00822269]
(20) E:\Games\Spring\spring.exe [0x0090F147]
(21) E:\Games\Spring\spring.exe [0x00401292]
(22) E:\Games\Spring\spring.exe [0x004012DD]
(23) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FD7]
[/quote]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I have no use of the stack traces spring spits out, can you get me a copy of the AI log and script.txt?
Smiff
Posts: 123
Joined: 03 Oct 2007, 12:54

Post by Smiff »

sorry
[GAME]
{
Mapname=Altored_Divide.smf;
StartMetal=1000;
StartEnergy=1000;
MaxUnits=1000;
StartPosType=1;
GameMode=1;
GameType=XTAPE.sdz;
LimitDGun=0;
DiminishingMMs=0;
GhostedBuildings=1;

HostIP=localhost;
HostPort=8452;

MyPlayerNum=0;

NumPlayers=1;
NumTeams=2;
NumAllyTeams=2;

[PLAYER0]
{
name=smiff;
countryCode=gb;
Spectator=0;
team=0;
}

[TEAM0]
{
TeamLeader=0;
AllyTeam=0;
RGBColor=0.35294 0.35294 1.00000;
Side=Arm;
Handicap=0;
}
[TEAM1]
{
TeamLeader=0;
AllyTeam=1;
RGBColor=0.78431 0.00000 0.00000;
Side=Arm;
Handicap=0;
AIDLL=AI/Bot-libs/NTai.dll;
}
[ALLYTEAM0]
{
NumAllies=0;
}
[ALLYTEAM1]
{
NumAllies=0;
}
NumRestrictions=0;
[RESTRICT]
{
}
}
AI log
:: NTAI XE9.79 Log File
:: Programmed and maintained by AF/T.Nowell
:: Copyright (C) 2004-7 Tom Nowell/AF
:: Game started: 3.9.2007 22:40:19

:: XTA v9.1
:: XTA Version 9.1
:: First instance of NTAI
:: smiff
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: spring_engine
:: AI DLL's in game
:: AI/Bot-libs/NTai.dll : AI :: 1

[-]|22:40:19| < Frame: 0 >logging started
KAI Metal Class by Krogothe
Metal Spots loaded from file
Metal Spots Found 90
:: Found 90 Metal Spots
[-]|22:40:19| < Frame: 0 >Order Router constructed
[-]|22:40:19| < Frame: 0 >DTHandler constructed
[-]|22:40:19| < Frame: 0 >RadarHandler constructed
[-]|22:40:19| < Frame: 0 >Planning constructed
[-]|22:40:19| < Frame: 0 >Assigner constructed
[-]|22:40:19| < Frame: 0 >Economy constructed
[-]|22:40:19| < Frame: 0 >Manufacturer constructed
[-]|22:40:19| < Frame: 0 >BuildingPlacer constructed
[-]|22:40:19| < Frame: 0 >Chaser constructed
[-]|22:40:19| < Frame: 0 >Initialisising
[-]|22:40:19| < Frame: 0 >Mod TDF loaded
[-]|22:40:20| < Frame: 0 >Junk in buffer :;
[-]|22:40:20| < Frame: 0 >Mod TDF loaded
[-]|22:40:20| < Frame: 0 >values filled
[-]|22:40:20| < Frame: 0 >Arrays filled

[-]|22:40:20| < Frame: 0 >Loading unit data
[-]|22:40:20| < Frame: 0 >Unit data loaded
:: Altored_Divide.smf
:: XTAPE.sdz
:: map size 16 x 16
[-]|22:40:20| < Frame: 0 >Assigner Init'd
[-]|22:40:20| < Frame: 0 >Planner Init'd
No MetaTags where defined
[-]|22:40:20| < Frame: 0 >Manufacturer Init'd
[-]|22:40:20| < Frame: 0 >BuildingPlacement Init'd
[-]|22:40:20| < Frame: 0 >Value ai\kamikaze missing in file buffer
[-]|22:40:20| < Frame: 0 >Chaser Init'd
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Thanks, Ill take a proepr look when I get home later.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

crashing this early is usually a problem with the learning files. try deleting them and it may cure the problem.

for some reason i can't download the test dll so I'll build it out of svn and test it myself.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

ok built this out of SVN and it still crashes when you build a mex
[-]|14:12:7| < Frame: 0 >loading contents of tasklist :: arm_commander :: filling tasklist with #17 items
[-]|14:12:7| < Frame: 0 >loaded contents of tasklist :: arm_commander :: loaded tasklist at 17 items
[-]|14:12:7| < Frame: 0 >CKeywordConstructionTask::Init b_mex
[-]|14:12:7| < Frame: 0 >CKeywordConstructionTask::Build() :: armmex
[-]|14:12:7| < Frame: 0 >CKeywordConstructionTask::RecieveMessage G->OrderRouter->GiveOrder(tc)== true :: armmex
[-]|14:12:7| < Frame: 0 >CKeywordConstructionTask::RecieveMessage wiping and creaiing the plan :: armmex
[-]|14:12:8| < Frame: 3 >issuing command in update()
[-]|14:12:8| < Frame: 3 >Command: ID: -101 Timeout: 360 params: 856, 450.296, 984, 0, source of command: CBuild
[-]|14:12:8| < Frame: 3 >issuing command in update() succeeded
that is where the log ends.

Does this work on your machine? This bug is really easy to reproduce, simply building a mex causes the crash and i can't see how this would be machine specific. What happens when you test it?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

My machine complains about the file not being flagged as executable and I doubt I could run any heavyweight openGL app with these generic opensource drivers atm...


I'm stuck in ubuntu 7 with nvidia drivers that hate my kernel and refuse to load for me (hooray generic vesa drivers @ 1024x768). My Vista install refuses to boot either after I messed up with nvidia driver installs and uninstalls =(

When you say svn do you mean the build I posted or the build I committed?

And does anybody have links to how to debug in linux?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

debugging in linux is easy, but different from windows.

you need to compile with -g option and then you can use gdb or several frontends for it (e.g. ddd.) google will give much more detailed answers.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

A quick crash-course if you're using scons:

Code: Select all

cd $SpringSourceDir
scons configure debug=2
scons GlobalAI
<move the NTAI .so to $SpringDir/AI/Bot-libs/>
cd $SpringDir
gdb ./spring
r
<run a global AI test with NTAI until it dies>
bt
Last edited by Kloot on 07 Oct 2007, 17:40, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

See I have never compiled anything with command line before save for:

bjam boost
scons
scons configure
scons install
javac helloworld.java

and maybe a few other java tutorials in university (Netbeans ftw!)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

great time to start, then! 8)
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

by SVN i mean the files you committed, if you have a more up to date version commit the changes and i'll try those.

just tried the version on UF XE9.79 Experimental. This also crashes when building a mex
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If you can get me a stack trace I'll probably be able to fix it
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

how do i get you a stack trace? I assume you mean an NTai stack trace...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Through a debugger, I assume you compiled yourself? If you want a usable dll from me your out of luck, I haven't figured out how to compile NTai under linux nm cross compile it with mingw32.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

if i had a working debugger i'd fix the thing myself. I though seeing as you made the changes that broke it you might know what you'd changed and be able to fix it.
Post Reply

Return to “AI”