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

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

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.
[03:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[08:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: Excalibur