• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 18:24
CEST 00:24
KST 07:24
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy4Code S RO8 Preview: herO, Zoun, Bunny, Classic7Code S RO8 Preview: Rogue, GuMiho, Solar, Maru3BGE Stara Zagora 2025: Info & Preview27
Community News
Firefly suspended by EWC, replaced by Lancer1Classic & herO RO8 Interviews: "I think it’s time to teach [Rogue] a lesson."2Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey.8Code S RO8 Results + RO4 Bracket (2025 Season 2)14BGE Stara Zagora 2025 - Replay Pack2
StarCraft 2
General
Firefly suspended by EWC, replaced by Lancer Jim claims he and Firefly were involved in match-fixing How herO can make history in the Code S S2 finals Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey. Code S RO8 Results + RO4 Bracket (2025 Season 2)
Tourneys
[GSL 2025] Code S: Season 2 - Semi Finals & Finals WardiTV Mondays Sparkling Tuna Cup - Weekly Open Tournament $3,500 WardiTV European League 2025 Sea Duckling Open (Global, Bronze-Diamond)
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 478 Instant Karma Mutation # 477 Slow and Steady Mutation # 476 Charnel House Mutation # 475 Hard Target
Brood War
General
ASL20 Preliminary Maps BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Recent recommended BW games FlaSh Witnesses SCV Pull Off the Impossible vs Shu
Tourneys
[Megathread] Daily Proleagues [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET Small VOD Thread 2.0 [BSL20] ProLeague Bracket Stage - Day 4
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread Beyond All Reason What do you want from future RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread UK Politics Mega-thread Russo-Ukrainian War Thread Vape Nation Thread
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NHL Playoffs 2024 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
A Better Routine For Progame…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 34330 users

Towards a good SC bot - Month 2 Report

Blogs > imp42
Post a Reply
imp42
Profile Blog Joined November 2010
398 Posts
November 15 2016 16:05 GMT
#1
Towards a good StarCraft bot - Month 2 - Progress Report

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!


50 pts Copper League
Acrofales
Profile Joined August 2010
Spain17958 Posts
November 16 2016 18:33 GMT
#2
I can't help you with the APIs, but in terms of Prolog, my experience is that running SWI Prolog through the JPL is faster and more stable than JIP, although if I understand things right, this GNU project is new and completely separate from JIP. An alternative is to generate prolog code and can run it as a separate process and just wait for its return. However, this only works if your prolog requirements are fairly large, and mostly independent of your Java code.
DarkNetHunter
Profile Joined October 2012
1224 Posts
November 17 2016 10:41 GMT
#3
I'm enjoying your series of blogs, as a complete non-programmer it's sometimes hard to follow but very much an interesting read!

I am happy you're sticking to BW even though the SC2 API is coming out.

Keep at it, looking forward to seeing the results of your development environment as it pans out!
Learn from the mistakes of others. You can't live long enough to make them all yourself.
Jukado
Profile Blog Joined May 2011
805 Posts
November 19 2016 12:09 GMT
#4
No worries, you can borrow my gamma-neutron demystifier anytime. By the way it also has a demistify setting incase you find yourself caught in a spontaneous indoor cloud formation.
Star Tale Public Domain project. Maps: (2)Gates Of Memphis, (2)Marshmallow Toast, (4)Bubbles, (4)Clay Fields, (6)Numbskull Desert. Also the Vaylu Public Domain Tileset. Also Ramp Palettes, Brood War guides and some fun stuff. Links in my profile
imp42
Profile Blog Joined November 2010
398 Posts
November 23 2016 05:01 GMT
#5
thanks all for your comments and input.
The deeper I dig the slower is the progress. For example, I have spent the last weeks taking several online classes on Neural Networks, in order to understand the concept better. This is obviously a bit of an investment, time-wise. I hope I can still provide content regularly.
50 pts Copper League
Please log in or register to reply.
Live Events Refresh
BSL: ProLeague
18:00
Bracket Stage - Day 4
Bonyth vs Dewalt
Cross vs Doodle
MadiNho vs Dragon
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Rain 8708
Calm 2357
Artosis 387
firebathero 171
Dota 2
Pyrionflax167
ROOTCatZ10
LuMiX1
League of Legends
Grubby2753
Dendi1729
JimRising 475
Counter-Strike
fl0m6209
Stewie2K729
Super Smash Bros
Mew2King95
Heroes of the Storm
Khaldor262
Other Games
summit1g8481
FrodaN4027
shahzam790
C9.Mang0713
Maynarde56
Dewaltoss49
UpATreeSC13
Organizations
Other Games
gamesdonequick1109
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Hupsaiya 92
• Berry_CruncH87
• musti20045 52
• Adnapsc2 19
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• Rasowy 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22349
• Ler124
League of Legends
• Doublelift4607
Other Games
• imaqtpie1475
Upcoming Events
Replay Cast
1h 36m
Wardi Open
12h 36m
Replay Cast
1d 1h
Replay Cast
1d 11h
RSL Revival
1d 11h
Cure vs Percival
ByuN vs Spirit
RSL Revival
2 days
herO vs sOs
Zoun vs Clem
Replay Cast
3 days
The PondCast
3 days
RSL Revival
3 days
Serral vs SHIN
Solar vs Cham
Replay Cast
4 days
[ Show More ]
RSL Revival
4 days
Reynor vs Scarlett
ShoWTimE vs Classic
uThermal 2v2 Circuit
4 days
SC Evo League
5 days
Circuito Brasileiro de…
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-06-11
BGE Stara Zagora 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL 17: 2025 SUMMER
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025

Upcoming

Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
BLAST Open Fall 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.