Short story: I want to run some machine learning algorithms on Spring armies. To do this I'm trying to write something that will generate random armies, make them fight, and record the outcomes, and an AI seemed like the best way to do it. I'm using the Java OOAI interface to hook into Spring, since Java is relatively easy to use and there were a few tutorials floating around.
However, I've run into a bit of a roadblock. According to the documentation I could find, Eclipse's analysis tools, and even (as far as I can tell) the code itself, there should be methods Cheats.giveMeUnit and Cheats.giveMeResources. Both methods seem to be missing (check out Spring\AI\Interfaces\Java\0.1\src-generated\main\java\com\springrts\ai\oo\Cheats.java or boot up your favorite IDE). Am I missing something here, or is this a bug in the java autogeneration?
JavaOOAI Cheats class missing methods
Moderators: hoijui, Moderators
Re: JavaOOAI Cheats class missing methods
The JavaDoc you linked to is from the release, while the code is from master, though that very part did not change much, i think.
Are you using master or the release? i guess release.
in both cases, you should have a sources jar, while in release it should be something like AIInterface-src.jar, it would be AIWrapper-src.jar in master.
Are you using master or the release? i guess release.
in both cases, you should have a sources jar, while in release it should be something like AIInterface-src.jar, it would be AIWrapper-src.jar in master.
Re: JavaOOAI Cheats class missing methods
I'm using the release right now; sometime tonight I'll compile the master and try that.
I imported and looked through the -src jar before I posted. The Cheats class declaration is there, and it has everything except giveMeUnits and giveMeResources.
I imported and looked through the -src jar before I posted. The Cheats class declaration is there, and it has everything except giveMeUnits and giveMeResources.
Re: JavaOOAI Cheats class missing methods
Finally got it to compile and run. It doesn't look like the Java object-oriented AI interface was generated at all, though I'm still looking around to see what I might have missed. The functions I need were successfully generated in the non-OO Java interface, so I guess I can just switch to that if I can't figure out what's going on.
If I do cmake -LH, I get:
Which makes me think that it's there somewhere and I just can't find it. Did you change the directory structure around since the last release?
If I do cmake -LH, I get:
Code: Select all
-- Found AI Wrapper: JavaOO
[...]
// Which AI Interfaces (and Skirmish AIs using them) to build [ALL|NATIVE|JAVA|NONE]
AI_TYPES:STRING=ALL
Re: JavaOOAI Cheats class missing methods
as i kind of hinted at, and so does the message you show there:
the OO part is now a wrapper, not part of the interface anymore, therefore it is under /AI/Wrappers/, not /AI/Interfaces/ now.
Details about the changes can be found in the top-most thread in this sub-forum:
http://springrts.com/phpbb/viewtopic.php?f=15&t=24114
the OO part is now a wrapper, not part of the interface anymore, therefore it is under /AI/Wrappers/, not /AI/Interfaces/ now.
Details about the changes can be found in the top-most thread in this sub-forum:
http://springrts.com/phpbb/viewtopic.php?f=15&t=24114