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.
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.
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.
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.
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.
Ah yeah, I phrased that badly. My intent was to emphasize that the cheat exists solely outside of the game executable. Blizzard runs an incredibly cool, and secretive, program called Warden to do exactly what you said (amongst other things). Details are sparse but my understanding is that every 30 seconds a unique copy is downloaded and run looking for cheats. For small time developers, cough cough, it's a painful problem.
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.
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.
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.
Yes, this is why I used quotes for "looking at the screen". This is probably easier, but it's still harder than just getting the game info from the engine.
The interesting thing about this approach is that it can be applied to automate almost any computer task, by intercepting graphic primitives.
DirectX calls are probably (or might be) still higher level than just graphic primitives. So maybe this approach only works for DirectX based games under certain circumstances.
When I first read your comment, I was actually thinking about something similar as Sikuli. Sikuli might actually work for some primitive scripting events in games.
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.
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)."
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.
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/
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.
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.
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?
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!
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.
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.
I can beat Very Hard opponents with ease but am stuck in silver :-). Furthermore, he states that his AI is weak to early agression. This is not a problem for him because the builtin AI never cheeses, but it happens all the time on ladder and will severely impact his rank.
Nonetheless, I'm totally blown away by the project! Amazing work!
> 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.