Where's the Java AI Interface?

Where's the Java AI Interface?

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

Moderators: hoijui, Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Where's the Java AI Interface?

Post by PauloMorfeo »

To make a long story short, is there anywhere I can get a 64b v96 Java Interface or a 64b v98 Java Interface?

---

I've just now reinstalled Spring (and Ubuntu, ufff) from the Ubuntu Software Center. It's running the current v96. However, the AI folder doesn't contain the Java Interface (and the Java AIs were dying at birth).
(about a week ago when I first started playing with spring's AIs - and the package was v86 - it had the Java interface...)

Then I downloaded both v96 statics:
http://sourceforge.net/projects/springr ... z/download
http://sourceforge.net/projects/springr ... z/download
And neither has the Java interface.

Then I downloaded both v98 statics:
http://sourceforge.net/projects/springr ... z/download
http://sourceforge.net/projects/springr ... z/download
And the 32b archive had the Java interface but the 64b folder didnt. (...!?)

Then I copied the Interface folder from the v98 archive to my AI folder (correct path of course), and upon finalizing the countdown to start the game, spring hunged up on me.

I was running SpringRTS v96 because I haven't managed to get SpringLobby to actually use the static versions - no matter if I point it to the executable/DLL paths, it would always load the v96...

The hung up is not surprising, I reckon either 64b or v96 are incompatible to the 32b v98 Interface.

Code: Select all

[f=0000000]  -> Version: 96.0
[f=0000000]  -> Connection established (given id 0)
[f=0000000] Spectator Player finished loading and is now ingame
[f=0000000] GameID: 116e3c54aa5f13af973ce0041cdf4421
[f=0000000] Error: /build/buildd/spring-96.0+dfsg/rts/System/Platform/Linux/SoLib.cpp:18: SoLib::SoLib: /home/paulo/.config/spring/AI/Interfaces/Java/0.1/libAIInterface.so: wrong ELF class: ELFCLASS32
[f=0000000] Error: Loading AI Interface library from file "/home/paulo/.config/spring/AI/Interfaces/Java/0.1/libAIInterface.so".
[f=0000000] Error: Segmentation fault (SIGSEGV) in spring 96.0
[f=0000000] Error: Stacktrace for Spring 96.0:
infolog.txt
(14.57 KiB) Downloaded 6 times
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Where's the Java AI Interface?

Post by abma »

PauloMorfeo wrote:I was running SpringRTS v96 because I haven't managed to get SpringLobby to actually use the static versions - no matter if I point it to the executable/DLL paths, it would always load the v96...
is spring 98 in the list of known spring versions? (in springlobby edit->preferences->spring) which version is selected there? the selected version is the default version in this dialog (yes, quiet ugly but nobody tried to add a nice gui setting for that yet).

please focus on fixing the real problems and don't make new ones. (this is atm, that you run spring 96.0)
playerO1
Posts: 57
Joined: 25 Jun 2014, 15:22

Re: Where's the Java AI Interface?

Post by playerO1 »

I fount that for Linux in Spring repository have package: Spring, Spring DBG and "spring-javaai" - interface and java-bot's for 96 and 98 spring engine.
p.s. For interface developers: Whay you modify some interface function name and structures, and old Java AI can not work with new AI interface. But you do not increase AI interface version? It always "0.1" for Spring 94.0 and 96, but bot for spring 94.1 can not work on Spring 98 interface, but interface version not change. You change Spring version, whay you not change AI interface version?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Where's the Java AI Interface?

Post by hoijui »

... i remember having written some code that auto-calculates some hash from the interface source files, which could be used as a compatibility check... but i guess it is not being used then. :/ (which would be my fault). nobody is really maintaining the interface, i think, so nobody thinks about such stuff.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: Where's the Java AI Interface?

Post by PauloMorfeo »

hoijui wrote:... nobody is really maintaining the interface, i think, so ...
For projects like these «community» ones I think that more important than taking on the work of maintaining something is to have the work of building something that requires little to no maintenance (because things will end up un-maintained for medium~large periods).

Good job, I guess - nobody is maintaining it and it's still working fine (and it even allowed me to win a few games against Kernel Panic's AI).

Ho, and if I'm not mistaken (from a very old forum thread) you were one of the main responsible ones for that new Interface. After having briefly tried the non "OO" Java interface, thanks for what you did and once again good job.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Where's the Java AI Interface?

Post by hoijui »

i did pretty much everything, yes. rewrote the AI interface to be C only, setup the AI Interface plugin system and made all the plugins (old C++, new C++, Java, Java OO Wrapper) that are still in use (there was python and mono too (by other people), but they were both never completed and are now non-working). due to many things being auto-generated, it needs less maintenance in some way, but that stuff is also more complex, and thus new stuff does sometimes not find its way into the AI interface, and bugs are harder to find/fix. i still don't see a way to make it fundamentally, architecturally better, though. .. maybe there would be a language better suited then AWK...
Post Reply

Return to “AI”