Starcraft and Me

 

I play alot of Starcraft, perhaps 8 hours a week or so. It’s a popular evening recreation after my kids have gone to bed; a TV substitute. I much prefer to play 2v2 and 3v3 teams allied with friends, with voice chat over skype, but I play 1v1 when there’s no one I know online.

The social aspect is a big part of it’s appeal to me. Its brought me closer to the friends I regularly play with, both because we catch up on news while we’re playing, and because we have to work together to win games.

The level of play on the open leagues is very high. I’ve been regularly playing for nearly 2 years, on the Australia / SE Asia server, as a Terran under the name ‘bunge’, and I’m about Silver league standard. It must be daunting for new players to begin.

The game is very mentally stimulating and gets my adrenaline flowing. For 10-30 minutes you are required to constantly make decisions, act, react, outwit another human’s mind. In team games, there can be up to 8 humans minds contributing to the game, with concurrent battles going on all over the map. I like to think I’ve become a better thinker under time-pressure as a result of playing.

For the first 12 months of playing, I would have trouble sleeping for hours afterwards; not good, when you play in the evenings. It no longer has such an effect on me, but I do find myself reviewing what went wrong in a game, as I’m lying in bed going to sleep.

A Winning Streak, a Winning Strategy

Currently, I’m on my longest winning streak ever in Starcraft 2 league play, 11 of the past 12 games. The matching algorithm pairs you with opponents of similar skill level, so it’s hard to sustain wins for long periods.

In this case, the streak is associated with a particular strategy: fast cloaked Banshees, which I used in every one of those winning games. In higher leagues, players know how to defend them, but in my adopted home of Bronze & Silver leagues, they cause havoc.

Starcraft 2: on a winning streak!

My build:

  • Almost always wall off my base with a Barrack and 2 Supply Depots, to prevent scouts seeing my Banshee build
  • 13 Gas
  • 15 Orbital Command
  • Circa 16, Gas 2
  • Factory on 100 Gas
  • Continual marine and SCV production. Send a marine out to the towers and look around for anything unusual or vulnerable: Overlords, pylons, hidden expansions, proxy Barracks, etc. Place a marine in any dark corners of your base, to spot any incoming Drops or Warp-ins.
  • I pre-build a few Depots, so that once my Banshees are out I have some excess supply
  • Starport right after Factory
  • Factory builds a tech lab, then swaps off it so its ready for the starport to use.
  • Build a banshee as soon as Starport is hooked to the tech lab, and also I begin Cloaking research.
  • I carefully setup a multi-step rally flight path for my Banshees, so that they rally to my opponents mineral line. Aiming to avoid enemy held Xelnaga towers, hazards, etc.
  • Usually, by now you are building up minerals but are low on gas. So, once Banshee’s are out, start on
    • An expansion
    • Another Barracks
    • Engineering Bay
    • Turrets, if Mutalisks, Banshees or Dark Templars threats are suspected.
  • Produce 3-4 Banshees in all, while at home…
  • Transitioning out of Banshees into 2-base Marine-Marauder-Medivac

Using Banshees Well

  • Target workers as first priority
  • …except for Zerg, where a single queen can be killed off without needing cloaking
  • Turn on Cloaking when needed, turn off when no threats present
  • Target SCVs building turrets
  • Almost never take on anti-air structures with Detection: Turrets, Cannons or Spore Crawlers
  • Move Banshees around to find angles of attack that are not covered by defence
  • In team games, spread the Banshee love around between different opponents. I find that players who have not yet come under Banshee attack, will often be unprepared even if their team mates have been hard hit.
  • Preemptively pull wounded or energy depleted Banshees back into dead airpace to rest, before they are destroyed. Let the victim forget about them by waiting a few minutes, or attack elsewhere with a different Banshee. Then move back in again.
  • Cloaked Banshees continue to work very well late game in large team games. Spread them around, exploit the chaos and confusion.
  • Cloaked Banshees can also do duty clearing seige-tank clusters.
  • Even if your Banshees are not doing heavy damage directly, its remarkable how much they can distract and harras opponents, unhinging their own strategy and putting them into a reactive mode.
  • Run away from air-to-air units like Vikings and Mutas. They suppress banshees pretty well.

 

Reinventing Maybe/Option in Guava: get the basics right, please!

Google’s Guava open source library provides a class Optional<T> that holds zero or one value, as a superior alternative to null references. Its a certainly good idea, but also a very mature, well understood idea. Haskell has Maybe, Scala has Option.

For some inexplicable reason, Guava’s designer turn there back on prior art and wisdom with a lame dismissal: Optional is not intended as a direct analogue of any existing “option” or “maybe” construct from other programming environments, though it may bear some similarities.

“Some similarities”? Sure does! Its the same damn abstraction. How many abstractions can you get that consist of exactly 0..1 values of some type T? One, that’s how many.

And one of the most useful capabilities of this abstraction is that can be a monad; essentially, support a flatMap (of flattenTransform in Guava terms) operation. The flattening part is useful when you have an Optional<T> value, and a function from T to another Optional<S> value. If you simply transform the input, you get a Optional<Optional<T>> container as a result. Typically, you want to flatten any number of Optional wrappers down into a single Optional<S> layer. That is, either I have a result value of type S, or I don’t.

Sadly, Guava hobbled their Optional class by leaving out a flatten operation.

I find myself speculating on why they left it out, and suspect that it resulted from the kind of ignorance of the outside world that seems to common in Java programming culture. An attitude that its OK to reinvent a existing abstraction that has been widely used and well understood, and yet  ignore or dismiss any wisdom that comes from outside the Java ecosystem.