• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:10
CEST 20:10
KST 03:10
  • 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
[ASL19] Finals Recap: Standing Tall10HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Firefly given lifetime ban by ESIC following match-fixing investigation9$25,000 Streamerzone StarCraft Pro Series announced4Weekly Cups (June 30 - July 6): Classic Doubles6[BSL20] Non-Korean Championship 4x BSL + 4x China9Flash Announces Hiatus From ASL66
StarCraft 2
General
Firefly given lifetime ban by ESIC following match-fixing investigation TL Team Map Contest #4: Winners Weekly Cups (June 30 - July 6): Classic Doubles The SCII GOAT: A statistical Evaluation The GOAT ranking of GOAT rankings
Tourneys
FEL Cracov 2025 (July 27) - $8000 live event $25,000 Streamerzone StarCraft Pro Series announced Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series WardiTV Mondays
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ i aint gon lie to u bruh... ASL20 Preliminary Maps [G] Progamer Settings [ASL19] Finals Recap: Standing Tall
Tourneys
[Megathread] Daily Proleagues [BSL20] Non-Korean Championship 4x BSL + 4x China [BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Positive Thoughts on Setting Up a Dual-Caliber FX
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Summer Games Done Quick 2025! Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
momentary artworks from des…
tankgirl
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 701 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
Spain17971 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
WardiTV European League
16:00
Swiss Groups Day 3
Scarlett vs ShamelessLIVE!
WardiTV967
TKL 279
Liquipedia
uThermal 2v2 Circuit
16:00
Warmup Cup 2
uThermal300
IndyStarCraft 230
SteadfastSC90
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 409
uThermal 300
TKL 279
IndyStarCraft 230
SteadfastSC 90
UpATreeSC 84
BRAT_OK 68
ProTech43
MindelVK 16
StarCraft: Brood War
Bisu 1565
Shuttle 955
EffOrt 931
firebathero 303
Mini 272
TY 91
Dewaltoss 80
soO 56
sas.Sziky 22
yabsab 11
[ Show more ]
IntoTheRainbow 9
GoRush 7
Dota 2
Gorgc11895
qojqva2039
League of Legends
Dendi980
Grubby239
Counter-Strike
fl0m1144
byalli564
flusha354
zeus227
Foxcn187
sgares48
Fnx 18
Heroes of the Storm
Liquid`Hasu414
Khaldor144
Other Games
FrodaN2268
Beastyqt608
oskar144
KnowMe139
Trikslyr53
QueenE52
ArmadaUGS14
Organizations
Other Games
gamesdonequick45299
StarCraft 2
angryscii 13
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Reevou 6
• intothetv
• sooper7s
• Migwel
• AfreecaTV YouTube
• LaughNgamezSOOP
• IndyKCrew
• Kozan
StarCraft: Brood War
• FirePhoenix4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2621
• masondota2832
League of Legends
• Nemesis5305
• Jankos1087
• TFBlade1059
Other Games
• imaqtpie1037
• Shiphtur604
Upcoming Events
Replay Cast
5h 50m
RSL Revival
15h 50m
ByuN vs SHIN
Clem vs Reynor
OSC
18h 50m
Replay Cast
1d 5h
RSL Revival
1d 15h
Classic vs Cure
FEL
1d 21h
OSC
2 days
RSL Revival
2 days
FEL
2 days
FEL
2 days
[ Show More ]
CSO Cup
2 days
BSL20 Non-Korean Champi…
2 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
3 days
RSL Revival
3 days
FEL
3 days
BSL20 Non-Korean Champi…
3 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Replay Cast
5 days
Liquipedia Results

Completed

Proleague 2025-07-07
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
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

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
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.