Anyone else using the java proxy?

https://github.com/bwapi/bwapi
pfisch
Posts: 6
Joined: Sat Nov 14, 2009 6:40 pm

Anyone else using the java proxy?

Postby pfisch » Sun Nov 15, 2009 3:21 am

bwapi-proxy

I've been using this proxy to start work on the dragoon micro map for the ai tournament and I was wondering if anyone else is using the java proxy.

It's still missing a few things that the c++ bwapi has, but its much easier to code in java than c++ imo.

Anyway, if I get a good ai going I'll post the jar files, but I still have a ways to go.
pfisch
Posts: 6
Joined: Sat Nov 14, 2009 6:40 pm

Postby pfisch » Sun Nov 15, 2009 7:31 pm

So far I have got my army into an ai command hierarchy kinda deal, which has gone well.

Now I am working on a system that builds a profile of where the enemy army is, how big their force is, etc. I've been using a kind of confidence interval approach where as soon as a mobile type enemy unit is out of visual range a radius value is attached to the location(this radius will increase in size based upon unit speed, and when it gets too big the unit location becomes a ? to the ai).

Then I am planning to have a system where if a bunch of enemy units are close enough together it will group them into an enemy army that exists at a center point between the units plus a radius. I am still fleshing out how the enemy army group situation will work in my mind though, so how that works will probably change somewhat.


There are 2 things that the java proxy is lacking right now that have impeded my progress.

1. I can't figure out how to know if a unit dies inside my vision radius. It seems like the unit only issues the 'die' order about 50% of the time. This is going to become a problem if I can't find a resolution. Right now I am considering using a combination of the die order plus looking at the enemy units last known hp and if it is too low I will just say he's dead. This is obviously a less than satisfactory solution.

2. the unit's max speed and acceleration don't seem to be available to the java proxy. This creates a problem for the radius of where an enemy could be. I could just hardcode these values but I'd rather they be pulled from the unit type info.
awegawef
Posts: 5
Joined: Tue Nov 17, 2009 9:16 pm

Postby awegawef » Tue Nov 17, 2009 9:18 pm

Hey, I hate to ask this here, but I couldn't get the java proxy to compile, and I was wondering if you possibly knew why. I went into the directory with the java files and ran `javac *.java` and then ran the required class file (ProxyBot, I believe, don't have access to the machine atm) with `java ProxyBot`. I got a NoClassDefFoundError. I don't have a large amount of Java experience (but I would like to use it for the contest), so I would appreciate any help.

Thanks
pfisch
Posts: 6
Joined: Sat Nov 14, 2009 6:40 pm

Postby pfisch » Wed Nov 18, 2009 7:30 am

I don't have much java experience either, but if you have any oop experience it seems very simple so far.

What I did was used netbeans to set it up(Which is a great ide for java editing, especially if you know other oop languages. Whenever you are declaring something wrong it suggests ways to fix your declarations etc and will put them in correctly to show you what it means. Also the jvi plugin is great)

I couldn't get it to build a jar file that would run, but to be honest I didn't mess with that much and getting it working would probably be simple. What I got working was for it to run within netbeans so it could trace bugs while running and be dumping logs into the console.

All I did was make a new class project with the same .proxybot name for the package and then I pulled in all the .java files.

If you'd like I could put the whole netbeans project in a zip file and then you could try to open it and see if it just works. I'm not sure how it sets up dependencies but if that worked I wouldn't be surprised.

Also you need to use the old version of BWAI, not the ones that came out like last week.

http://bwapi.googlecode.com/files/BWAPI_Beta.zip

That one.
awegawef
Posts: 5
Joined: Tue Nov 17, 2009 9:16 pm

Postby awegawef » Fri Nov 20, 2009 9:14 pm

Alright, I've got everything up an running with the latest versions. I like the java proxy a lot. However, Starcraft crashes whenever I try to play with my bot in a UMS map. What gives? Are others having this issue?
pfisch
Posts: 6
Joined: Sat Nov 14, 2009 6:40 pm

Postby pfisch » Fri Nov 20, 2009 9:18 pm

what version of bwapi are you using?

I have the latest proxybot working with bwapi 2.1.4 on ums maps. If you can't get it going come on irc and i'll help.
Drachlen
Posts: 8
Joined: Sun Nov 22, 2009 9:35 am

Postby Drachlen » Sun Nov 22, 2009 9:57 am

I'm also using the "ProxyBot" ExampleAIModule.

I've been slowly modifying it to fit my needs, but it's been very useful.

When I first came across BWAPI (a buddy showed it to me) I thought it was really interesting. However, I really don't enjoy programming in c++, due to limited knowledge with the language.

Once I came across the proxy, it opened up a lot more options for me. I'm actually programming my bot in PHP (it sounds ridiculous, but it's working incredibly smooth).

I've been testing with a friend (who is programming in java, just modifying the original ProxyBot), and we've already had some interesting matches. I also have another friend who is working in Perl. So I think it really has opened up a lot of availability to people who'd rather not be programming in c++.

Another great thing about the proxy is no compiling. I've got mine setup so I can make adjustments to the bot, restart the PHP script, and continue, without compiling anything or restarting the match.
awegawef
Posts: 5
Joined: Tue Nov 17, 2009 9:16 pm

Postby awegawef » Thu Dec 17, 2009 10:19 pm

[deleted]
hamsterofdeath
Posts: 7
Joined: Fri Feb 26, 2010 9:46 pm

Postby hamsterofdeath » Fri Feb 26, 2010 10:36 pm

yes i am, but i cannot get past this error:
http://www.broodwarai.com/forums/index.php...;st=0#entry9360

any ideas?

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 1 guest