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.
[03:44 pm]
Suicidal Insanity -- Pr0nogo
Pr0nogo shouted: i don't know what you're asking for really
Something like http://www.stormcoast-fortress.net/cntt/formats/font/
[03:14 pm]
Pr0nogo -- i don't know what you're asking for really
[03:14 pm]
Pr0nogo -- Suicidal Insanity
Suicidal Insanity shouted: I also still could use spec sheet for the formats to make sure I am using them correctly - it appears BWscript doesn't have string names? Or they are in a different spot?
what does a spec sheet look like
[02:02 pm]
Corbo -- Suicidal Insanity
Suicidal Insanity shouted: I had thought it loads it from the MPQs and parses it, so I was working on re-implmenting that with the MPQ code changes, and then noticed that it does grab the MPQ interface but then ignores it :X
nice
[09:23 am]
Suicidal Insanity -- I also still could use spec sheet for the formats to make sure I am using them correctly - it appears BWscript doesn't have string names? Or they are in a different spot?
[09:22 am]
Suicidal Insanity -- I had thought it loads it from the MPQs and parses it, so I was working on re-implmenting that with the MPQ code changes, and then noticed that it does grab the MPQ interface but then ignores it :X
[09:03 am]
Pr0nogo -- ok, i'll explore that when you have that changed
[08:54 am]
Suicidal Insanity -- if trigedit has such things
[08:54 am]
Suicidal Insanity -- Or maybe change it to a warning
[08:54 am]
Suicidal Insanity -- I just need to disable the verification, then it would allow arbitrary characters
Please log in to shout.


Members Online: otyzykuc, Roy, KrayZee, Arta(M)