Linux and AI's

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

Linux and AI's

Post by keithjr »

This is meant to be a "living document," and as such I will update this front post with new details as they come. Topics to be addressed are what AI's are available for WHICH mods (NTAI in XTAPE5 is the only one I've got working), WHERE to download their respective files, and HOW to install said files and play.


------ AAI -------
Precompiled download: http://jujutsu.ungaornar.se/AAI_0_70rc.7z

Rename folder aidll/globalai/AAI -> aidll/globalai/aai


------ NTAI ------
Download source here: http://www.fileuniverse.com/?p=showitem&ID=3566
Last edited by keithjr on 30 Jul 2006, 00:20, edited 1 time in total.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

The source for the NTai and AAI AI's can be found in SVN. If it's not working right after a compile it would be relatively easy to fix it. If you can code I would write a patch instead of a "living document" that describes a workaround.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Got AAI to run here.

Need to grab the AAI conf files & rename them.
There in the pre-compiled AAI http://jujutsu.ungaornar.se/AAI_0_70rc.7z
And copy the AAI folder to aidll/globalai/aai
Theres no conf files for it on svn as far as i can see.

Some of the files are in the wrong case i.e

AAI/ folder should be aai
XTAPE.cfg should be xtape.cfg

Only ones i found so far.

I prob should write up a new ebuild for gentoo. But been busy with rewrite of pygtk app & forgot to mention lack of conf files for AAI on svn (as far i could see, had a quick look)

As for NTAI have a look @ gentoo ebuild, it sets up conf files for NTAI 7.5. https://developer.berlios.de/project/sh ... up_id=4358
Grab latest one & open foo.ebuild with text editor.
Havent had any luck gettin NTAI 9 to work right though = broken for me
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Some thigns have changed in the SVN that beak NTai, probably changes in UnitDef or the Unit AI.

The problem si I havent a clue what changed and when I ask people they dont give a useful answer, ratehr repeat what I already know.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

AF i gave u extra debugging before regarding bot probs with unitdef & dont have time to babysit doing one again.

When nothing happened last time as far as i know. As i got no reply via email (which i said how i sent it to u ages ago).

I got one reply via forums which i think u mention u got usefull debugging info via email (guess it was what i sent u before) & u said very roughly what code to change. Assuming i knew & understood your AI code, (would have better to give a patch / diff or a copy of the section of code to replace via PM ).
Another time asked to help fix one bug so i could compile spring & ai with debuggin symbols. So i could get u a backtrace of the AI a few minutes into game, to help debug it. Got no fix for it, think it got fixed by someone else since it made it into svn.

And thats when i gave up tryin to help get it work, unless its a conf problem for gentoo ebuild

Really dont feel like doin same again as i dont have spare time atm to waste on runnin NTAI with extra debuggin got other things to work on atm. Or to get a backtrace as that would mean atm recompiling glibc with debuggin & spring == longer than 3 hours if i remember correctly.

And as sidenote u lost most / any respect had for u, since u had only one atm with opensource bot. When u went and did a slight dig @ me via forums regarding requesting a image for a button.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

mwha?!?!?! huh? =s
And as sidenote u lost most / any respect had for u, since u had only one atm with opensource bot. When u went and did a slight dig @ me via forums regarding requesting a image for a button.
If you take a look you'll fidn I havent posted at all anywhere in that thread.

As for UntiDef, I think you sent me logs but logs arent that helpful, i was assuming it was sean mirrsens rotation code at the time and didnt realise it hadnt bene committed to svn at the time.

And when i did get an answer about UntiDef, I got a reply giving 2 examples and then something along the line sof "a whole lotta other stuff", which was in a thread ehre on the forum. I have received nothing about the UnitDef structure from you by email, pelase check you got the email address right

I got one reply via forums which i think u mention u got usefull debugging info via email (guess it was what i sent u before) & u said very roughly what code to change. Assuming i knew & understood your AI code, (would have better to give a patch / diff or a copy of the section of code to replace via PM ).
I dont svn my own code store, only the copy I commit and update to from SVN, and at the time i didnt know howto make patches, and the necessary changes where literally single line changes, and they wherent fixes, they where along the lines of add this line and tell me if it still fails....
Another time asked to help fix one bug so i could compile spring & ai with debuggin symbols. So i could get u a backtrace of the AI a few minutes into game, to help debug it. Got no fix for it, think it got fixed by someone else since it made it into svn.
It wasnt fixed, that was just me updating RC19->RC21 in the svn.

When I refered to UnitDef in my last post I was referring to changes since 0.72b1 in UnitDef.h in the class UnitDef, as I am told something has changed, and I dont know what or how it has changed save the one or two tags I added myself, but by that time ti was already broken.

So please, dont loose respect for me because I flamed you in a post I've never posted in, because I didnt respond to data on UnitDef.h I didnt recieve, because I recieved logs of NTai for linux from you, or because you dont want to spend 3 hours recompiling spring with debugging.

I did nto ask you specifically for UnitDef data. Nor do I want NTai code that changed or logs of NTai right now, Infatc what i want doesnt need NTai at all to be done. What i want to know is relative specificalyl to Spring code not AI code, specifically what has changed in the UnitDef class or the Unit SubAI classes that could affect how skirmish AI's behave. or more specifically after what commit to svn did NTai stop working?

As always I'll be hunting for possible causes on the NTai side of things, all i was asking is that someone try todo the same for the Spring side.

ps:: Spring compiles in debug mode in VS 2003 pro in around 20 to 30 minutes for me, from a fresh code setup, and 1-5 minutes after the initial compile.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

I never realized that capitalization had to be all lower-case for the folders and configuration files. That is one of the reasons I put this thread up, becaues it was NEVER stated elsewhere and it is crucial information.

The NTai vs. latest SVN problems are being addressed in a seperate thread, please keep that discussion there. This is where I want to compile something of a "User-End To-Do List" to get AI's running. Stuff like how to set up the aidll directory what I'm after.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The AI folder NTai uses shouldnt be put in the aidll directory. Put it ias follows: springfolder/AI/

All filenames should be lowercase in NTai too
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

In the end this must be fixed for AAI and NTAI in SVN, making a enduser manual useless (it should work out of the box IMHO).

Because berlios is borked we can't fix anything atm tho...
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

@ keithjr
the aai config files are mixed cased not all lowercase unlike NTAI ( i believe )
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

I editted in what little information I've gotten, but I still can't get AAI to work. I renamed the folder and config file like you said, hollowsoul, but it the AI, ingame, complained that the config file could not be found. I renamed the file to what it wanted (uppercase) and left the folder in lowercase (aai) and the game opens up, but when the countdown timer is done and the game is about to start, I get booted back to desktop and I have no contol over my mouse.

any idea? There's no log file or error generated.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

@ keithjr
First idea will show files that aai trys to access

Code: Select all

strace -e trace=file spring 2>&1 | grep -i aai
or
strace -e trace=file spring 2>&1 | grep -i AAI
in console

Or if u using my app care to PM me your
  • ~/.spring-gui/script.txt
    or if debspring
    ~/.springdir/localhost:0.0/spring-gui/script.txt

Code: Select all

strace -e trace=file spring /path/to/script.txt 2>&1 | grep -i aai
or
strace -e trace=file spring /path/to/script.txt 2>&1 | grep -i AAI
Note :- if using debspring change spring in above code sections to spring.bin


Otherwise can only think of running spring & bot through gdb need to recompile with debuggin symbols though :(
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

There's AAI code in the svns o instead you could look at the class AAIConfig and see where it's laoding from.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

So am I hearing that mine is an isolated case? Are there other deb-spring users who's gotten the latest AAI to work? The older version of NTAI I have works just fine...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Submarine himself said he cant get AAI to work with the latest build and neither can I
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

so that precompiled download I'm linking to in the first post is useless?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

AAI compiled from SVN (with trunk spring) works a bit here (it doesn't crash / error out at least, didn't test more).

You need to rename game/aidll/globalai/aai/cfg/mod/XTAPE.cfg -> game/aidll/globalai/aai/cfg/mod/xtape.cfg too. (I didn't test other mods.)

E: for AAI & getting all mods to work with it, see other thread I just made
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

So overall, the AI situation doesn't look very bright at the moment.

JCAI is dead in the water, and the latest version I've yet to see ever build a combat unit in any mod (not as if there are many that it supports)

NTAI doesn't build correctly (unless something has changed) in svn trunk. The version provided with tagged release 0.72b1 is old and unimpressive (never attacks). The new version linked to doesn't provide a linux installer, and source code link doesn't seem to provide any non-visual studios build method or instructions on placement of files.

AAI seems to work for some people but crashes for me. Haven't tried using the one in trunk yet. File linked to seems to be corrupt. No config files exist in svn.

Something has to change...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

No AI has ever come with a linux installer.

I ahve updates for NTai but I havent applied them to svn yet. One may affect the ability of it to build in the latest svn build though, but I havent tested to see yet.....
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

I actually got AAI to work using the .so file built in svn trunk and the latest config files which I thought were corrupt. So that's some good news.
Post Reply

Return to “Linux”