Last month I pointed out several issues, such as:
- Poor development and testing environment
- Lack of setup to play two bots against each other
- Unmodifiable maps
I also promised to write how the type-safe API turned out. So, let’s go through these points:
Development and Testing Environment
Requirements towards a development and testing environment:
- Stability
Obviously, it should never crash. It should not require constant modifications.
- Fast test iterations
“Fail fast” (a term adopted from the lean startup methodology) applies here too . Hot swapping code (altering the code while it executes by rewriting the source, compiling on-the-fly and then swap it with the running code) really speeds up the development process.
- Traceability
Probably one of the most important features is a reliable way to link outcomes to causes. The “Credit Assignment” problem of development, so to speak… This mostly translates to good support for modular tests and a good debugger.
- Ease of use
It would be nice if you could achieve what you have in mind with relative ease. Without having to e.g. debug the development tools first, or do a lot of pre-processing steps. etc.
I am in the process of changing several parts in the tool chain. It probably deserves its own post in the near future. Some parts I am experimenting with, in random order:
- Eclipse IDE vs IntelliJ IDEA
- GNU Prolog for Javavs SWI-Prolog
- BwMirror 2.5
- BWAPI 4.0.2
- BWTA2
- Checkstyle / PMD
- Git / GitHub
- Gradle
- Quasar Fibers (lightweight threads for Java)
- Torch 7 / Lua (Neural Net programming)
- Weka 3 (Machine Learning)
- MaryTTS (speech synth)
- Windows 10 vs Ubuntu 16 (Mint)
In conclusion, I feel like the (lack of a good) development environment is one of the issues that holds back bot developers. Therefore, I am looking into providing such an environment out-of-the-box to lower the entry barrier for future developers.
Playing two bots against each other
Solved. Multi-instance Chaoslauncher now works fine. I can run two bots as Java processes together with two instances of Brood War on the same machine.
Unmodifiable maps
Solved. I got a version of Fighting Spirit which I could modify to allow for single-player or multi-player marines-only games.
Type-Safe API
Personally, type-safe development helps me a lot. I often find myself in a position where I could do things “the proper way”, with considerable effort. Or “cheating just a little bit” to get results faster, because “I can always do it the proper way later”. Well, “later” is usually “never” and that’s how technical debt accumulates. For most developers that means nobody else will understand their code. For me it means not even I will understand my own code two months from now. Type-safe environments enforce “the proper way” to some extent. It is definitely more difficult to cheat (circumventing your own software architecture guidelines for the benefit of a quick win), so you might as well do it the right way to start with.
To summarize, by now I am so convinced that I decided to release a type-safe Java API for BWAPI. It will probably be out early 2017.
Last but not least, a big announcement was made a couple of days ago:
Blizzard provides an API for SC2
This has of course already been discussed in the forums. No need to re-iterate all the points made. Let me just state two things:
- The statement that Brood War and StarCraft 2 are two different games is true even more so for AI / bots than for humans.
- Any researcher would agree that it is a good thing to have as many variables under control as possible.
Personally, I will stick with BW for a good while for sure. Not only do I like the strategic aspect of BW more, but I also feel uncomfortable developing against an API I cannot influence in any way (see the “stability” requirement in the development environment part above). Who knows at what point Blizzard will introduce new patches or even decide to shut down the API because the CEO woke up one day and found he valued paying customers higher than a handful of people doing fancy research.
Credits:
Thanks CardinalAllin!