
Starcraft 2 Automated Player - nostromo
http://graphics.stanford.edu/~mdfisher/GameAIs.html
======
nostromo
I hope people notice this cool feature in the documentation: trash talking!
Turing would be proud.

> The AI maintains a set of personas it adopts when fighting humans. These are
> designed to intimidate the person with the AI's ability to type very
> complicated and computationally intensive sentences in the middle of
> battles. Currently this feature is not well developed since it does not
> affect the win-loss ratio much and I've decided not to unleash the AI on
> hapless Battle.net players, but I may revisit it eventually.

~~~
sliverstorm
^ My favorite strategy when I'm defeated and my teammate is still kicking. Try
to get a rise out of the enemey just as my teammate executes a drop!

------
moconnor
Every AI I've ever seen or written has always sidestepped inconveniences such
as a limited number of actions per frame and a limited field of view. Getting
this working in a game as complex as Starcraft 2 is _ridiculously_ impressive.

The thread-like programs is an interesting approach, too. I wonder if the
author plans to treat stale state using Bayesian belief models instead of
assuming it's still correct until a scheduled poll checks it.

~~~
DTrejo
For some reason snippyhollow's comment was `dead`ed:

> For the use of Bayesian models in StarCraft AI, see my last 3 papers
> [http://emotion.inrialpes.fr/people/synnaeve/index.html#publi...](http://emotion.inrialpes.fr/people/synnaeve/index.html#publis)
> :)

------
joelthelion
Note that this is not just another AI for Starcraft: it actually plays the
game like a human, by "looking at the screen", and issuing keyboard and mouse
orders.

~~~
snippyhollow
With 1k-2k APM, _with_ grouping commands by contrast to BWAPI (Broodwar API)
which does not allows for group commands (20 units attack move = 20 actions
with BWAPI, only 2 actions here). And low-level SC2 AI which is at least one
order of magnitude less micro-intensive than Broodwar's.

~~~
baddox
True, but it's still interesting that it's essentially using the same "API"
into the game as a player uses. While a computer can obvious do rote tasks
much faster than a human, if you limited this AI's actions per minute to
something semi-reasonable like 500, it could be a sort of proof of concept for
the ridiculously high skill ceiling of Starcraft 2. This is especially true
for battle micro.

------
forrestthewoods
For the record, this is how a lot of video game cheats work and it SUCKS.
Aimbots in FPS games for example exist 100% out of the game executable so
there is no way to stop it. The only option you have as a dev is to detect the
behavior and ban with righteous fury.

It's both incredibly cool and wildly frustrating at the same time.

~~~
bkrausz
There's a lot of detection that can be done beyond just the behavior. The
problem basically reduces to virus detection (and the ensuing arms race). You
check all running programs for something that looks like this kind of bot.
Right now it's probably easier to just detect the APM or jerky screen view,
but in the long run that's the best way to shut these down.

Personally I'm really hoping Blizzard doesn't go after things like this too
actively on SC2. It's unfortunate that there's no offline place for bots to
play against each other, because the competitions that arise are really fun.
There's definitely less money to be made here than in, say, WoW.

~~~
sliverstorm
_Personally I'm really hoping Blizzard doesn't go after things like this too
actively on SC2_

At a cerebral level, I love to see bots in development for RTS's. Beyond the
cool factor, it could wind up developing all sorts of new strategies and spur
more high-level discussion. That said, it would really destroy the battle.net
experience if bots became prolific.

------
martinkallstrom
Hey Matt, if you're reading this - why not post replay files to show off it's
abilities. Or send to HuskyStarcraft for him to cast, I think that would be
awesome.

~~~
dibs
Matt has a reddit account. Also, from what I understand, this AI is a
modification from work he has done making players for Warcraft 3 and Dota.

Regarding releasing replays:

>>"I'm also aware that Blizzard programmers might find the project interesting
but Blizzard as a whole is obligated to not like the idea; this is also reason
I've never released a replay, as this would be a clear indication I've played
the bot on Battle.net (not to mention they might have a detector or two for
things with 5000+ apm)."

<http://www.reddit.com/user/techmatt>

~~~
jeffreyqua
Wouldn't it be possible to limit the AI's APM to somewhere a human/pro-gamer
could achieve to prevent it from being detected?

~~~
verroq
Won't that mean it'll lose the only advantage it has?

------
rkangel
It would be interesting to see how it would fare against a top level human,
but I'd be more interested to see how it would fare against other AI
implementations.

There could be a whole separate community for SC2 AI competitions - a bit like
there exists with chess.

~~~
snippyhollow
There are Broodwar's AI competitions with the use of BWAPI, they don't win
against good-to-top humans yet. (Btw, Broodwar is way more balanced than
SC2.)<http://code.google.com/p/bwapi/>

~~~
zacharycohn
Yes, a game that's been out for 13 years is way more balanced than a game
that's only been out for 1 year.

------
fdudfsfa89
Suggestions: (1) emulate the time required to move the mouse, (2) reduce the
number of times that objects are focused as a human player would do by keeping
track of recent commands and not repeating them especially when there is no
attacking/defense occurring, (3) emulate human reaction delay. The goal should
be that it shouldn't cause convulsions when watching it due to the rapid
changes in focus. This is incredibly awesome, though.

~~~
mentat
Actually if you see pro players play, they jump around in a very similar
fashion. That pattern similarity was one of the most impressive things about
this.

------
quasistar
Kudos to Matt Fisher on an heroic undertaking. Internal states of D3D devices
can be substantial on modern hardware, e.g. 100+ renderer calls in that single
frame alone. And there are many impressive components in this AI: translating
texture glyphs into literal meaning, the scene 'tree' gamestate, rational
action choice based on a combo of said extracted gamestate and what I can only
assume is his secret play strategy honed over countless hours of battle...

Here is one who is unwilling to sit idly by while an official API arrives from
the vendor. And for that he should be applauded. But it begs the question:
when will Blizzard release an official SC2 API? Or is there a way to take
Matt's work and create a 'sandbox' battle.net solely for bot enthusiasts?

------
notpmocd
This is really cool. The closer-to-human aspect is great, and the graphics
approach is definitely interesting. I love the idea of an AI whose difficulty
could be largely tuned by implementing a max APS.

Added the code to my (long) list of things to read!

------
JabavuAdams
Fantastic! I've played around with BWAPI for Starcraft (1) AIs, but I like
this approach.

So, when's the first SC2 AI competition? The nice thing about SC1 though is
that there's no problem running 4 instances in VMs all on the same laptop.

------
jamesu
I'd be very interested in using something like this to unlock ridiculous
achievements on steam.

~~~
saraid216
I still haven't gotten the "An engineer disarms a landmine after you spot it"
achievement on Brink...

------
andrewljohnson
I wish it said what rank it played at... did I miss that bit?

~~~
karpathy
I believe he says somewhere that he didn't have it play against real players
on battle net so far, but that he can beat AI up to insane, exclusive. I was
happy to find out that he's a Stanford PhD student though, and that his office
is right above mine :) So I need to drop by tomorrow and convince him to...
properly evaluate the algorithm... for science.

~~~
kami8845
My gut says he already tested it on Battle.net, that'd be the first thing I'd
do... It's probably not a good idea to make that public though, as the
legality of this AI is still uncertain.

~~~
alex_c
>as the legality of this AI is still uncertain.

I know it's just a StarCraft AI, but that sentence still sent a chill down my
spine, and visions of Ghost in the Shell / similar SF.

------
toblender
Wow best research project ever!

------
OZZlE
This could be used as a cheat :/

