Staredit Network > Forums > General StarCraft > Topic: BWAPI Questions
BWAPI Questions
Jan 7 2017, 1:51 am
By: sethmachine  

Jan 7 2017, 1:51 am sethmachine Post #1



Hi,

I am interested in making an AI/bot for a custom map that is not too dissimilar from melee.

I understand the BWAPI project is still active (http://www.starcraftai.com/wiki/Main_Page) and would be the best way to accomplish this.

I have a few questions--

1) Is it possible to run an AI on the iCCUP / Abyss in Battle.net without getting kicked off?

2) If the to 1) is yes, how would I run an AI while on Battle.net?

3) Has anyone used BWAPI to write an AI for a custom map? If so, would you mind sharing how you did it or advice?

4) Has anyone used Machine Learning to create an AI?

5) If yes to 4), is it possible to train an AI using:

1. Saved replays
2. Live training--e.g. have the AI record how I play, so that it plays the game like me?


6) I notice people made a JNI wrapper for BWAPI. Are there any limitations to using the Java library? Because I know Java but don't know C++.

I would also love to Skype if anyone would like to discuss!



None.

Jan 7 2017, 3:54 am Heinermann Post #2

SDE, BWAPI owner, hacker.

1) Yes, ICCUP is the preferred means of running your AI on Battle.net enabled multiplayer.
2) Simply run Chaoslauncher as you would otherwise and join a game. It should work as it would in single player.
3) People have used BWAPI to write AIs for the campaign (which are custom maps).
4) Yes.
5) I know people have used thousands of replays as training material. I don't know about live training.
6) I recommend BWMirror, since it is closest in use cases to the C++ API. There are some limitations, such as lack of Filters API and such.




Jan 7 2017, 2:38 pm sethmachine Post #3



1 +2) I was able to get the Java example bot running on normal starcraft single player.
When I used Chaoslaunched and selected "iCCup", the Java robot could't find the game tables and never connected.

Is there a different API I need to use to connect to a Battle.net game? Or did iCCup/ChaosLaunch disable the injection of the BWAPI.dll ?

4 + 5) Can you provide any examples as how to use a replay for training data? Does BWAPI have an API for examining a replay frame by frame?

6) What is the Filters API?


In regards to Machine Learning, how would I train an AI to build supply depots at the appropriate times? For example, the Java example bot just keep training SCVs and orders them to mine. Once it hits 10 supply, the robot can't build more SCVs. A sub-optimal solution would be to order the construction of a supply depot when the supply gets close to the current limit. A more optimal solution will time the construction of the supply depot with the start of the next constructed unit, so that depots are created just as they are or will be needed. There's other problems too--suppose you need to tech up, but only have limited minerals and you're going to run out of supply. How does the AI decided to allocate minerals to depot construction versus teching up?

I suppose this is just a complex weight learning problem. How would I use a replay of myself to train the AI the weights associated with each action so that it make good enough decisions?

Or what has been the general approach to this? Do you have a pointer to an example?




Jan 7 2017, 5:43 pm CecilSunkure Post #4



Personally I would recommend putting more thought into the design of what you feed your network. For building supply depots I would actually hand-code in some openers, and use some nets to solve sub-problems. For example say your AI can do one of 3 different openers in the first 5 minutes, and only plays on Lost Temple. You can feed the net inputs like where the enemy spawned, what buildings they have, etc. Then use this information to place structures at good locations. For supply depots certainly you want to follow a build opener, but in the later part of the game you always want a good 10-20 supply above your total pop count. In this case I think supply depot location is much more important than timing, since timing is easier solved by hand compared to an AI.

For example you could train the network to place depots like human players; in a cluster and away from Barracks/Factories, and away from ramps.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy, RIVE