Java Tutorial Done...Now what?!

Java Tutorial Done...Now what?!

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

Moderators: hoijui, Moderators

Post Reply
Flibb
Posts: 2
Joined: 26 Jul 2010, 08:10

Java Tutorial Done...Now what?!

Post by Flibb »

Hi,

We are a team of 5 university students attempting to create a Java based AI for Balanced Annihilation on Spring.

We are acquainted with Java OO programming and are very interested in pursuing this project.

Till now we have completed the tutorial found on the Spring website which taught how to use callback to get the commander to create a solar plant. Since then we have been looking at different AI's like Crans, BAI etc to figure out how AI's work but this really hasn't helped us in gaining an understanding. We still don't even know how to read a metal map or what the unit name is for metal extractors.

I wanted to ask the AI developers out there if they could let us know what our next steps should be, in terms of how we should proceed to get a better understanding of AI development in Java. Any type of suggestions are welcome.

Thanks a ton!
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Java Tutorial Done...Now what?!

Post by Beherith »

Welcome to Spring!

Here is a list of the unit names for BA: http://modinfo.adune.nl/index.php?MOD=ba712

Sorry I cant help more with the AI part, as I know nothing about it, but it may help to check out the spring source from github: http://github.com/spring/spring/downloads
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Java Tutorial Done...Now what?!

Post by hoijui »

in general, you should never use unitDef names in an AI (except for messages that a human will see, eg. log).
you should rather browse the unitDef list, and check all the properties (eg. isResourceMaker(metalResourceId)). You may also check HughAI, which is also written in Java, if you did not yet.

other then that, please join the #ai channel on the lobby (also available through the IRC bridge, see FAQ).
if the tutorial and source of other AIs is not enough for you.. well.. you have to play more with the source of other AIs.. do not think there is anything better. You may also look at non-Java AIs. the interface looks a bit different there, but as they communicate with the same engine, things are still very similar (eg. metal map).
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: Java Tutorial Done...Now what?!

Post by Petah »

Yo, I can help you get started if you want (I made BAI). Just drop me a message either on here, or catch me in #ai
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Java Tutorial Done...Now what?!

Post by AF »

Some of the most successful AI have used unit names to get a leg up quickly
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Java Tutorial Done...Now what?!

Post by aegis »

you can use unit names in configuration as a shortcut, a mapping from unit to role
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: Java Tutorial Done...Now what?!

Post by cranphin »

Flibb wrote:Since then we have been looking at different AI's like Crans
Hey, neat! :)
Keep in mind it's nothing more (atm.) then a slightly tweaked Java port of a rather old C++ AI :)
Flibb wrote: , BAI etc to figure out how AI's work but this really hasn't helped us in gaining an understanding. We still don't even know how to read a metal map or what the unit name is for metal extractors.
What timezone are you in? if it's EU I can probably catch some of you online sometime, see if I can help that way :) Also, there tend to be AI developers on the ai channel on springlobby :)

Since 'my' ai does do pretty much most things needed, could also just walk through some of it's parts, I expect it's a lot easier to follow if I can explain some thing, but I prefer to do that online, much directer :)

On a other note, check up on the GPL mess/discussion around AI's, and make sure to check that with your teacher, to prevent later troubles :)

PS.
Ohyeah! Don't forget to update the tutorial if you're gonna start a new AI also ;) Since you'll know eactly what's missing :D
Flibb
Posts: 2
Joined: 26 Jul 2010, 08:10

Re: Java Tutorial Done...Now what?!

Post by Flibb »

Wow thank you all for the encouragement and help!

We downloaded HughAI and tried our best to figure out what the code was doing. We still couldn't figure out how the different classes were working because the type of programming was so different from the way its taught in the tutorial.

We have, however mastered the API and now know when different methods are called, and also how how to pass all kinds of different commands. Basically we've figured out all the logistics, but need to know what steps to take in developing an AI.

@Cranphin, hoijui: We can't connect to the spring lobby #ai due to some weird connection problems, but we definitely can be available on the forums or any other sort of chat portals (skype/MSN). Our time zones are extremely flexible, and we don't mind going online at anytime as we really want to get all the help we need!
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Java Tutorial Done...Now what?!

Post by hoijui »

if you can not connect to the lobby with one of the usual clients, try using the IRC bridge:
http://springrts.com/wiki/FAQ:technical ... _server.3F
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: Java Tutorial Done...Now what?!

Post by cranphin »

Hey, what happend to you guys? :)
Post Reply

Return to “AI”